fix: CI-V address 00, simplex uploaded as split, and S/F spots
Three field reports. Icom CI-V address 00 could not be kept: zero was read as "not configured" in all three places that validate it, so every save put the rig back to the IC-7610's 0x98 — and the model dropdown followed, since it is derived from the address rather than stored. Picking "Other (custom address)" also had no effect of its own: the list re-derived itself and snapped back to whatever rig matched. It now stays chosen. Cloudlog/Wavelog showed "17m/17m" on ordinary FT8 contacts (OE6CLD). Every QSO is stamped with a receive side equal to the transmit side, and the uploaded record carried it; Wavelog draws band/band_rx whenever both are there. In ADIF an absent BAND_RX means "same as transmit", so the uploaded record now writes the receive side only when it differs. The copy forwarded to another logger over UDP keeps writing it in full — that is why it was stamped in the first place (Log4OM reads BAND_RX) — through its own ForwardRecordADIF. "S/F" in a spot comment joins superfox / sfox / F-H as FT8.
This commit is contained in:
+16
-1
@@ -10,6 +10,10 @@ import (
|
||||
|
||||
// A contact that was not split still has a receive side, and the record
|
||||
// forwarded to another logger has to carry it: Log4OM reads BAND_RX.
|
||||
//
|
||||
// The record UPLOADED to a service must not: in ADIF an absent BAND_RX means
|
||||
// "same as transmit", and Wavelog shown both draws "17m/17m" on a simplex FT8
|
||||
// contact — reported by OE6CLD, who had never logged a split QSO in his life.
|
||||
func TestFillRXDefaults(t *testing.T) {
|
||||
hz := int64(14074000)
|
||||
q := qso.QSO{Callsign: "F4BPO", Band: "20m", FreqHz: &hz}
|
||||
@@ -22,7 +26,7 @@ func TestFillRXDefaults(t *testing.T) {
|
||||
}
|
||||
// Assert on the RECORD another logger reads, not merely on the struct:
|
||||
// both halves of the receive side have to reach it.
|
||||
rec := strings.ToUpper(adif.SingleRecordADIF(q))
|
||||
rec := strings.ToUpper(adif.ForwardRecordADIF(q))
|
||||
if !strings.Contains(rec, "<BAND_RX:3>20M") {
|
||||
t.Errorf("BAND_RX missing from the forwarded record:\n%s", rec)
|
||||
}
|
||||
@@ -40,3 +44,14 @@ func TestFillRXDefaultsKeepsSplit(t *testing.T) {
|
||||
t.Errorf("split QSO was overwritten: band_rx=%q freq_rx=%v", q.BandRX, q.FreqRXHz)
|
||||
}
|
||||
}
|
||||
|
||||
// A genuine split contact is uploaded AS split: the rule above is about a
|
||||
// receive side that repeats the transmit side, not about dropping one.
|
||||
func TestSplitIsUploadedWithItsReceiveSide(t *testing.T) {
|
||||
tx, rx := int64(14195000), int64(18100000)
|
||||
q := qso.QSO{Callsign: "F4BPO", Band: "20m", BandRX: "17m", FreqHz: &tx, FreqRXHz: &rx}
|
||||
up := strings.ToUpper(adif.SingleRecordADIF(q))
|
||||
if !strings.Contains(up, "<BAND_RX:3>17M") || !strings.Contains(up, "<FREQ_RX:9>18.100000") {
|
||||
t.Errorf("a cross-band contact lost its receive side:\n%s", up)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user