mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
battery manager progress
This commit is contained in:
@@ -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(
|
||||
() => () => {
|
||||
|
||||
Reference in New Issue
Block a user