chore: sample the Yaesu meters throughout a transmission, not at its start

The one-shot survey fired as the transmission began and caught the meters still
at rest — RM4=13 and everything else zero, which identifies nothing. And the
operator's reading points the other way: the bar showing 81 tracks his 100 W,
while the one labelled power sat at 8.

What names a meter is which index FOLLOWS the power over a few seconds of steady
carrier, so the survey now samples on every poll while transmitting, capped at a
dozen lines. Two seconds of tune will settle it.

Still not guessing at the mapping: the numbers will say which index is power and
which is SWR on this radio, and it gets corrected then.
This commit is contained in:
2026-07-29 13:38:09 +02:00
parent 48d92ff547
commit a89c6e0df8
2 changed files with 9 additions and 4 deletions
+6 -2
View File
@@ -128,8 +128,12 @@ func (y *Yaesu) readPanel(mode string, split bool, txHz int64) {
// 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
// Sampled on EVERY poll while transmitting, capped — one snapshot taken as
// the transmission starts catches the meters still at rest (RM4=13, the
// rest zero), which says nothing. What identifies a meter is which index
// TRACKS the power over a few seconds of steady carrier.
if y.metersLogged < 12 {
y.metersLogged++
raw := make([]string, 0, 6)
for i := 1; i <= 6; i++ {
cmd := fmt.Sprintf("RM%d;", i)