remove last config access from main cycle
This commit is contained in:
parent
59e622c17d
commit
bd02f998f2
1 changed files with 2 additions and 1 deletions
|
|
@ -91,6 +91,7 @@ frames = 0
|
||||||
timeout = config.getint("video", "timout")
|
timeout = config.getint("video", "timout")
|
||||||
dark_threshold = config.getfloat("video", "dark_threshold")
|
dark_threshold = config.getfloat("video", "dark_threshold")
|
||||||
end_report = config.getboolean("debug", "end_report")
|
end_report = config.getboolean("debug", "end_report")
|
||||||
|
video_certainty = config.getfloat("video", "certainty") / 10
|
||||||
while True:
|
while True:
|
||||||
# Increment the frame count every loop
|
# Increment the frame count every loop
|
||||||
frames += 1
|
frames += 1
|
||||||
|
|
@ -145,7 +146,7 @@ while True:
|
||||||
match_index += 1
|
match_index += 1
|
||||||
|
|
||||||
# Try to find a match that's confident enough
|
# 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())
|
timings.append(time.time())
|
||||||
|
|
||||||
# If set to true in the config, print debug text
|
# If set to true in the config, print debug text
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue