added timing
This commit is contained in:
@@ -89,6 +89,9 @@ class AppWindowLiveProcessingMixin:
|
||||
gpr_background_mean_count=gpr_background_mean_count,
|
||||
gpr_remove_sidelobe_objects_enabled=bool(self._gpr_remove_sidelobe_objects_enabled.isChecked()),
|
||||
gpr_imaging_plane_y_m=float(self._gpr_imaging_plane_y_m.value()),
|
||||
gpr_min_visible_score=float(self._gpr_min_visible_score.value()),
|
||||
legacy_gpr_min_visible_pair_count=float(self._legacy_gpr_min_visible_pair_count.value()),
|
||||
ignore_socket_speed=bool(self._legacy_gpr_ignore_socket_speed_enabled.isChecked()),
|
||||
reprocess_current_result=bool(reprocess_current_result),
|
||||
history_command_seq=int(self._history_command_seq),
|
||||
history_command=str(history_command),
|
||||
@@ -140,6 +143,14 @@ class AppWindowLiveProcessingMixin:
|
||||
except Exception as exc: # noqa: BLE001
|
||||
self._show_exception("Failed to update live processing settings", exc)
|
||||
|
||||
def _on_legacy_gpr_ignore_socket_speed_toggled(self, ignore_socket_speed: bool) -> None:
|
||||
"""Reflect socket/manual speed authority in the GUI and live config."""
|
||||
try:
|
||||
self._legacy_gpr_speed_m_s.setEnabled(bool(ignore_socket_speed))
|
||||
self._write_live_processing_config()
|
||||
except Exception as exc: # noqa: BLE001
|
||||
self._show_exception("Failed to update socket-speed mode", exc)
|
||||
|
||||
def _on_gpr_visual_settings_changed(self, *_args) -> None:
|
||||
"""Redraw current GPR result using updated GUI-only render settings."""
|
||||
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
|
||||
@@ -152,22 +163,22 @@ class AppWindowLiveProcessingMixin:
|
||||
self._show_exception("Failed to update GPR render settings", exc)
|
||||
|
||||
def _on_gpr_locator_threshold_changed(self, *_args) -> None:
|
||||
"""Redraw GPR view and republish locator snapshot after threshold changes."""
|
||||
"""Redraw GPR view; locator delivery lives in the C++ data_processor."""
|
||||
self._on_gpr_visual_settings_changed()
|
||||
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
|
||||
return
|
||||
try:
|
||||
self._publish_locator_snapshot_from_latest_result()
|
||||
self._write_live_processing_config()
|
||||
except Exception as exc: # noqa: BLE001
|
||||
self._show_exception("Failed to update locator GPR threshold", exc)
|
||||
|
||||
def _on_gpr_locator_window_changed(self, *_args) -> None:
|
||||
"""Redraw GPR view and republish locator snapshot after visible X/Z changes."""
|
||||
"""Redraw GPR view; locator delivery lives in the C++ data_processor."""
|
||||
self._on_gpr_visual_settings_changed()
|
||||
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
|
||||
return
|
||||
try:
|
||||
self._publish_locator_snapshot_from_latest_result()
|
||||
self._write_live_processing_config()
|
||||
except Exception as exc: # noqa: BLE001
|
||||
self._show_exception("Failed to update locator GPR window", exc)
|
||||
|
||||
@@ -205,10 +216,6 @@ class AppWindowLiveProcessingMixin:
|
||||
self._set_plot_mode(mode)
|
||||
self._set_processing_mode_page(mode)
|
||||
self._on_processing_live_settings_changed()
|
||||
if self._is_gpr_processing_mode(mode):
|
||||
self._publish_locator_snapshot_from_latest_result()
|
||||
elif self._is_gpr_processing_mode(previous_mode) and self._locator_service is not None:
|
||||
self._locator_service.publish_empty()
|
||||
if mode == "pass_through":
|
||||
self._log(
|
||||
"Processing mode selected: pass_through "
|
||||
|
||||
@@ -445,9 +445,11 @@ class AppWindowConfigProfileIOMixin:
|
||||
self._legacy_gpr_start_freq_mhz.setValue(float(gui_state.processing.legacy_gpr.start_freq_mhz))
|
||||
self._legacy_gpr_stop_freq_mhz.setValue(float(gui_state.processing.legacy_gpr.stop_freq_mhz))
|
||||
self._legacy_gpr_speed_m_s.setValue(float(gui_state.processing.legacy_gpr.speed_m_s))
|
||||
self._legacy_gpr_ignore_socket_speed_enabled.setChecked(
|
||||
bool(gui_state.processing.legacy_gpr.ignore_socket_speed_enabled)
|
||||
ignore_socket_speed_enabled = bool(
|
||||
gui_state.processing.legacy_gpr.ignore_socket_speed_enabled
|
||||
)
|
||||
self._legacy_gpr_ignore_socket_speed_enabled.setChecked(ignore_socket_speed_enabled)
|
||||
self._legacy_gpr_speed_m_s.setEnabled(ignore_socket_speed_enabled)
|
||||
self._legacy_gpr_look_angle_deg.setValue(float(gui_state.processing.legacy_gpr.look_angle_deg))
|
||||
self._legacy_gpr_background_subtract_enabled.setChecked(
|
||||
bool(gui_state.processing.legacy_gpr.background_subtract_enabled)
|
||||
@@ -494,7 +496,6 @@ class AppWindowConfigProfileIOMixin:
|
||||
self._apply_initial_radar_limits()
|
||||
if self._preprocess_dialog is not None:
|
||||
self._refresh_sets()
|
||||
self._reload_locator_service_from_config()
|
||||
self._on_processing_mode_changed(gui_state.processing.selected_mode)
|
||||
self._update_history_indicator()
|
||||
self._remember_active_profile_path(profile_path)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from python_app.hardware_full.librevna_service import LibreVnaService
|
||||
from python_app.hardware_full.matrix_radar_service import create_matrix_radar_service
|
||||
from python_app.hardware_full.single_radar_service import create_single_radar_service
|
||||
|
||||
|
||||
@@ -22,6 +23,8 @@ class AppWindowRadarLimitsMixin:
|
||||
return self._apply_radar_limits_to_ui(None)
|
||||
if config.is_multi_device:
|
||||
radar_service = LibreVnaService(serial=config.radar.serial or None)
|
||||
elif config.is_matrix_radar:
|
||||
radar_service = create_matrix_radar_service(config)
|
||||
else:
|
||||
radar_service = create_single_radar_service(config)
|
||||
|
||||
|
||||
@@ -399,8 +399,8 @@ class AppWindowConfigStateBuildersMixin:
|
||||
config.runtime.settling_ms = int(self._settling_ms.text().strip())
|
||||
config.runtime.processing_live_config_path = str(self._live_config_writer.path)
|
||||
|
||||
if config.is_multi_device:
|
||||
if len(config.radar.multi_device.slave_serials) != 2:
|
||||
if config.is_matrix_radar:
|
||||
if config.is_multi_device and len(config.radar.multi_device.slave_serials) != 2:
|
||||
raise ValueError("LibreVNA multi-device mode requires exactly two slave serials")
|
||||
config.apply_device_model_constraints()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user