battery manager progress

This commit is contained in:
legop3
2025-11-20 13:48:26 -05:00
parent a4cc514b9a
commit d09c63ca7d
6 changed files with 132 additions and 14 deletions
@@ -223,9 +223,14 @@ export default function KeyboardInputManager() {
};
}, [actionTokens, driveFromKeys, ensureServoLoop, keymap.dockMacro, keymap.driveMacro, resetAll, runMacro, setMode]);
const latestResetAllRef = useRef(resetAll);
useEffect(() => {
resetAll();
}, [state.roverId, resetAll]);
latestResetAllRef.current = resetAll;
}, [resetAll]);
useEffect(() => {
latestResetAllRef.current();
}, [state.roverId]);
useEffect(
() => () => {