🧼 Removes battery service

This commit is contained in:
Rune Harlyk
2024-11-14 15:15:42 +01:00
committed by Rune Harlyk
parent f2d86115fb
commit 841ae91c33
13 changed files with 27 additions and 164 deletions
+1 -5
View File
@@ -21,7 +21,7 @@
location,
useFeatureFlags
} from '$lib/stores';
import type { Analytics, Battery, DownloadOTA } from '$lib/types/models';
import type { Analytics, DownloadOTA } from '$lib/types/models';
const features = useFeatureFlags();
@@ -52,7 +52,6 @@
if (angles.length) servoAngles.set(angles);
});
features.subscribe(data => {
if (data?.battery) socket.on('battery', handleBattery);
if (data?.download_firmware) socket.on('otastatus', handleOAT);
if (data?.sonar) socket.on('sonar', data => console.log(data));
});
@@ -63,7 +62,6 @@
socket.off('open', handleOpen);
socket.off('close', handleClose);
socket.off('rssi', handleNetworkStatus);
socket.off('battery', handleBattery);
socket.off('otastatus', handleOAT);
};
@@ -82,8 +80,6 @@
const handleNetworkStatus = (data: number) => telemetry.setRSSI(data);
const handleBattery = (data: Battery) => telemetry.setBattery(data);
const handleOAT = (data: DownloadOTA) => telemetry.setDownloadOTA(data);
let menuOpen = false;