mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
908c02d08ae3dae5afa2e5d73ef09237f90cc5a2
ApplyVfoA is the keystone of the heavy class — click-to-tune, drag, wheel, web freq and RestoreBand all funnel through it, and it was the most UI-coupled method. Split per the long-standing plan: pure frequency engine into the controller, channel orchestration + render left in UI. - TRadioController.CalcDriveByte: moved verbatim (it was already pure over controller state — reads only band/xvtr cal, TUN/drive%, PA max, no widgets). MainForm.CalcDriveByte is now a thin delegate (17 call sites unchanged). Needed by SetVfoA's band-detect. - TRadioController.SetVfoA(Hz): XVTR clamp, FVfoA, CTUN shift/center with filter-edge center-scroll (exposes FLastVfoScrolled for the waterfall), HF band-detect (FCurrentBand + drive recalc -> Changed(rfBand)), FM auto-repeater (UpdateRptAutoState), PushNetworkState, Changed(rfVfoA). TuneActiveBy (the Arduino encoder path) now fully tunes the radio. - PushNetworkState made public (command + UI pre-channel-drive both use it). MainForm: ApplyVfoA is now thin — calls SetVfoA, then the channel-only orchestration (auto-CTCSS reset, pre-channel drive restore via TrkDrive widget + re-push), then CheckChannelActive. The auto-RPT reset block was dropped: SetVfoA's UpdateRptAutoState already yields the same net state and running it after SetVfoA would have wrongly cleared a freshly auto-set MINUS (ordering hazard the memory flagged). Render (FreqDispA, spectrum, ruler, band buttons) moved to OnControllerState(rfVfoA/rfBand), so every caller — encoder/web/CAT included — updates the display for free. Builds clean, links. Click-to-tune/drag/wheel/band still go through this path; VfoB / ActiveVfo / Band(RestoreBand) / Xvtr still pending. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…
…
…
Languages
Pascal
96.4%
Python
2.9%
Shell
0.6%