From 2ab1f4f9acf7412e7852dcbb61147d258b1b1a60 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Fri, 19 Jun 2026 21:31:38 +0300 Subject: [PATCH] fix: restore per-band FM settings on startup (SQL/CTCSS/step/repeater) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Settings.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Settings.pas b/Settings.pas index 6db72e2..2418d1d 100644 --- a/Settings.pas +++ b/Settings.pas @@ -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;