Camera: scan for QR codes twice a second
CI / test (push) Failing after 50s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-29 00:58:32 -08:00
1 parent e2ba41acca
commit f5a252e063
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -32,6 +32,9 @@ VIDEO_EXTS = (".mp4", ".mkv", ".webm")
QUAD_BAYER_MODELS = {"imx371"}
# Pause between QR scans: scanning runs as long as the photo viewfinder is open.
QR_SCAN_INTERVAL_S = 0.5
# Default live viewfinder/video sizes: 1600x1200 selects full-FOV 2x2-binned 4:3 on IMX519.
PREFERRED_VIEWFINDER_SIZES = [
(1600, 1200),
@@ -2405,7 +2408,7 @@ def run_worker(cameras, initial_index):
scanner = QRScanner(cv2)
reporter = QRReporter()
last_seq = -1
while not stop_flag.wait(0.2):
while not stop_flag.wait(QR_SCAN_INTERVAL_S):
eng = engine_holder[0]
if eng is None or not qr_on.is_set() or eng.is_recording():
continue