fix(bandopen): the watch switch now gates the detector
"Watch for band openings" only ever governed the extra DATA SOURCES — the RBN nodes and the PSK Reporter feed. The detector itself ran on every ordinary cluster spot regardless, so an operator who had never enabled the watch still got 10 m and 6 m opening banners from a feature he had deliberately left off. The flag is cached on bandOpenState rather than read per spot: this is the cluster hot path, where a settings query per spot is exactly what the rest of this file avoids. startBandOpenFeed owns it, and it already runs at startup and on every save, so the switch takes effect without a restart. Switching it off also clears the live badges and the accumulated spot window. The badges only fade on a timer fed by spots the detector no longer looks at, so they would otherwise hang there until the next restart; and dropping the window means switching back on starts from what is on the air rather than from an hour-old burst. The remembered openings are kept — those really happened.
This commit is contained in:
@@ -126,7 +126,13 @@ func (a *App) startBandOpenFeed() {
|
||||
a.pskr = nil
|
||||
}
|
||||
s := a.GetBandOpenSettings()
|
||||
a.bandOpen.on.Store(s.Enabled)
|
||||
if !s.Enabled {
|
||||
// Put out whatever is currently lit. Leaving the badges up would keep
|
||||
// announcing an opening from a watch that is now off, and they only fade
|
||||
// on a timer fed by spots this path no longer looks at — so they would
|
||||
// hang there until the app restarted.
|
||||
a.clearBandOpenings()
|
||||
return
|
||||
}
|
||||
// Every spot is measured from the operator's position. Without one there is
|
||||
|
||||
Reference in New Issue
Block a user