This commit is contained in:
legop3
2026-01-21 14:08:42 -05:00
parent 99a1c5418d
commit c465c03e34
3 changed files with 19 additions and 11 deletions
+10 -2
View File
@@ -88,13 +88,21 @@ export default function VideoTile({
// batteryCapacity,
// config: batteryConfig,
// });
const limiterOvercurrentMotors = useMemo(() => {
const motors = overcurrentLimiter?.overcurrent?.motors;
if (!motors) return null;
return Object.entries(motors)
.filter(([, active]) => Boolean(active))
.map(([key]) => key);
}, [overcurrentLimiter]);
const wheelOvercurrents = sensors?.wheelOvercurrents || null;
const overcurrentMotors =
const overcurrentMotors = limiterOvercurrentMotors ?? (
wheelOvercurrents == null
? []
: Object.entries(wheelOvercurrents)
.filter(([, active]) => Boolean(active))
.map(([key]) => key);
.map(([key]) => key)
);
const limiterCaps = overcurrentLimiter?.caps || null;
const limiterGroups = overcurrentLimiter?.overcurrent?.groups || null;
const limiterFill = useMemo(() => {