This commit is contained in:
legop3
2025-12-17 01:13:38 -05:00
parent 67f4f014c4
commit 7b29d741b0
9 changed files with 23 additions and 96 deletions
+3 -5
View File
@@ -105,9 +105,10 @@ export function useCommandPipeline() {
type: 'raw',
data: { raw: bytesToBase64(bytes) },
});
enableSensorStream();
return true;
},
[emitCommand, roverId],
[emitCommand, enableSensorStream, roverId],
);
const runMacroSteps = useCallback(
@@ -119,9 +120,6 @@ export function useCommandPipeline() {
case 'oi':
sendOiCommand(step.command);
break;
case 'sensorStream':
enableSensorStream();
break;
case 'drive':
sendDriveDirect(step.speeds ?? { left: 0, right: 0 });
break;
@@ -145,7 +143,7 @@ export function useCommandPipeline() {
}
}
},
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle, enableSensorStream],
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle],
);
const sendNightVision = useCallback(
+1 -3
View File
@@ -53,12 +53,10 @@ export const DEFAULT_MACROS = [
{
id: 'drive-sequence',
label: 'Drive',
description: 'Start OI, request sensors, dock poke, then full mode for driving.',
description: 'Start, dock, and full command sequence used by the drive button.',
steps: [
{ type: 'oi', command: 'start' },
{ type: 'pause', duration: COMMAND_DELAY_MS },
{ type: 'sensorStream', enable: true },
{ type: 'pause', duration: COMMAND_DELAY_MS },
{ type: 'oi', command: 'dock' },
{ type: 'pause', duration: COMMAND_DELAY_MS },
{ type: 'oi', command: 'full' },