From 6b04072e52aff8e9880646807cd59970c303dded Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 22 Jul 2026 20:36:29 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20clicking=20an=20OpsLog=20spot=20on=20the?= =?UTF-8?q?=20Flex=20panadapter=20now=20sets=20the=20mode=20too=20?= =?UTF-8?q?=E2=80=94=20cluster=20spots=20get=20a=20mode=20inferred=20(comm?= =?UTF-8?q?ent/band=20plan)=20and=20SendSpot=20converts=20it=20to=20a=20re?= =?UTF-8?q?al=20Flex=20mode=20(SSB->USB/LSB,=20FT8->DIGU),=20so=20SmartSDR?= =?UTF-8?q?=20actually=20switches=20mode=20on=20the=20click;=20changelog?= =?UTF-8?q?=200.20.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.go | 6 +++++- changelog.json | 10 ++++++++++ internal/cat/flex.go | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app.go b/app.go index 3e8a804..ac1d55d 100644 --- a/app.go +++ b/app.go @@ -6484,11 +6484,15 @@ func (a *App) clusterEventWorker() { } // Fire any matching alert rules (sound / visual / e-mail). a.evaluateAlerts(s) - // Mirror the spot onto the FlexRadio panadapter when enabled. + // Mirror the spot onto the FlexRadio panadapter when enabled. Infer the + // mode (from the comment, else the band plan) so clicking the spot on the + // panadapter tunes AND switches mode — a DX cluster line carries no mode, + // so without this the radio only moved frequency. if a.catFlexSpots && a.cat != nil { a.cat.SendSpot(cat.SpotInfo{ FreqHz: s.FreqHz, Callsign: s.DXCall, + Mode: alerts.InferMode(s.Comment, s.FreqHz), Comment: s.Comment, }) } diff --git a/changelog.json b/changelog.json index c8fe2d5..3e7db34 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,14 @@ [ + { + "version": "0.20.10", + "date": "2026-07-22", + "en": [ + "Clicking an OpsLog spot on the FlexRadio panadapter now switches the mode too, not just the frequency: cluster spots (which carry no mode) get one inferred from the comment or the band plan, and every spot's mode is sent to the radio as a real SmartSDR mode (SSB resolves to USB/LSB by frequency), so the click tunes AND sets the mode." + ], + "fr": [ + "Cliquer sur un spot OpsLog du panadapter FlexRadio change maintenant aussi le mode, plus seulement la fréquence : les spots cluster (qui n'ont pas de mode) en reçoivent un déduit du commentaire ou du plan de bande, et le mode de chaque spot est envoyé à la radio comme un vrai mode SmartSDR (SSB devient USB/LSB selon la fréquence), donc le clic accorde ET règle le mode." + ] + }, { "version": "0.20.9", "date": "2026-07-22", diff --git a/internal/cat/flex.go b/internal/cat/flex.go index 31fb467..c324526 100644 --- a/internal/cat/flex.go +++ b/internal/cat/flex.go @@ -1162,7 +1162,11 @@ func (f *Flex) SendSpot(s SpotInfo) error { } cmd := fmt.Sprintf("spot add rx_freq=%.6f callsign=%s color=%s source=OpsLog lifetime_seconds=%d trigger_action=Tune timestamp=%d", float64(s.FreqHz)/1e6, call, color, life, time.Now().Unix()) - if m := flexEncode(s.Mode); m != "" { + // Convert to a real Flex mode (USB/LSB/CW/DIGU/…): SmartSDR only switches the + // slice mode on a spot click when mode= is one of ITS mode names — "SSB" or a + // bare cluster label is ignored, so the mode wouldn't change. adifModeToFlex + // also resolves SSB→USB/LSB from the spot frequency. + if m := flexEncode(adifModeToFlex(s.Mode, s.FreqHz)); m != "" { cmd += " mode=" + m } if c := flexEncode(s.Comment); c != "" {