Phase 3 (batch 4): route RX step attenuator through controller

SetAtten clamps, applies to the network (SetStepAtten), and fires
OnStateChanged; SyncWebAttn calls it. No desktop widget exists for the
attenuator, so there's no OnControllerState case — but state and the web
snapshot now flow through the single command path like everything else.

Builds clean (cocoa).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Uladzimir Karpenka
2026-06-04 15:00:04 +03:00
co-authored by Claude Opus 4.8
parent b3e4360a5d
commit ad21516d48
2 changed files with 7 additions and 3 deletions
+1 -2
View File
@@ -6638,8 +6638,7 @@ end;
procedure TMainForm.SyncWebAttn;
begin
FController.FAtten := Max(0, Min(2, FWebSyncInt));
FController.FNetwork.SetStepAtten(FController.FAtten * 10);
FController.SetAtten(FWebSyncInt);
end;
procedure TMainForm.WebOnFMStep(Idx: Integer);
+6 -1
View File
@@ -442,7 +442,12 @@ procedure TRadioController.DriveBy(Delta: Integer);
begin SetDrive(FDrivePercent + Delta); end;
procedure TRadioController.SetAtten(Idx: Integer);
begin FAtten := Idx; Changed(rfAtten); { TODO wiring } end;
begin
if Idx < 0 then Idx := 0 else if Idx > 2 then Idx := 2;
FAtten := Idx;
if Assigned(FNetwork) then FNetwork.SetStepAtten(FAtten * 10);
Changed(rfAtten);
end;
procedure TRadioController.SetBand(Idx: Integer);
begin FCurrentBand := Idx; Changed(rfBand); { TODO wiring: RestoreBand } end;