fix: Yaesu mode commands always addressed the main receiver
Reported, and reasoned out from the half that already worked: a spot click now tunes the right VFO, but it set the mode with MD0 — main — whatever VFO the operator was on. Working from SUB, the spot changed the mode of the VFO NOT in use and left the one in use as it was. The author inferred the sub half from seeing main change, and was right. The read had the same fault, so the console displayed main's mode while showing the sub VFO's frequency. Mode now addresses the receiver in use — MD0 for main, MD1 for sub — in the poll read, in SetMode, and in the console's raw-mode setter. A rig without a sub receiver never sees MD1: curVFO only becomes B where the rig reports its receive VFO in the first place.
This commit is contained in:
@@ -430,7 +430,9 @@ func (y *Yaesu) SetYaesuModeRaw(name string) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("yaesu: unknown rig mode %q", name)
|
||||
}
|
||||
return y.setAndRefresh(fmt.Sprintf("MD0%c;", d))
|
||||
// Same receiver as everywhere else — the console must not set main's mode
|
||||
// while the operator is working the sub VFO.
|
||||
return y.setAndRefresh(fmt.Sprintf("MD%s%c;", y.modeVFOSuffix(), d))
|
||||
}
|
||||
|
||||
// yaesuRawModeDigit maps a rig-mode name to its MD digit.
|
||||
|
||||
Reference in New Issue
Block a user