Commit 82215071 authored by Stefan Haun's avatar Stefan Haun
Browse files

Only lock display when it's used

parent 83a19117
Pipeline #3505 failed with stages
in 44 seconds
......@@ -206,7 +206,6 @@ def draw_menu(disp, applist, pos, appcount, lineoffset):
def main():
create_folders()
disp = display.open()
applist = list_apps()
numapps = len(applist)
current = 0
......@@ -215,6 +214,8 @@ def main():
timerstartscroll = 5
timercountpopped = 0
for ev in button_events(10):
disp = display.open()
if numapps == 0:
disp.clear(color.COMMYELLOW)
disp.print(
......@@ -266,6 +267,8 @@ def main():
draw_menu(disp, applist, current, numapps, lineoffset)
disp.close()
if __name__ == "__main__":
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment