0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

remove last config access from main cycle

This commit is contained in:
dmig 2018-11-21 11:32:28 +07:00
parent 59e622c17d
commit bd02f998f2
No known key found for this signature in database
GPG key ID: A4A245B3AD37C4FC

View file

@ -91,6 +91,7 @@ frames = 0
timeout = config.getint("video", "timout")
dark_threshold = config.getfloat("video", "dark_threshold")
end_report = config.getboolean("debug", "end_report")
video_certainty = config.getfloat("video", "certainty") / 10
while True:
# Increment the frame count every loop
frames += 1
@ -145,7 +146,7 @@ while True:
match_index += 1
# Try to find a match that's confident enough
if match * 10 < float(config.get("video", "certainty")) and match > 0:
if 0 < match < video_certainty:
timings.append(time.time())
# If set to true in the config, print debug text