Rework radar system

This commit is contained in:
Ayzen
2026-10-06 12:32:26 +03:00
parent 552cdc688a
commit 5bb86b7165
299 changed files with 13537 additions and 27763 deletions
+16 -7
View File
@@ -2,10 +2,9 @@
The web layer (``app``/``routes``/``streaming``) is deliberately free of any Qt
or hardware knowledge: it talks only to a :class:`WebController`. The embedded
bridge in ``gui/controllers/app_window_web_mixin.py`` implements this protocol by
forwarding control actions to the AppWindow's *existing* buttons and exposing
read-only snapshots — so the very same desktop logic backs the browser, with no
duplicated control flow.
bridge in ``gui/controllers/web_controller.py`` implements this protocol by
dispatching actions to the shared GUI controllers and exposing read-only
snapshots. The same controller methods serve desktop buttons and the browser.
"""
from __future__ import annotations
@@ -57,8 +56,12 @@ class WebController(Protocol):
def remove_last_measurement(self) -> None:
"""Remove the most recent measurement (the desktop button)."""
def clear_history(self) -> None:
"""Clear all runtime measurements (the desktop button)."""
def apply_live_settings(self, fields: dict) -> list:
"""Apply live processor settings; returns the current settings schema."""
...
def load_config(self, name: str) -> None:
"""Load a run-config profile by file name (the desktop "Load Config" button)."""
@@ -67,19 +70,25 @@ class WebController(Protocol):
"""Save up to 1000 recent measurements to ``path``/``name``."""
def select_combo(self, input_pos: int, output_pos: int) -> None:
"""Select the matrix B-scan input/output pair shown by the desktop."""
"""Select the B-scan input/output pair shown by the desktop."""
def next_combo(self) -> None:
"""Advance the matrix B-scan display to the next input/output pair."""
"""Advance the B-scan display to the next available input/output pair."""
def current_live_settings(self) -> list:
"""Return the live-settings schema (built from the Qt widgets)."""
...
def list_configs(self) -> list[str]:
"""Return the run-config file names available to load."""
...
def status(self) -> dict:
"""Return a snapshot of pipeline/run state."""
...
def peek_frame(self) -> dict | None:
"""Return the latest rendered-plot frame (PNG of the Qt plot), or ``None``."""
"""Read a cached PNG frame without rendering or blocking; initially ``None``."""
def set_frame_streaming(self, enabled: bool) -> None:
"""Enable plot capture only while at least one WebSocket client is connected."""