some fixes
This commit is contained in:
@@ -59,12 +59,18 @@ def remove_last_aligned_histories(
|
||||
return retained_raw, retained_preprocessed, retained_results
|
||||
|
||||
|
||||
def build_run_history_signature(
|
||||
def build_processor_run_signature(
|
||||
config: RunConfigModel,
|
||||
) -> tuple[object, ...]:
|
||||
"""Build deterministic signature to detect run-settings changes (excluding live processing params)."""
|
||||
"""Build signature of settings that change the data SHAPE the data_processor parses.
|
||||
|
||||
Excludes the preprocess set names on purpose: the data_processor does not consume
|
||||
calibration/reference sets (those are applied upstream by the data_preprocessor), so
|
||||
changing a set must NOT restart the processor. Restarting it would also tear down the
|
||||
locator TCP server it hosts and drop every connected client. Only genuine shape changes
|
||||
(radar model, sweep, switch layout, combos) require a processor restart.
|
||||
"""
|
||||
combos_signature = tuple((int(combo.input), int(combo.output)) for combo in config.combos)
|
||||
preprocess_signature = tuple(preprocess_asset_model(config, key).set_name for key in PREPROCESS_ASSET_KEYS)
|
||||
sweep_points_signature: object = "adc" if config.is_kamil_adc else int(config.radar.sweep.points)
|
||||
return (
|
||||
str(config.radar.model),
|
||||
@@ -85,11 +91,23 @@ def build_run_history_signature(
|
||||
str(config.output_switch.driver),
|
||||
int(config.output_switch.positions),
|
||||
bool(config.output_switch.invert_logic),
|
||||
preprocess_signature,
|
||||
combos_signature,
|
||||
)
|
||||
|
||||
|
||||
def build_run_history_signature(
|
||||
config: RunConfigModel,
|
||||
) -> tuple[object, ...]:
|
||||
"""Build full signature for GUI display-history reset (processor shape + preprocess sets).
|
||||
|
||||
Display history still resets when the reference/calibration set changes (the on-screen
|
||||
B-scan would otherwise mix old- and new-reference frames), even though the processor
|
||||
process itself is intentionally kept alive across that change.
|
||||
"""
|
||||
preprocess_signature = tuple(preprocess_asset_model(config, key).set_name for key in PREPROCESS_ASSET_KEYS)
|
||||
return build_processor_run_signature(config) + (preprocess_signature,)
|
||||
|
||||
|
||||
def _tail_occurrence_key(history: list[THistoryCollection], index: int) -> tuple[int, int]:
|
||||
"""Return `(collection_id, occurrence_from_tail)` for the item at `index`."""
|
||||
collection_id = int(history[index].collection_id)
|
||||
|
||||
Reference in New Issue
Block a user