Add object calibration

This commit is contained in:
Ayzen
2026-10-05 17:39:40 +03:00
parent 8f097dfa2e
commit 552cdc688a
33 changed files with 3141 additions and 517 deletions
@@ -57,13 +57,16 @@ class AppWindowPipelineMixin:
"""Start acquisition in single-capture mode."""
self._start_run(single_capture=True)
def _start_run(self, *, single_capture: bool = False) -> None:
def _start_run(self, *, single_capture: bool = False, config_override: RunConfigModel | None = None) -> None:
"""Start pipeline processes and ring readers."""
if getattr(self, "_closing", False) or getattr(self, "_close_after_stop", False):
return
if getattr(self, "_stopping_run", False):
self._show_error("Wait for pipeline shutdown before starting again")
return
if config_override is None and getattr(self, "_object_capture_job", None) is not None:
self._show_error("Wait for object-calibration capture to finish")
return
if self._capture_session is not None:
self._show_error(
"Cannot start pipeline during active capture sequence",
@@ -88,7 +91,7 @@ class AppWindowPipelineMixin:
try:
processor_was_running = self._supervisor.is_processor_running()
config = self._build_config()
config = config_override.clone() if config_override is not None else self._build_config()
validate_acquisition_config(config)
run_signature = self._build_run_history_signature(config)
processor_signature = self._build_processor_run_signature(config)
@@ -101,7 +104,8 @@ class AppWindowPipelineMixin:
if not processor_was_running:
self._reset_runtime_history()
self._validate_processing_mode_constraints(config)
if config_override is None:
self._validate_processing_mode_constraints(config)
radar_key = self._radar_key(config)
missing_assets = [
@@ -145,14 +149,12 @@ class AppWindowPipelineMixin:
f"{', ' + combo_preview if combo_preview else ''}, radar_key={radar_key}"
)
if not single_capture:
should_reset_history = (
self._history_run_signature is not None and self._history_run_signature != run_signature
)
if should_reset_history:
if self._history_run_signature is not None and self._history_run_signature != run_signature:
if processor_was_running:
self._reset_runtime_history()
self._log("History reset because run settings changed")
self._history_run_signature = run_signature
self._write_live_processing_config(history_command="clear_all", bump_history_seq=True)
self._log("History reset because run settings changed")
self._history_run_signature = run_signature
# Open the single-capture acquisition window BEFORE the producer can emit:
# any collection the one-shot orchestrator publishes is then strictly newer
@@ -211,6 +213,9 @@ class AppWindowPipelineMixin:
def _apply_radar_settings(self) -> None:
"""Apply current radar settings by preconfiguring native device."""
if getattr(self, "_object_capture_job", None) is not None:
self._show_error("Wait for object-calibration capture to finish")
return
if self._capture_session is not None:
self._show_error(
"Finish or abort capture sequence before applying radar settings",