little refactoring done

This commit is contained in:
Ayzen
2026-03-10 17:33:25 +03:00
parent 9c745f304e
commit 1f715ce22c
10 changed files with 520 additions and 245 deletions
@@ -179,12 +179,12 @@ class AppWindowConfigMixin:
if self._result_history:
self._sync_bscan_history_from_results()
if not self._draw_bscan_heatmap_from_history():
self._plot.clear()
self._bscan_plot.clear()
return
if self._result_history:
self._draw_results(self._result_history[-1])
return
self._plot.clear()
self._bscan_plot.clear()
self._clear_trace_plots()
def _on_radar_identity_changed(self, *_args) -> None:
@@ -317,6 +317,16 @@ class AppWindowConfigMixin:
def _sync_bscan_frequency_limits_with_radar(self) -> bool:
"""Synchronize B-scan start/stop MHz widget ranges with radar sweep bounds."""
required_widgets = (
"_start_hz_input",
"_stop_hz_input",
"_bscan_start_freq_mhz",
"_bscan_stop_freq_mhz",
)
if not all(hasattr(self, widget_name) for widget_name in required_widgets):
# Processing callbacks can fire while UI groups are still being built.
return False
try:
radar_start_hz = float(self._start_hz_input.text().strip())
radar_stop_hz = float(self._stop_hz_input.text().strip())