mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
fix: restore per-band FM settings on startup (SQL/CTCSS/step/repeater)
LoadDevice (bulk startup band loader) parsed only freq/mode/filter/AGC/ CTun/center/span and skipped the FM fields, while SaveBand writes them and LoadBand reads them. So FM squelch, CTCSS, step and repeater shift were saved on exit but reset to defaults on the next start (band switching kept working — that path goes through the in-memory band cache, not disk). Added the missing fmsq_on/fmsq_level/ctcss_on/ctcss_idx/fmstep_on/ fmstep_idx/fmrpt_dir/fmrpt_offset reads to LoadDevice, mirroring LoadBand. Affects all backends, not just Pluto. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -714,6 +714,16 @@ begin
|
||||
Bands[i].CTun := JB(BObj,'ctun', Bands[i].CTun);
|
||||
Bands[i].CenterHz := JD(BObj,'center_hz', Bands[i].CenterHz);
|
||||
Bands[i].SpanHz := JD(BObj,'span_hz', Bands[i].SpanHz);
|
||||
// FM squelch / CTCSS / step / repeater — как в LoadBand (раньше пропускались
|
||||
// здесь → на старте сбрасывались в дефолт, хотя SaveBand их пишет).
|
||||
Bands[i].FMSQOn := JB(BObj,'fmsq_on', Bands[i].FMSQOn);
|
||||
Bands[i].FMSQLevel := JI(BObj,'fmsq_level', Bands[i].FMSQLevel);
|
||||
Bands[i].CTCSSOn := JB(BObj,'ctcss_on', Bands[i].CTCSSOn);
|
||||
Bands[i].CTCSSToneIdx := EnsureRange(JI(BObj,'ctcss_idx', Bands[i].CTCSSToneIdx), 0, 37);
|
||||
Bands[i].FMStepOn := JB(BObj,'fmstep_on', Bands[i].FMStepOn);
|
||||
Bands[i].FMStepIdx := EnsureRange(JI(BObj,'fmstep_idx', Bands[i].FMStepIdx), 0, 3);
|
||||
Bands[i].FMRptDir := EnsureRange(JI(BObj,'fmrpt_dir', Bands[i].FMRptDir), 0, 2);
|
||||
Bands[i].FMRptOffsetHz := JD(BObj,'fmrpt_offset', Bands[i].FMRptOffsetHz);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user