fix: CW speed drove the wrong keyer; survey the meters to find the SWR one

Speed: with DTR/RTS line keying the PC does the timing, so the Yaesu console's
slider — which sets the rig's internal keyer — changed nothing audible and looked
broken. Both entry points now go through one handler that drives the engine
actually sending, and additionally sets the rig's own keyer whenever a Yaesu is
on CAT, so the radio's front panel shows the same figure.

SWR: an operator reads 80 on the bar with a real SWR of 1.1. That is the shape of
reading the WRONG METER — ALC, say — not of a scaling error, and which RM index
carries which meter is not consistent across the family. Rather than guess again
and move the wrong number somewhere else, the first transmission now logs RM1
through RM6 raw, once. The log will say which index is which on this radio, and
the mapping can then be corrected as a fact.
This commit is contained in:
2026-07-29 13:32:29 +02:00
parent adadb632fa
commit 48d92ff547
5 changed files with 58 additions and 11 deletions
+2
View File
@@ -104,6 +104,8 @@ type Yaesu struct {
panelLoaded bool
// Commands this rig answered "?;" to — asked once, then never again.
unsupported map[string]bool
// metersSurveyed: the one-shot RM1..RM6 dump during the first transmission.
metersSurveyed bool
}
func NewYaesu(portName string, baud int, digital string) *Yaesu {
+20
View File
@@ -121,6 +121,26 @@ func (y *Yaesu) readPanel(mode string, split bool, txHz int64) {
y.panel.SMeter = scale255(v)
}
if y.panel.Transmitting {
// One-shot survey of every meter while transmitting.
//
// Which RM index carries which meter is NOT the same across the family, and
// an operator reported an SWR bar at 80 with a real SWR of 1.1 — the shape
// of reading the wrong index (ALC, say) rather than of a scaling error.
// Guessing again would just move the wrong number; this prints all six
// once, and the log then says which is which on THIS radio.
if !y.metersSurveyed {
y.metersSurveyed = true
raw := make([]string, 0, 6)
for i := 1; i <= 6; i++ {
cmd := fmt.Sprintf("RM%d;", i)
if v, ok := y.askNum(cmd, fmt.Sprintf("RM%d", i), 3); ok {
raw = append(raw, fmt.Sprintf("RM%d=%d", i, v))
} else {
raw = append(raw, fmt.Sprintf("RM%d=-", i))
}
}
debugLog.Printf("yaesu: meters while transmitting: %s (send this if a bar reads wrong)", strings.Join(raw, " "))
}
if v, ok := y.askNum("RM4;", "RM4", 3); ok {
y.panel.PowerMeter = scale255(v)
}