🔋 Adds battery model

This commit is contained in:
Rune Harlyk
2024-07-14 23:10:39 +02:00
committed by Rune Harlyk
parent cfa3e58d09
commit c783793b5c
4 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ let telemetry_data = {
rssi: 0
},
battery: {
soc: 100,
charging: false
voltage: 100,
current: false
},
download_ota: {
status: 'none',
@@ -30,7 +30,7 @@ function createTelemetry() {
setBattery: (data: Battery) => {
update((telemetry_data) => ({
...telemetry_data,
battery: { soc: data.soc, charging: data.charging }
battery: { voltage: data.voltage, current: data.current }
}));
},
setDownloadOTA: (data: DownloadOTA) => {