feat: Yaesu panel — sideband on re-click, split readout, one-touch up 1/up 5
Three corrections from the operator's second pass. The sideband gesture was wrong: I used double-click, which hides the action. Clicking a button that is ALREADY active now flips its sideband — CW-U → CW-L → CW-U. One button, one finger, nothing to discover. A lit SPLIT chip does not tell an operator anything useful: it says split is on, not where they transmit. The header now shows the TX frequency and the offset in kHz whenever split is active. And the offset that matters is set in one action: up 1 kHz on CW, up 5 kHz on phone. Doing it by hand means swapping VFOs, retuning and swapping back — exactly the fumbling a panel exists to remove. Both are offered rather than picked from the mode, because which one is idiomatic is the operator's call, and the button turns split on at the same time. The offset is measured from the RECEIVE frequency and written to the VFO we are not listening on, so it stays correct when the operator works on VFO B, where the roles are mirrored.
This commit is contained in:
+12
-3
@@ -93,8 +93,9 @@ type Yaesu struct {
|
||||
// off rather than invented.
|
||||
splitCmd string
|
||||
|
||||
curFreq int64
|
||||
curVFO string // "A" or "B"
|
||||
curFreq int64
|
||||
curRXFreq int64
|
||||
curVFO string // "A" or "B"
|
||||
|
||||
// Control-panel state and its slow-beat counter — see yaesu_panel.go.
|
||||
panel YaesuTXState
|
||||
@@ -210,6 +211,12 @@ func (y *Yaesu) ReadState() (RigState, error) {
|
||||
s.Vfo = vfo
|
||||
s.FreqHz, s.RxFreqHz, s.Split = resolveYaesuVFOs(freqA, freqB, vfo, split)
|
||||
y.curFreq = s.FreqHz
|
||||
// The frequency being LISTENED to, which is what a split offset is measured
|
||||
// from — under split that is RxFreqHz, not FreqHz.
|
||||
y.curRXFreq = s.FreqHz
|
||||
if s.Split && s.RxFreqHz > 0 {
|
||||
y.curRXFreq = s.RxFreqHz
|
||||
}
|
||||
|
||||
if r, err := y.ask("MD0;"); err == nil && len(r) >= 4 {
|
||||
// Keep the RAW mode too: ADIF folds CW-U/CW-L and DATA-U/DATA-L together,
|
||||
@@ -224,7 +231,9 @@ func (y *Yaesu) ReadState() (RigState, error) {
|
||||
debugLog.Printf("yaesu: unknown mode reply %q", r)
|
||||
}
|
||||
}
|
||||
y.readPanel(s.Mode, s.Split)
|
||||
// s.FreqHz is the TX frequency by the ADIF convention, so it IS the split
|
||||
// transmit frequency when split is on.
|
||||
y.readPanel(s.Mode, s.Split, s.FreqHz)
|
||||
return s, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user