mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
eb10283c850d8ea598c9817afac82a4bef9fca43
The "set VFO B" engine block was duplicated inline across three tune paths (DoSpectrumClick, DoSpectrumDrag, FreqDispBChanged), each subtly different (drag had no band-detect/ruler; click had no drive recalc). - TRadioController.SetVfoB(Hz): always stores FVfoB; when B is the active VFO, retunes the receiver (DDC=VFO B, no CTUN, shift 0), HF band-detects (FCurrentBand + drive recalc -> Changed(rfBand)) and pushes to the radio; when B is inactive (split, listening on A) it only stores the freq for TX. Fires Changed(rfVfoB). - OnControllerState(rfVfoB): renders FreqDispB and, when B active, the spectrum/ruler (deferred via FSpectrumDirty, matching the rfVfoA path). The three call sites collapse to a single FController.SetVfoB(...) each; FreqDispBChanged is now a one-liner. Behavior unified: click/FreqDispB drop from sync DrawSpectrum to deferred (consistent with VFO A click-to-tune, imperceptible); drag gains band-detect + ruler refresh; click gains drive recalc on band change. Net -23 lines. Left inline (not identical): DoWidebandClick VFO B (extra XVTR clamp + wideband-specific render) and SyncWebFreq (uses SetRunAndFreq, the web/run network path, not UpdateState+SendFullHP). Builds clean, links. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Languages
Pascal
96.4%
Python
2.9%
Shell
0.6%