Commit Graph
4 Commits
Author SHA1 Message Date
Uladzimir KarpenkaandClaude Opus 4.8 e1ecf947b8 Phase 3 (WA3): move outgoing web state-mirror into the web adapter
The per-tick PushSpectrum mirror (status strings + ~40 state values + spectrum/
waterfall buffers) moves out of SpectrumTimerTick into TWebAdapter.PushState,
which reads FController for everything and takes the pixel buffers as params.
MainForm's timer now just calls FWebAdapter.PushState(FSpectrumBuf, FWaterfallBuf).

Server lifecycle/ownership stays in MainForm for now — it's still driven by the
remaining host-coupled handlers (PushXvtrToWeb, device CRUD); ownership transfer
completes when those move.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:36:01 +03:00
Uladzimir KarpenkaandClaude Opus 4.8 e5a13096dc Phase 3 (WA2b): move web Drive handler into the web adapter
Now that SetDrive is a complete command, the web/CAT Drive handler moves into
TWebAdapter.OnDrive (the one handler WA1 left behind). CAT context SetDriveLevel
repointed to it too.

Makes the channel-power-clear reactive: ChannelController.OnDriveChanged fires on
the rfDrive event and clears FPreChannelPower for any external drive change
(slider/web/encoder), guarded by FRestoringDrive for the unit's own apply/restore.
This removes the imperative ClearPreChannelPower coupling so SetDrive callers need
no channel knowledge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:26:30 +03:00
Uladzimir KarpenkaandClaude Opus 4.8 06fd730ff4 Phase 3 (WA2a): move WebOnMic into the web adapter
WebOnMic only feeds TX mic samples to the controller's WDSP engine
(no UI, thread-safe like the other engine data callbacks), so it moves
verbatim into TWebAdapter.OnMic. FWebServer.OnWebMic now points there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 16:15:52 +03:00
Uladzimir KarpenkaandClaude Opus 4.8 2f8b0bdf48 Phase 3 (WA1): extract web adapter into WebAdapter.pas
Move the pure controller-command web handlers out of MainForm into a
new TWebAdapter (bridge between TWebServer and TRadioController),
marshalling via FController.Invoke so it is daemon-ready.

- 20 handlers moved: Mode/Filter/AGC/AGCTop/Volume/WfAGC/WfNF/Mute/
  NR/NB/SNB/ANF/FreqB/Center/Attn/ActiveVfo/Ctun/MOX/Tun/FMStep +
  ClientActiveChanged. Each calls a controller command directly.
- CAT context (Ctx.Set*) and CATSetFilterIdx repointed to the adapter,
  since CAT reuses these as its command layer.
- Host-dependent handlers (Freq/Band/XvtrBand/Span/Run/Drive/connect/
  disconnect/CRUD/mic) and the outgoing PushSpectrum mirror stay in
  MainForm for now (WA2/WA3); IWebHost is the placeholder seam.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 16:03:49 +03:00