fix(sat): changing satellite mid-pass moves the radio to it
Two birds are often up at once, and switching between them left the frequencies on the first. The selection on the page is the DISPLAY's; the tracker held its own name and went on following whatever it was started with. The way through was to stop tracking and start it again, which is how it was found — and which is also how a Flex throws away and rebuilds both its slices for no reason. RetargetSatelliteTracking changes what is being followed without letting go of the radio or the rotator. Everything derived from the old satellite is cleared so the next step sets it afresh: the frequencies, the mode on both slices (set once per satellite, not per tick), the antennas and the CTCSS tone — the new bird may be U/V where the old one was V/U, which swaps which slice sits on which band. And it happens at once rather than at the next tick. The loop gained a wake channel: a second of the previous satellite's frequencies is a second of the wrong pass, and the antenna would otherwise wait for the new bird to drift a step away from where the old one happened to be. Selecting a satellite with the radio idle is unchanged — a look, not a command. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
@@ -5,7 +5,7 @@ import { Satellite as SatIcon, Radio, ArrowUp, ArrowDown, PanelRightClose, Panel
|
||||
import {
|
||||
GetSatelliteBirds, GetSatellitePositions, GetSatellitePasses, GetSatelliteTuning,
|
||||
GetSatelliteGroundTrack, GetSatelliteTLEInfo, GetSatelliteNextPass, GetSatelliteSkyTrack,
|
||||
StartSatelliteTracking, StopSatelliteTracking, GetSatelliteTracking,
|
||||
StartSatelliteTracking, StopSatelliteTracking, GetSatelliteTracking, RetargetSatelliteTracking,
|
||||
} from '../../wailsjs/go/main/App';
|
||||
import { EventsOn } from '../../wailsjs/runtime/runtime';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -397,6 +397,24 @@ export function SatellitePanel({ myGrid }: { myGrid: string }) {
|
||||
} catch (e: any) { setErr(String(e?.message ?? e)); }
|
||||
};
|
||||
|
||||
// Changing satellite WHILE tracking moves the radio to the new one at once.
|
||||
//
|
||||
// The selection here is the display's; the tracker held its own and went on
|
||||
// following what it was started with, so two birds up at the same time meant
|
||||
// switching between them and watching the frequencies stay on the first.
|
||||
// Stopping and restarting worked, and is also how a Flex throws away and
|
||||
// rebuilds both its slices for nothing.
|
||||
//
|
||||
// Guarded on tracking being on, so selecting a satellite with the radio idle
|
||||
// stays what it has always been: a look, not a command.
|
||||
const trackingOn = !!tracking?.on;
|
||||
useEffect(() => {
|
||||
if (!trackingOn || !sel) return;
|
||||
RetargetSatelliteTracking(sel, tpIdx)
|
||||
.then(async () => setTracking((await GetSatelliteTracking()) as any))
|
||||
.catch((e: any) => setErr(String(e?.message ?? e)));
|
||||
}, [sel, tpIdx, trackingOn]);
|
||||
|
||||
// ── Map ──────────────────────────────────────────────────────────────────
|
||||
|
||||
const divRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
Vendored
+2
@@ -1045,6 +1045,8 @@ export function RestartApp():Promise<void>;
|
||||
|
||||
export function RestartQSORecorder():Promise<void>;
|
||||
|
||||
export function RetargetSatelliteTracking(arg1:string,arg2:number):Promise<void>;
|
||||
|
||||
export function RetryOfflineSync():Promise<number>;
|
||||
|
||||
export function RevealDataFolder():Promise<void>;
|
||||
|
||||
@@ -2022,6 +2022,10 @@ export function RestartQSORecorder() {
|
||||
return window['go']['main']['App']['RestartQSORecorder']();
|
||||
}
|
||||
|
||||
export function RetargetSatelliteTracking(arg1, arg2) {
|
||||
return window['go']['main']['App']['RetargetSatelliteTracking'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RetryOfflineSync() {
|
||||
return window['go']['main']['App']['RetryOfflineSync']();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user