scripts/examples: Fix triggering in frame differencing examples.

This commit is contained in:
Kwabena W. Agyeman 2023-11-22 17:34:06 -05:00
parent 25359054e7
commit 953104284a
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ while True:
img = sensor.snapshot() # Take a picture and return the image.
frame_count += 1
if frame_count > BG_UPDATE_FRAMES:
if frame_count > BG_UPDATE_FRAMES and not triggered:
frame_count = 0
# Blend in new frame. We're doing 256-alpha here because we want to
# blend the new frame into the background. Not the background into the

View File

@ -42,7 +42,7 @@ while True:
img = sensor.snapshot() # Take a picture and return the image.
frame_count += 1
if frame_count > BG_UPDATE_FRAMES:
if frame_count > BG_UPDATE_FRAMES and not triggered:
frame_count = 0
# Blend in new frame. We're doing 256-alpha here because we want to
# blend the new frame into the background. Not the background into the