feat: Added Antenna selection to Flex FlexPanel
feat: New settings flexradio to select antennas per band
This commit is contained in:
+14
-1
@@ -13,7 +13,7 @@ import {
|
||||
GetStartupStatus, CheckForUpdate,
|
||||
WorkedBefore,
|
||||
SetCompactMode,
|
||||
GetCATState, SetCATFrequency, SetCATMode, SwitchCATRig,
|
||||
GetCATState, SetCATFrequency, SetCATMode, SwitchCATRig, FlexApplyBandAntenna,
|
||||
GetSecretStatus, UnlockSecrets,
|
||||
RefreshCtyDat, DownloadAllReferenceLists,
|
||||
RotatorGoTo, RotatorStop, GetRotatorHeading,
|
||||
@@ -1431,6 +1431,19 @@ export default function App() {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
// FlexRadio: apply the per-band RX/TX antennas whenever the band changes (rig
|
||||
// QSY, spot click, manual band) — so the right antennas follow the frequency.
|
||||
// Skipped while the band is LOCKED (entering an old QSO off-air) and for non-Flex
|
||||
// backends. The backend no-ops if the band has no configured mapping.
|
||||
const lastAntBandRef = useRef('');
|
||||
useEffect(() => {
|
||||
if (catState.backend !== 'flex' || locks.band) return;
|
||||
const b = band.trim();
|
||||
if (!b || b === lastAntBandRef.current) return;
|
||||
lastAntBandRef.current = b;
|
||||
FlexApplyBandAntenna(b).catch(() => {});
|
||||
}, [band, catState.backend, locks.band]);
|
||||
|
||||
// Cluster live wiring: hydrate per-server status + saved server list,
|
||||
// then subscribe to push events.
|
||||
async function reloadClusterMeta() {
|
||||
|
||||
Reference in New Issue
Block a user