Phase 5 (D2): move spectrum/waterfall raw frames into the controller

OnSpectrumReady/OnWaterfallReady move into TRadioController. The controller now
owns the last spectrum/waterfall frame (FSpectrumBuf/FWaterfallBuf) for the web
mirror and emits raw pixels via OnSpectrumData/OnWaterfallData. MainForm
subscribes for FSpecView rendering (+ waterfall scroll decimation, a UI concern).
TWebAdapter.PushState now reads the frame from the controller (no buffer params).
Behavior-preserving; removes the last spectrum/waterfall data-path coupling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Uladzimir Karpenka
2026-06-09 14:46:39 +03:00
co-authored by Claude Opus 4.8
parent 7c8fd298ae
commit f122079b83
6 changed files with 620 additions and 36 deletions
+7 -6
View File
@@ -109,9 +109,10 @@ type
Count: Integer): Boolean;
// Исходящее зеркало: периодический снимок состояния + спектр/водопад в web.
// Зовётся хозяином из GUI-таймера (буферы пикселей — у хозяина, остальное из
// FController). Сервер сам гейтит по FRunning и шлёт активным клиентам.
procedure PushState(const ASpec, AWf: array of Single);
// Зовётся хозяином из GUI-таймера; всё (включая последний кадр спектра/
// водопада) читается из FController. Сервер сам гейтит по FRunning и шлёт
// активным клиентам.
procedure PushState;
end;
implementation
@@ -384,7 +385,7 @@ end;
// ── Исходящее зеркало состояния ──────────────────────────────────────────────
procedure TWebAdapter.PushState(const ASpec, AWf: array of Single);
procedure TWebAdapter.PushState;
var
StatusText, BoardText, IPText, SupplyText: string;
PLLText, RXText, TXText, SeqText: string;
@@ -441,8 +442,8 @@ begin
SeqText := 'SEQ --';
FServer.PushSpectrum(
ASpec, 1024,
AWf,
FController.FSpectrumBuf, 1024,
FController.FWaterfallBuf,
FController.FLastSMeter,
FController.FVfoA, FController.FMode, FController.FFilterBW, FController.FAGCMode, FController.FAGCTop,
FController.FSpanHz, FController.FVolume,