fix: IC-7300 (single-scope Icom) blank spectrum scope in center/VFO mode

The multi-frame waveform header (USB path) read the second frequency field
as an absolute high edge, but in center mode it is a span — so high < low and
the panadapter had no valid range to map the trace onto (blank scope). It now
applies the same center+span vs low+high disambiguation the IC-7610 single-
frame path already used. FIXED mode was unaffected.

Also stamps changelog 0.20.10 with today's date.
This commit is contained in:
2026-07-23 14:21:08 +02:00
parent 2823f3e401
commit d128dabc19
2 changed files with 22 additions and 6 deletions
+17 -3
View File
@@ -661,9 +661,23 @@ func (b *IcomSerial) scopeLoop(spec chan civ.Decoded, done chan struct{}) {
if seq == 1 { // header frame — begins a new sweep, no waveform data
regions = make(map[byte][]byte)
total = tot
if len(region) >= 11 { // [info][low 5][high 5]
low := civ.BCDToFreq(region[1:6])
high := civ.BCDToFreq(region[6:11])
if len(region) >= 11 { // [info][freq1 5-BCD][freq2 5-BCD]
// Same center/fixed disambiguation as the single-frame (net) path:
// FIXED sends [low-edge][high-edge] (both absolute), CENTER sends
// [center][span]. Tell them apart by magnitude — a second value
// BIGGER than the first is a real high edge; a smaller one is a
// span. Without this, an IC-7300 in center (VFO-following) mode set
// high = span (e.g. 100 kHz), so high < low and the panadapter had
// no valid range to map the trace onto → blank scope. FIXED mode
// parsed fine, which is why only center mode was broken.
v1 := civ.BCDToFreq(region[1:6])
v2 := civ.BCDToFreq(region[6:11])
var low, high int64
if v2 > v1 {
low, high = v1, v2 // absolute low/high edges (fixed)
} else {
low, high = v1-v2/2, v1+v2/2 // centre + span (centre-on-VFO)
}
b.scopeMu.Lock()
b.scopeLow, b.scopeHigh = low, high
b.scopeMu.Unlock()