mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 19:45:09 +00:00
Save/restore CTun, AGC, FM step per XVTR slot; add FM step to web
- Add LastCTun, LastAGCMode, LastAGCTop to TXvtrEntry; SaveCurrentBand now captures all three in the XVTR branch; ActivateXvtrBand restores them on slot switch/startup (previously CTun was always reset to False and AGC was never saved/restored for XVTR) - WebServer: expose fmstep_idx in state JSON so web clients sync the FM step from desktop state - WebPageHtml: swap stepSel options to FM steps (6.25k/12.5k/20k/25k) when mode=FM, restore HF steps when leaving FM; syncs fmstep_idx from server on connect and mode change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,9 @@ type
|
||||
LastCTCSSToneIdx: Integer;
|
||||
LastFMStepOn: Boolean;
|
||||
LastFMStepIdx: Integer;
|
||||
LastCTun: Boolean;
|
||||
LastAGCMode: Integer;
|
||||
LastAGCTop: Integer;
|
||||
end;
|
||||
|
||||
TXvtrSettings = record
|
||||
@@ -1121,6 +1124,9 @@ begin
|
||||
X.Entries[i].LastCTCSSToneIdx := 0;
|
||||
X.Entries[i].LastFMStepOn := True;
|
||||
X.Entries[i].LastFMStepIdx := 3; // 25 kHz
|
||||
X.Entries[i].LastCTun := False;
|
||||
X.Entries[i].LastAGCMode := 1;
|
||||
X.Entries[i].LastAGCTop := 90;
|
||||
end;
|
||||
// Шаблоны (пользователь должен сам Enable, чтобы трансверторы появились)
|
||||
X.Entries[0].ButtonText := '2m';
|
||||
@@ -1174,6 +1180,9 @@ begin
|
||||
X.Entries[i].LastCTCSSToneIdx := EnsureRange(JI(EObj, 'last_ctcss_idx', X.Entries[i].LastCTCSSToneIdx), 0, 37);
|
||||
X.Entries[i].LastFMStepOn := JB(EObj, 'last_fmstep_on', X.Entries[i].LastFMStepOn);
|
||||
X.Entries[i].LastFMStepIdx := EnsureRange(JI(EObj, 'last_fmstep_idx', X.Entries[i].LastFMStepIdx), 0, 3);
|
||||
X.Entries[i].LastCTun := JB(EObj, 'last_ctun', X.Entries[i].LastCTun);
|
||||
X.Entries[i].LastAGCMode := EnsureRange(JI(EObj, 'last_agc_mode', X.Entries[i].LastAGCMode), 0, 4);
|
||||
X.Entries[i].LastAGCTop := EnsureRange(JI(EObj, 'last_agc_top', X.Entries[i].LastAGCTop), 0, 120);
|
||||
// Валидация: LastFreq должен быть в [FreqBegin..FreqEnd]
|
||||
if (X.Entries[i].LastFreq < X.Entries[i].FreqBegin) or
|
||||
(X.Entries[i].LastFreq > X.Entries[i].FreqEnd) then
|
||||
@@ -1212,6 +1221,9 @@ begin
|
||||
JW(EObj, 'last_ctcss_idx',X.Entries[i].LastCTCSSToneIdx);
|
||||
JW(EObj, 'last_fmstep_on', X.Entries[i].LastFMStepOn);
|
||||
JW(EObj, 'last_fmstep_idx',X.Entries[i].LastFMStepIdx);
|
||||
JW(EObj, 'last_ctun', X.Entries[i].LastCTun);
|
||||
JW(EObj, 'last_agc_mode', X.Entries[i].LastAGCMode);
|
||||
JW(EObj, 'last_agc_top', X.Entries[i].LastAGCTop);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user