mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-14 18:58:49 -05:00
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:
@@ -25,10 +25,13 @@ export default function DisplayRoverCell({ rover, session }) {
|
||||
const driver = findDriverForRover({ roverId: rover?.id, session });
|
||||
const stateText = buildRoverStateText(rover, visual);
|
||||
const batteryText = formatBatteryText(visual);
|
||||
const batteryVoltage = frame?.sensors.batteryVoltage;
|
||||
const active = Boolean(driver);
|
||||
const urgent = Boolean(visual?.urgentActive);
|
||||
const warn = Boolean(visual?.warnActive);
|
||||
const locked = Boolean(rover?.locked);
|
||||
// console.log(batteryTelemetry)
|
||||
// console.log(batteryVoltage)
|
||||
|
||||
return (
|
||||
<article
|
||||
@@ -89,7 +92,8 @@ export default function DisplayRoverCell({ rover, session }) {
|
||||
maxSize={136}
|
||||
minSize={32}
|
||||
>
|
||||
{batteryText}
|
||||
<div>{batteryText}</div>
|
||||
<div>{batteryVoltage}v</div>
|
||||
</AutoFitText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user