added pauses to loop management

This commit is contained in:
2022-10-14 20:35:41 +02:00
parent d7316d7d9c
commit b6315f7b0e
6 changed files with 22 additions and 5 deletions

View File

@@ -35,8 +35,10 @@ def run():
overlay.run_mode = 'init'
continue
elif overlay.run_mode == 'started':
cv.waitKey(1000)
pass
elif overlay.run_mode == 'init':
cv.waitKey(1)
continue
elif overlay.run_mode == 'paused':
continue
@@ -129,7 +131,7 @@ def run():
while True:
if overlay.run_mode == 'paused':
# cv.waitKey(500)
cv.waitKey(1)
if (time() - loop_time_p) >= 5:
loop_time_p = time()
print("pausing")