feat(relays): follow the entry Band selector when there is no CAT link

Relay automatic control and the band-change outbound rows both hang off the rig
state, which is right when there IS a rig: changing Band in the entry strip
pushes a QSY, the new state comes back through the CAT callback, and the relays
follow from there — which is why this works for anyone with rig control.

Without a CAT connection nothing is pushed and nothing comes back, so a station
whose rig OpsLog does not control changed band and the antenna switch sat
exactly where it was. Reported as automatic control not working; it was never
told the band had changed.

The entry selector now says so itself, but only when the CAT push did not
happen, and never when the band or frequency lock is on: a lock means the entry
is deliberately decoupled from the rig, and moving an antenna to match a contact
logged from last year is worse than doing nothing.

The frequency is passed as unknown on that path — a band selector gives a band
and nothing else, and rules written on a frequency RANGE are left alone rather
than evaluated against a made-up dial reading.

The de-duplication of "is this a new band" is now shared by both sources, so a
station that has both does not command its switch twice for one QSY.

Also: the same credit line as the QSL e-mail now closes the default recording
e-mail body, on the same terms — a default in the template, so a stored one is
untouched.
This commit is contained in:
2026-08-16 11:15:56 +02:00
parent c0dc1bfcc4
commit 423cf1f998
8 changed files with 131 additions and 16 deletions
+11 -2
View File
@@ -18,7 +18,7 @@ import {
WorkedBefore,
SetCompactMode, SetCompactHeight,
RotatorGoToPath,
GetCATState, SetCATFrequency, SetCATMode, SwitchCATRig, FlexApplyBandAntenna, FlexApplyBandPower,
GetCATState, SetCATFrequency, SetCATMode, SwitchCATRig, EntryBandChanged, FlexApplyBandAntenna, FlexApplyBandPower,
GetSecretStatus, UnlockSecrets,
RefreshCtyDat, DownloadAllReferenceLists,
RotatorGoTo, RotatorStop, GetRotatorHeading, SetActiveRotor,
@@ -730,10 +730,19 @@ export default function App() {
function onBandUserChange(v: string) {
setBand(v);
noteManualEdit();
if (catState.enabled && catState.connected && !locks.band && !locks.freq) {
// A lock means this value is deliberately decoupled from the rig (logging an
// old contact off-frequency) — drive nothing, neither the radio nor an antenna.
if (locks.band || locks.freq) return;
if (catState.enabled && catState.connected) {
const hz = qsyFreqHz(v, mode);
if (hz > 0) SetCATFrequency(hz).catch(() => {});
return; // the rig reports back, and the relays follow from its state
}
// No rig to push to, so THIS is the band change. Without it, relay automatic
// control and the band-change outbound rows never heard about it — they only
// ever listened to the CAT state, which on a station without rig control
// never says anything.
EntryBandChanged(v).catch(() => {});
}
function onModeUserChange(v: string) {
setMode(v);
+2
View File
@@ -196,6 +196,8 @@ export function DownloadULSCounties():Promise<void>;
export function DuplicateProfile(arg1:number,arg2:string):Promise<profile.Profile>;
export function EntryBandChanged(arg1:string):Promise<void>;
export function ExplainAward(arg1:string,arg2:string):Promise<Array<main.AwardExplain>>;
export function ExportADIF(arg1:string,arg2:boolean,arg3:Array<string>):Promise<adif.ExportResult>;
+4
View File
@@ -334,6 +334,10 @@ export function DuplicateProfile(arg1, arg2) {
return window['go']['main']['App']['DuplicateProfile'](arg1, arg2);
}
export function EntryBandChanged(arg1) {
return window['go']['main']['App']['EntryBandChanged'](arg1);
}
export function ExplainAward(arg1, arg2) {
return window['go']['main']['App']['ExplainAward'](arg1, arg2);
}