fix: OmniRig reads VFO A first (FreqA→Freq fallback), fixing IC-7610 CAT
The 7610-only FreqA gate broke CAT on the 7610 when FreqA was momentarily 0. Match DXHunter/WSJT-X: read FreqA first for all rigs, fall back to the generic Freq (IC-9100 etc.), then FreqB. OmniRig's generic Freq maps to VFO B on the 7610, which is why keying off FreqA is correct.
This commit is contained in:
+11
-22
@@ -87,14 +87,6 @@ func (o *OmniRig) Connect() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// isIC7610 reports whether the connected rig is an IC-7610. OmniRig's generic
|
||||
// Freq property reads the wrong VFO on the 7610 (its Main/Sub model confuses the
|
||||
// stock ini), so we read VFO A explicitly for it instead — matching what Log4OM
|
||||
// shows.
|
||||
func (o *OmniRig) isIC7610() bool {
|
||||
return strings.Contains(strings.ToUpper(o.rigType), "7610")
|
||||
}
|
||||
|
||||
func (o *OmniRig) Disconnect() {
|
||||
if o.rig != nil {
|
||||
o.rig.Release()
|
||||
@@ -204,23 +196,20 @@ func (o *OmniRig) ReadState() (RigState, error) {
|
||||
s.FreqHz, s.RxFreqHz = freqB, freqA
|
||||
}
|
||||
} else {
|
||||
// Simplex: the operating frequency is OmniRig's generic Freq (the active
|
||||
// VFO), like Log4OM. Fall back to the per-VFO value only if Freq is 0.
|
||||
// Simplex: read VFO A first, fall back to the generic Freq — exactly like
|
||||
// DXHunter/WSJT-X. PM_FREQA rigs (Yaesu, Kenwood) populate FreqA; some
|
||||
// Icoms (IC-9100 etc.) only populate the generic Freq. On the IC-7610
|
||||
// OmniRig's generic Freq reports VFO B (its Main/Sub model confuses the
|
||||
// stock ini), so keying off FreqA gives the operator the VFO they expect.
|
||||
s.Split = false
|
||||
s.RxFreqHz = 0
|
||||
s.FreqHz = freqMain
|
||||
// IC-7610 quirk: OmniRig's generic Freq reports VFO B (its Main/Sub model
|
||||
// confuses the stock ini), so OpsLog showed the wrong VFO. Read VFO A
|
||||
// explicitly for the 7610 — what the operator actually wants to see.
|
||||
if o.isIC7610() && freqA != 0 {
|
||||
switch {
|
||||
case freqA != 0:
|
||||
s.FreqHz = freqA
|
||||
}
|
||||
if s.FreqHz == 0 {
|
||||
if s.Vfo == "B" || s.Vfo == "BB" {
|
||||
s.FreqHz = freqB
|
||||
} else {
|
||||
s.FreqHz = freqA
|
||||
}
|
||||
case freqMain != 0:
|
||||
s.FreqHz = freqMain
|
||||
default:
|
||||
s.FreqHz = freqB
|
||||
}
|
||||
}
|
||||
return s, nil
|
||||
|
||||
Reference in New Issue
Block a user