corrected autotrack still working when deactivated

change track to radio
This commit is contained in:
2026-01-12 21:36:01 +01:00
parent 414d802d37
commit 431c17347d
4 changed files with 87 additions and 271 deletions

View File

@@ -14,9 +14,7 @@
$: if (status?.heading !== undefined && status?.heading !== null) {
const newHeading = status.heading;
const oldHeading = heading;
console.log(`RotatorGenius heading update: ${oldHeading} -> ${newHeading}`);
if (heading === null) {
// First time: accept any value
heading = newHeading;
@@ -56,7 +54,7 @@
try {
hasTarget = true; // Mark that we have a target
// Subtract 10 degrees to compensate for rotator momentum
const adjustedHeading = (targetHeading - 10 + 360) % 360;
const adjustedHeading = (targetHeading + 360) % 360;
await api.rotator.setHeading(adjustedHeading);
} catch (err) {
console.error('Failed to set heading:', err);

View File

@@ -191,7 +191,7 @@
<div class="auto-track-controls">
<label class="toggle-label">
<input type="checkbox" bind:checked={autoTrackEnabled} on:change={updateAutoTrack} />
<span>Enable Auto-Track from Tuner</span>
<span>Enable Auto-Track from Radio</span>
</label>
<div class="threshold-group">