mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
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:
co-authored by
Claude Opus 4.8
parent
b3e4360a5d
commit
ad21516d48
+1
-2
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user