fix: 触发

This commit is contained in:
2026-08-11 13:20:59 +08:00
parent c0bb245c8c
commit 5f509488c5
3 changed files with 26 additions and 11 deletions
+3 -1
View File
@@ -520,6 +520,7 @@ def process_shot(adc_val):
laser_manager.flash_laser(config.FLASH_LASER_DURATION_MS)
# 保存图像(异步队列,与 main.py 一致)
_force_save = (dx is None and dy is None) and getattr(config, "SAVE_IMAGE_ON_FAILURE", False)
enqueue_save_shot(
result_img,
center,
@@ -529,8 +530,9 @@ def process_shot(adc_val):
(x, y),
distance_m,
shot_id=shot_id,
photo_dir=config.PHOTO_DIR if config.SAVE_IMAGE_ENABLED else None,
photo_dir=config.PHOTO_DIR if (config.SAVE_IMAGE_ENABLED or _force_save) else None,
yolo_roi_xyxy=yolo_roi_xyxy if draw_yolo_roi else None,
force_save=_force_save,
)
if logger: