diff --git a/internal/cat/yaesu.go b/internal/cat/yaesu.go index 6a2a946..8ba3415 100644 --- a/internal/cat/yaesu.go +++ b/internal/cat/yaesu.go @@ -104,8 +104,9 @@ 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 + // metersLogged counts the RM1..RM6 samples taken during transmission, so the + // survey follows a real carrier instead of catching one instant of it. + metersLogged int } func NewYaesu(portName string, baud int, digital string) *Yaesu { diff --git a/internal/cat/yaesu_panel.go b/internal/cat/yaesu_panel.go index 07ab58a..daacc15 100644 --- a/internal/cat/yaesu_panel.go +++ b/internal/cat/yaesu_panel.go @@ -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)