feat: follow the SUB VFO over OmniRig; distance column in the QSO grids
OmniRig reports the VFO pair (AA/AB/BA/BB) on the whole Yaesu range and never the single-letter form. Only the latter was honoured, so every rig in that family stayed pinned to VFO A: pressing SUB moved the radio but not OpsLog, and a QSO worked on SUB was logged on the main VFO's frequency. The first letter of the pair is the VFO being listened on — Log4OM reads it and gets the right frequency on the same rigs, which is what showed the data was there. The enum now wins over the Yaesu Freq==FreqB inference, which is only a fallback for a rig file that names no VFO at all (the stock FTDX10 one answers neither VS; nor FR; usably — verified on the air). Split: the ON flag is still latched to survive a rig file that flips it on its own, but the latch is now ARMED only after 8 flips in 30 s. A first cut at 3-in-15s was armed by the operator toggling split while testing, imposing the 6 s clearing delay on a radio that did not need it; a misreading file flips a dozen times in that window untouched, so the two cases separate cleanly. Distance (km) column added to Recent QSOs and Worked before (shared catalog). Computed from the QSO's OWN my_grid/my_lat/lon first, falling back to the current profile's locator: a log spans years and portable outings, so the station a QSO was made from is not necessarily today's. Locator: a precise QRZ/HamQTH grid is no longer overwritten by the cty.dat entity centroid. The lookup runs several times per QSO and the provider gets 2 s; a slow second answer fell back to cty.dat and downgraded JN05JG to JN16 while name and QTH survived (they are only written when non-empty). The OmniRig diagnostic line now logs what OpsLog concluded, not just what OmniRig reported. icomnet.go: gofmt alignment only.
This commit is contained in:
@@ -98,8 +98,8 @@ type icomNet struct {
|
||||
vTracked uint16
|
||||
vCivSeq uint16
|
||||
|
||||
rx chan []byte // CI-V byte chunks from civPump → Read (control replies)
|
||||
scopeRx chan []byte // scope (0x27) frames, kept off rx so the panadapter
|
||||
rx chan []byte // CI-V byte chunks from civPump → Read (control replies)
|
||||
scopeRx chan []byte // scope (0x27) frames, kept off rx so the panadapter
|
||||
// stream can't crowd control replies out (→ ScopeChan)
|
||||
leftover []byte // partial chunk not yet returned by Read (Read-only)
|
||||
readTO time.Duration // Read timeout (SetReadTimeout)
|
||||
@@ -114,11 +114,11 @@ type icomNet struct {
|
||||
// login token every ~45 s. The rig invalidates the session ~2 min after login
|
||||
// without renewal (this was the "loses control after 2 min" drop — RS-BA1/the
|
||||
// Remote Utility renew too). Owned solely by ctrlPump after dial → no lock.
|
||||
cTracked uint16 // control-stream tracked seq (continues after dial)
|
||||
cAuthSeq uint16 // token-packet innerseq
|
||||
cToken uint32 // login token (opaque, echoed back verbatim)
|
||||
cTokReq uint16 // token-request id (echoed)
|
||||
cSentBuf map[uint16][]byte // control-stream retransmit buffer (token renewals)
|
||||
cTracked uint16 // control-stream tracked seq (continues after dial)
|
||||
cAuthSeq uint16 // token-packet innerseq
|
||||
cToken uint32 // login token (opaque, echoed back verbatim)
|
||||
cTokReq uint16 // token-request id (echoed)
|
||||
cSentBuf map[uint16][]byte // control-stream retransmit buffer (token renewals)
|
||||
|
||||
// Receive-side retransmit (CI-V stream): track the rig's data-packet send seq
|
||||
// and ask it to resend any gap. Under the scope stream, UDP drops are common;
|
||||
@@ -844,8 +844,8 @@ func icnConnInfo(seq, innerSeq, tokReq uint16, sentid, rcvdid, token uint32, use
|
||||
copy(b[0x60:0x70], icnPasscode(user))
|
||||
b[0x70] = rxEnable // rxenable: 1 opens the 50003 RX audio stream, 0 = CI-V only
|
||||
b[0x71] = 0x00 // txenable (Phase 5)
|
||||
b[0x72] = 0x10 // rxcodec
|
||||
b[0x73] = 0x04 // txcodec
|
||||
b[0x72] = 0x10 // rxcodec
|
||||
b[0x73] = 0x04 // txcodec
|
||||
icnBE.PutUint32(b[0x74:], 16000)
|
||||
icnBE.PutUint32(b[0x78:], 8000)
|
||||
icnBE.PutUint32(b[0x7c:], uint32(civPort))
|
||||
|
||||
Reference in New Issue
Block a user