feat(omnirig): say which of its two CW bits means CW on this rig
Reported on an IC-7610 shared through OmniRig: clicking a CW spot put the radio in CW-R every time, and the only way out was to edit the OmniRig rig file by hand. OmniRig's model has two CW modes, PM_CW_U and PM_CW_L, and nothing in it says which one an .ini calls plain CW. Icom rig files disagree with each other — on some PM_CW_U is CI-V mode 0x03 (CW), on others 0x07 (CW-R) — so asking for "CW" is a question with two right answers and OpsLog was only ever giving one of them. Settings ▸ CAT ▸ OmniRig now carries the answer for THIS rig, and it is pushed to a radio that is already connected rather than waiting for a reconnect: which bit a mode maps to is not worth dropping the link, and with it WSJT-X's rigctl session. Same shape as the Yaesu RTTY sideband, for the same reason. Nothing changes for anyone whose rig file already agrees with us. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
@@ -1145,6 +1145,23 @@ func (m *Manager) YaesuDo(fn func(YaesuController) error) error {
|
||||
})
|
||||
}
|
||||
|
||||
// OmniRigController is the handful of OmniRig preferences that can be changed
|
||||
// without dropping the rig link.
|
||||
type OmniRigController interface {
|
||||
SetCWLower(bool) // which of OmniRig's two CW bits means plain CW
|
||||
}
|
||||
|
||||
// OmniRigDo dispatches an OmniRig preference onto the CAT goroutine.
|
||||
func (m *Manager) OmniRigDo(fn func(OmniRigController) error) error {
|
||||
return m.exec(func(b Backend) error {
|
||||
oc, ok := b.(OmniRigController)
|
||||
if !ok {
|
||||
return fmt.Errorf("active CAT backend is not OmniRig")
|
||||
}
|
||||
return fn(oc)
|
||||
})
|
||||
}
|
||||
|
||||
// KenwoodController is the Kenwood/Elecraft CW-over-CAT capability (the KY keyer),
|
||||
// so a K3 can key CW through its single CAT link instead of a second COM port.
|
||||
type KenwoodController interface {
|
||||
|
||||
Reference in New Issue
Block a user