mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
Phase 1: extract TRadioController (state + engine ownership)
Decouple MainForm from CAT/Web by introducing a headless core, TRadioController, as the single home for radio state and engine objects. This is groundwork for swappable UIs, a daemon (Web-only) mode, and a future hardware control panel — each becomes a frontend/adapter over the same controller API. RadioController.pas (new): - Radio state + engine objects (Network/DSP/Audio/Settings/Channels) as public fields named exactly as in MainForm, so wiring is mechanical. - Command API: absolute Set* plus relative *By/Up/Down (for encoders). - OnStateChanged(field) notifications and GetSnapshot for frontend sync. - Invoke/OnInvoke (TUIInvokeEvent) thread-marshalling seam (GUI uses TThread.Synchronize; daemon supplies its own). - Commands are scaffolding for now (update field + fire event); engine logic stays in MainForm and migrates in later phases (TODO-wiring). MainForm.pas: - Owns FController; creates it first in FormCreate, frees it last in FormDestroy. Engines are still created/freed by MainForm into the controller's fields (ownership move is a later phase). - ~1400 FXxx references redirected to FController.FXxx (implementation only); dead field declarations removed from the interface. No behavioral change — pure state relocation. Builds clean (cocoa). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
261b3190b8
commit
63eb2c701f
+1425
-1472
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user