mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
only clear the flag and notify if it was set
This commit is contained in:
parent
aeece7b98c
commit
19323ac957
@ -534,6 +534,7 @@ def detect_motion(shared_arr, shared_frame_time, frame_lock, frame_ready, motion
|
||||
# when no motion, just keep averaging the frames together
|
||||
cv2.accumulateWeighted(gray, avg_frame, 0.01)
|
||||
motion_frames = 0
|
||||
if motion_detected.is_set():
|
||||
motion_detected.clear()
|
||||
with motion_changed:
|
||||
motion_changed.notify_all()
|
||||
|
Loading…
Reference in New Issue
Block a user