fix(flex): the split chaser could never read its own switch

GetFlexRSTChase read settings.Get with profileScope() prepended, but the
store already prefixes the active profile: it wrote p3.flex.rst_chase and
read p3.p3.flex.rst_chase. The switch went on in the UI, was saved, and
came back off on the next spot -- so the feature did nothing, silently.

Every refusal after a marker is recognised is now logged with its reason.
The operator has just seen a report marked on the panadapter; if the
slice does not move, the log has to say what stopped it.
This commit is contained in:
2026-08-23 18:52:57 +02:00
parent 2dd68da284
commit 4fb013701b
2 changed files with 14 additions and 3 deletions
+10 -1
View File
@@ -80,7 +80,11 @@ func (a *App) GetFlexRSTChase() FlexRSTChase {
if a.settings == nil {
return s
}
if v, _ := a.settings.Get(a.ctx, a.profileScope()+keyFlexRSTChase); strings.TrimSpace(v) != "" {
// settingOr, NOT settings.Get with profileScope(): the store already applies
// the active profile's prefix, so scoping the key here wrote p3.flex.rst_chase
// and read p3.p3.flex.rst_chase — the switch could never be read back on, and
// the feature did nothing at all with no sign of why.
if v := a.settingOr(keyFlexRSTChase, ""); strings.TrimSpace(v) != "" {
_ = json.Unmarshal([]byte(v), &s)
}
return normRSTChase(s)
@@ -142,7 +146,12 @@ func (a *App) handleForeignSpot(callsign string, freqHz int64) {
if !rstChaseMarkerSet(cfg.Markers)[strings.ToUpper(strings.TrimSpace(callsign))] {
return // an ordinary spot: another station's callsign, not a report
}
// From here on every refusal is logged. A marker WAS recognised, so the
// operator is entitled to know why the slice stayed where it was — silence
// at this point is indistinguishable from a feature that does not work.
if cfg.SplitOnly && !a.cat.State().Split {
applog.Printf("rst chase: %s marked at %s, but the radio is not in split — ignored",
strings.ToUpper(callsign), hzText(freqHz))
return
}
target := freqHz + int64(cfg.OffsetHz)