chore: release v0.22.9

This commit is contained in:
2026-08-02 06:40:10 +02:00
parent 296a4a55c0
commit f6cd6e999a
38 changed files with 1308 additions and 297 deletions
+11 -1
View File
@@ -61,6 +61,7 @@ type Status struct {
FwdDbm float64 `json:"fwd_dbm"` // forward power [dBm], as reported
FwdW float64 `json:"fwd_w"` // forward power [W], derived from dBm
PeakW float64 `json:"peak_w"` // the device's own peak forward power [W] — what the meters show
SwrDb float64 `json:"swr_db"` // return loss [dB] as reported (negative = good match)
Vswr float64 `json:"vswr"` // VSWR ratio, derived from swr_db (1.0 = perfect)
@@ -405,7 +406,9 @@ func (c *Client) parse(resp string) {
if !strings.HasPrefix(data, "status") {
return
}
if data != c.lastRaw {
// One raw frame per session is enough to verify field alignment — the
// frames carry live meter values, so "log on change" logged every frame.
if c.lastRaw == "" {
c.lastRaw = data
applog.Printf("tunergenius: status raw=%q", data)
}
@@ -439,6 +442,13 @@ func (c *Client) applyStatus(data string) {
c.status.FwdDbm = v
c.status.FwdW = dbmToWatts(v)
}
// The device's OWN peak detector. A poll samples one instant of the envelope,
// so on SSB the plain "fwd" figure lands between syllables as often as on a
// peak — the widget read a few hundred watts on a kilowatt transmission. This
// is the number to display.
if v, ok := parseFloat(kv["peak"]); ok {
c.status.PeakW = dbmToWatts(v)
}
if v, ok := parseFloat(kv["swr"]); ok {
c.status.SwrDb = v
c.status.Vswr = returnLossToVswr(v)