added bscan reprocessing

This commit is contained in:
2026-07-31 18:14:54 +03:00
parent d61b59b9a4
commit b183401e6f
9 changed files with 681 additions and 27 deletions
+15
View File
@@ -287,6 +287,17 @@ class AppWindow(
self._bscan_depth_axis_by_combo = {}
self._bscan_history_floor_collection_id = 0
self._bscan_render_signature = None
# Writer into the processor's input ring, used to re-feed retained sweeps so the
# whole visible B-scan is recomputed. Opened lazily, only while acquisition is
# stopped (see AppWindowBscanReplayMixin).
self._replay_ring_writer = None
self._bscan_replay_active = False
# Results from the last completed replay. While non-empty they, not
# `_result_history`, are what the B-scan renders (see AppWindowBscanReplayMixin).
self._bscan_replay_results = []
self._bscan_reprocess_timer = QTimer(self)
self._bscan_reprocess_timer.setSingleShot(True)
self._bscan_reprocess_timer.timeout.connect(self._reprocess_history_through_processor)
self._gpr_lookup_table = None
self._gpr_image_item = None
self._gpr_tx_item = None
@@ -745,6 +756,10 @@ class AppWindow(
# 0) Stop the GPIO button watcher so a late press cannot start work.
self._stop_control_button_watcher()
self._resume_pipeline_after_capture = False
# 0) Drop the B-scan replay writer so a pending debounce cannot push into a
# ring we are about to tear down.
self._bscan_reprocess_timer.stop()
self._close_replay_ring_writer()
# 1) Abort active capture first (releases exclusive hardware resources).
self._abort_capture_sequence(resume_pipeline=False)
# 2) Stop all managed processes/readers.