Fixes error with slow mode on low FPS
When frame_time exceeds 0.5 this change caps the sleep time to be at least zero, as trying to sleep a negative duration crashes the program.
This commit is contained in:
parent
a776c49ade
commit
aa11042839
1 changed files with 1 additions and 1 deletions
|
|
@ -183,7 +183,7 @@ try:
|
|||
|
||||
# Delay the frame if slowmode is on
|
||||
if slow_mode:
|
||||
time.sleep(.5 - frame_time)
|
||||
time.sleep(max([.5 - frame_time, 0.0]))
|
||||
|
||||
if exposure != -1:
|
||||
# For a strange reason on some cameras (e.g. Lenoxo X1E)
|
||||
|
|
|
|||
Loading…
Reference in a new issue