From 3013a2ba08f3de49c5889394416fb23493165b1e Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 26 Aug 2026 18:07:35 +0200 Subject: [PATCH] feat(kpa): the band-follow is asked for, not assumed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Telling somebody's amplifier where to be is a write to their station, and it now has a switch — the SAME switch an Acom uses. 'Keep the amplifier on the radio's band' is one idea to an operator; that it needs a second serial port and a rig emulator on one amplifier and a single ^BN on another is our business, not a reason for two checkboxes. On by default for a KPA, because an amplifier left on the wrong band is the worse outcome of the two, and the operator who has wired it straight to the radio turns it off once. The hint says exactly that case, since it is the only one where a second voice telling the amplifier where to be is unwelcome. --- app.go | 7 ++++++- frontend/src/components/SettingsModal.tsx | 13 +++++++++++++ frontend/src/lib/i18n.tsx | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index 743cdda..ce91d0e 100644 --- a/app.go +++ b/app.go @@ -18285,7 +18285,12 @@ func (a *App) feedAmpBandFollow(s cat.RigState) { // neither a second serial port nor a pretend rig. Sent from a goroutine // because this runs on the CAT state-change path, and nothing about the // rig should wait on an amplifier's link. - if inst.kpa != nil && s.Band != "" { + // Asked for, like every other write to somebody's station. The option is + // the same one an Acom uses — "keep the amplifier on the radio's band" is + // one idea to an operator, whatever it takes underneath — and it is off + // for the operator who has wired the amplifier straight to the rig and + // does not want a second voice telling it where to be. + if inst.kpa != nil && inst.cfg.FreqOut && s.Band != "" { k, band := inst.kpa, s.Band go func() { _ = k.SetBand(band) }() } diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index d7a168a..eaada39 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -4177,6 +4177,7 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged // could never connect. const applyType = (i: number, v: string) => patchAmp(i, { type: v, + freq_out: v.startsWith('kpa') ? true : amps[i].freq_out, transport: v === 'pgxl' ? 'tcp' : v === 'kpa500' ? 'serial' : amps[i].transport, baud: v.startsWith('acom') ? 9600 : v.startsWith('spe') ? 115200 : v.startsWith('kpa') ? 38400 : amps[i].baud, port: v === 'kpa1500' ? 1500 : amps[i].port, @@ -4323,6 +4324,18 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged Offering a second serial port and a transceiver emulator for that would be a workaround for a problem this amplifier does not have. */} + {isKPA && ( +
+ +

{t('amp.kpaBandFollowHint')}

+
+ )} {!isPGXL && !isKPA && (