mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
Phase 5: fill SetBand as a real band-by-index command
SetBand was a skeleton (FCurrentBand := Idx + Changed), leaving BandUp/BandDown non-functional. Fill it with the band-change logic (XVTR-exit + persist + restore) that WebAdapter.SyncBand had inline; SyncBand now just calls FController.SetBand. Gives CAT band up/down/by-index a controller command to call (Phase 4) instead of routing through the web adapter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0a0a5c455e
commit
daee5672a9
+14
-1
@@ -1545,7 +1545,20 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRadioController.SetBand(Idx: Integer);
|
||||
begin FCurrentBand := Idx; Changed(rfBand); { TODO wiring: RestoreBand } end;
|
||||
// Смена HF-диапазона по индексу (web/CAT/BandUp-Down). Выход из XVTR (если активен),
|
||||
// персист покидаемого, restore нового. Полная команда — не трогает UI.
|
||||
begin
|
||||
if (Idx < 0) or (Idx >= CFG_BAND_COUNT) then Exit;
|
||||
if FCurrentXvtr >= 0 then
|
||||
begin
|
||||
DeactivateXvtr; // выход в HF (HF-возврат внутри)
|
||||
if Idx = FCurrentBand then Exit;
|
||||
end
|
||||
else if Idx = FCurrentBand then Exit;
|
||||
if FDevConnected then begin SaveCurrentBand; FSettings.Save; end;
|
||||
FCurrentBand := Idx;
|
||||
RestoreBand(Idx);
|
||||
end;
|
||||
|
||||
procedure TRadioController.BandUp;
|
||||
begin if FCurrentBand < CFG_BAND_COUNT - 1 then SetBand(FCurrentBand + 1); end;
|
||||
|
||||
Reference in New Issue
Block a user