From 43e5088e966dd68aa395e0b8f652f6b9676c5cdb Mon Sep 17 00:00:00 2001 From: rouggy Date: Sat, 29 Aug 2026 16:35:25 +0200 Subject: [PATCH] fix(icom): the live radio names MY_RIG, and a manual take records it too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two halves of the same station confusion. The entry form pre-filled MY_RIG from the per-band default on every band change, so the log-time priority (the radio that is keying beats the radio that was planned) never ran — the field was no longer empty by the time the backend looked. The form now asks the active radio first, through a new ActiveRadioMyRig binding. And the manual record button started its capture from the From-radio sound card unconditionally, where the automatic recorder already knew a network Icom's audio is pushed from the 50003 stream: a manual take on the IC-7760 was a faithful recording of the Flex's DAX. Same source rule for both, and the button is offered with no sound card at all when the network stream is the source. --- app.go | 17 ++++++++++++++--- app_radios.go | 9 +++++++++ changelog.json | 8 ++++++-- frontend/src/App.tsx | 11 ++++++++--- frontend/wailsjs/go/main/App.d.ts | 2 ++ frontend/wailsjs/go/main/App.js | 4 ++++ 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/app.go b/app.go index 10d1e6c..b84880d 100644 --- a/app.go +++ b/app.go @@ -9262,7 +9262,9 @@ func (a *App) QSOAudioManualReady() bool { return false } cfg, _ := a.GetAudioSettings() - return !cfg.QSORecord && strings.TrimSpace(cfg.FromRadio) != "" + // Over the network the radio needs no sound card: the 50003 stream is the + // source, so the button is offered even with "From radio" empty. + return !cfg.QSORecord && (strings.TrimSpace(cfg.FromRadio) != "" || a.icomNetAudioActive()) } // QSOAudioManualStart begins a recording when automatic recording is off. @@ -9279,10 +9281,19 @@ func (a *App) QSOAudioManualStart() bool { } if !a.qsoRec.Running() { cfg, _ := a.GetAudioSettings() - if strings.TrimSpace(cfg.FromRadio) == "" { + // Same source rule as the automatic recorder: when the RX audio arrives + // over the network, record THAT — not the "From radio" sound card, which + // on a mixed station is another radio entirely. A manual take on the + // network IC-7760 was capturing the Flex's DAX: technically a recording, + // just not of the QSO being made. + from := cfg.FromRadio + a.qsoRecPushed = a.icomNetAudioActive() || cfg.FromRadio == audio.NetworkDeviceID + if a.qsoRecPushed { + from = audio.PushedSource + } else if strings.TrimSpace(from) == "" { return false } - if err := a.qsoRec.Start(cfg.FromRadio, cfg.RecordingDevice, cfg.PrerollSeconds); err != nil { + if err := a.qsoRec.Start(from, cfg.RecordingDevice, cfg.PrerollSeconds); err != nil { applog.Printf("qso-rec: manual start failed: %v", err) return false } diff --git a/app_radios.go b/app_radios.go index cbdfec8..00a0ab9 100644 --- a/app_radios.go +++ b/app_radios.go @@ -235,3 +235,12 @@ func (a *App) activeRadioMyRig() string { } return "" } + +// ActiveRadioMyRig exposes the connected radio's MY_RIG to the frontend, which +// pre-fills the entry form's My-station fields on every band change. Without +// this the per-band default landed in the field FIRST, and the log-time +// priority (the radio that is keying beats the radio that was planned) never +// ran — the field was no longer empty by the time the backend looked. +func (a *App) ActiveRadioMyRig() string { + return a.activeRadioMyRig() +} diff --git a/changelog.json b/changelog.json index c9a617a..7b568fd 100644 --- a/changelog.json +++ b/changelog.json @@ -14,7 +14,9 @@ "CAT settings: reopening the panel now shows the radio that is actually selected — it always showed the first one, with the fields (MY_RIG included) silently editing the wrong entry.", "IC-7760: the power meter is calibrated against the radio (100 W reads 100 W on the 250 W face) and the RF power setting reads in watts, not a percentage.", "Icom network audio: toggling Listening off and on no longer chops the sound — the monitor restarts as network-fed instead of also opening a USB capture.", - "QSO recorder: starting a fresh manual take resets the counter for good — it used to flash 0 and jump back to the previous take’s elapsed time." + "QSO recorder: starting a fresh manual take resets the counter for good — it used to flash 0 and jump back to the previous take’s elapsed time.", + "MY_RIG follows the radio actually connected: the entry form now asks the active radio first, before the per-band default — an IC-7760 on the air no longer logs as the Flex the band plan names.", + "QSO recorder: a manual take on a network Icom records the network RX stream, not the “From radio” sound card (which captured another radio’s DAX on a mixed station)." ], "fr": [ "Console Elecraft : le S-mètre est calibré sur un vrai K3 — S9 et les +dB correspondent désormais à l’affichage de la radio (il lisait environ deux points S trop bas).", @@ -28,7 +30,9 @@ "Réglages CAT : rouvrir le panneau montre désormais la radio réellement sélectionnée — il montrait toujours la première, et les champs (MY_RIG compris) modifiaient silencieusement la mauvaise entrée.", "IC-7760 : le wattmètre est calibré sur la radio (100 W affiche 100 W sur l’échelle 250 W) et le réglage RF power se lit en watts, plus en pourcentage.", "Audio réseau Icom : couper puis relancer Listening ne hache plus le son — le moniteur redémarre alimenté par le réseau au lieu d’ouvrir en plus une capture USB.", - "Enregistreur de QSO : démarrer une nouvelle prise manuelle remet le compteur à zéro pour de bon — il affichait 0 puis resautait au temps de la prise précédente." + "Enregistreur de QSO : démarrer une nouvelle prise manuelle remet le compteur à zéro pour de bon — il affichait 0 puis resautait au temps de la prise précédente.", + "MY_RIG suit la radio réellement connectée : le formulaire interroge d’abord la radio active, avant le défaut par bande — un IC-7760 à l’antenne ne se logue plus comme le Flex prévu par le plan de bande.", + "Enregistreur de QSO : une prise manuelle sur un Icom réseau enregistre le flux RX réseau, pas la carte son « From Radio » (qui capturait le DAX d’une autre radio sur une station mixte)." ] }, { diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d6733b5..06032d9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -33,7 +33,7 @@ import { GetSolarData, GetQSORate, LoTWUserInfo, - OperatingDefaultForBand, + OperatingDefaultForBand, ActiveRadioMyRig, LogUDPLoggedADIF, ListCountries, GetWinkeyerSettings, SaveWinkeyerSettings, ListSerialPorts, GetWinkeyerStatus, @@ -934,11 +934,16 @@ export default function App() { useEffect(() => { if (!band) return; let cancelled = false; - OperatingDefaultForBand(band).then((d) => { + OperatingDefaultForBand(band).then(async (d) => { + if (cancelled) return; + // The radio actually CONNECTED names itself ahead of the per-band plan: + // an IC-7760 on the air must not log as the Flex the band default names. + let liveRig = ''; + try { liveRig = (await ActiveRadioMyRig()) || ''; } catch {} if (cancelled) return; setDetails((cur) => ({ ...cur, - my_rig: d?.station_name || '', + my_rig: liveRig || d?.station_name || '', my_antenna: d?.antenna_name || '', tx_pwr: d?.tx_pwr ?? cur.tx_pwr, })); diff --git a/frontend/wailsjs/go/main/App.d.ts b/frontend/wailsjs/go/main/App.d.ts index 7df62f4..8fe20f3 100644 --- a/frontend/wailsjs/go/main/App.d.ts +++ b/frontend/wailsjs/go/main/App.d.ts @@ -46,6 +46,8 @@ export function ActivateProfile(arg1:number):Promise; export function ActiveRadioID():Promise; +export function ActiveRadioMyRig():Promise; + export function AddQSO(arg1:qso.QSO):Promise; export function AmpFanMode(arg1:string,arg2:string):Promise; diff --git a/frontend/wailsjs/go/main/App.js b/frontend/wailsjs/go/main/App.js index 5f7c8df..5895dab 100644 --- a/frontend/wailsjs/go/main/App.js +++ b/frontend/wailsjs/go/main/App.js @@ -30,6 +30,10 @@ export function ActiveRadioID() { return window['go']['main']['App']['ActiveRadioID'](); } +export function ActiveRadioMyRig() { + return window['go']['main']['App']['ActiveRadioMyRig'](); +} + export function AddQSO(arg1) { return window['go']['main']['App']['AddQSO'](arg1); }