add battery voltage to /display so you can see voltages of batteries on the /display page by looking at /display to see the voltages of the batteries on the roombas in case you want to see the battery voltages!! yay!!!!

This commit is contained in:
legop3
2026-09-19 17:00:23 -04:00
parent fe2c29371f
commit c35544e515
22 changed files with 237 additions and 238 deletions
+2
View File
@@ -7,6 +7,7 @@ import { shallowArrayEqual, shallowObjectEqual } from './TelemetryContext.jsx';
const EMPTY_BATTERY_TELEMETRY = Object.freeze({
batteryChargeMah: null,
batteryCapacityMah: null,
batteryVoltage: null,
});
const EMPTY_DOCK_TELEMETRY = Object.freeze({
@@ -89,6 +90,7 @@ export function selectBatteryTelemetry(frame) {
return {
batteryChargeMah: sensors.batteryChargeMah ?? null,
batteryCapacityMah: sensors.batteryCapacityMah ?? null,
batteryVoltage: (sensors.voltageMv/1000).toPrecision(4) ?? null,
};
}