added all data to bscan

This commit is contained in:
Ayzen
2025-10-06 18:31:18 +03:00
parent ceaa9b77e4
commit 15864cb412
3 changed files with 16 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"open_air": false, "open_air": false,
"axis": "real", "axis": "abs",
"cut": 0.292, "cut": 0.292,
"max": 2.3, "max": 2.3,
"gain": 0.3, "gain": 0.3,

View File

@ -3,5 +3,5 @@
"y_max": 40, "y_max": 40,
"autoscale": true, "autoscale": true,
"show_magnitude": true, "show_magnitude": true,
"show_phase": false "show_phase": true
} }

View File

@ -216,15 +216,26 @@ class BScanProcessor(BaseProcessor):
if len(self._plot_history) > self._max_history: if len(self._plot_history) > self._max_history:
self._plot_history = self._plot_history[-self._max_history :] self._plot_history = self._plot_history[-self._max_history :]
# Collect all plot history data
with self._lock:
all_time_domain = [record["time_domain_data"] for record in self._plot_history]
all_distance = [record["distance_data"] for record in self._plot_history]
all_sweep_numbers = [record["sweep_number"] for record in self._plot_history]
all_timestamps = [record["timestamp"] for record in self._plot_history]
return { return {
"time_domain_data": analysis["time_data"].tolist(), "time_domain_data": analysis["time_data"].tolist(), # Latest sweep
"distance_data": analysis["distance"].tolist(), "distance_data": analysis["distance"].tolist(), # Latest sweep
"frequency_range": analysis["freq_range"], "frequency_range": analysis["freq_range"],
"reference_used": bool(self._config["open_air"] and reference_data is not None), "reference_used": bool(self._config["open_air"] and reference_data is not None),
"axis_type": self._config["axis"], "axis_type": self._config["axis"],
# "data_limitation": self._config["data_limitation"],
"points_processed": int(complex_data.size), "points_processed": int(complex_data.size),
"plot_history_count": len(self._plot_history), "plot_history_count": len(self._plot_history),
# Full history data
"all_time_domain_data": all_time_domain,
"all_distance_data": all_distance,
"all_sweep_numbers": all_sweep_numbers,
"all_timestamps": all_timestamps,
} }
except Exception as exc: # noqa: BLE001 except Exception as exc: # noqa: BLE001