precision camera stuff

This commit is contained in:
legop3
2026-06-29 21:06:21 -04:00
parent 79be3e1583
commit 0cc40b7608
12 changed files with 129 additions and 28 deletions
+12
View File
@@ -49,6 +49,7 @@ const CONTROL_ACTION_NAMES = [
'setServoAngle',
'nudgeServo',
'goServoHome',
'setCameraPrecisionMode',
'runMacro',
'stopAllMotion',
'sendOiCommand',
@@ -411,6 +412,15 @@ export function ControlSystemProvider({ children }) {
setServoAngle(target);
}, [pipeline.servoConfig, setServoAngle]);
const setCameraPrecisionMode = useCallback((active) => {
/*
This action only changes how the browser chooses servo increments. The Pi
already accepts decimal angle targets, so no server or rover command shape
changes are needed for precision camera mode.
*/
dispatch({ type: 'control/set-camera-precision-mode', payload: Boolean(active) });
}, []);
const runMacro = useCallback(
async (macroId) => {
const macro = state.macros.find((item) => item.id === macroId) || null;
@@ -675,6 +685,7 @@ export function ControlSystemProvider({ children }) {
setServoAngle,
nudgeServo,
goServoHome,
setCameraPrecisionMode,
runMacro,
stopAllMotion,
sendOiCommand,
@@ -701,6 +712,7 @@ export function ControlSystemProvider({ children }) {
setServoAngle,
nudgeServo,
goServoHome,
setCameraPrecisionMode,
runMacro,
stopAllMotion,
sendOiCommand,