This commit is contained in:
legop3
2025-12-17 00:53:55 -05:00
parent 102192c631
commit c42d314cc9
7 changed files with 15 additions and 16 deletions
Vendored
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -8
View File
@@ -140,13 +140,7 @@ func (c *WSClient) dispatch(ctx context.Context, msg *inboundMessage) error {
if err != nil {
return fmt.Errorf("raw decode: %w", err)
}
if err := c.adapter.SendRaw(buf); err != nil {
return err
}
if len(buf) > 0 && isModeOpcode(buf[0]) {
return c.ensureSensorStream()
}
return nil
return c.adapter.SendRaw(buf)
case msg.Media != nil:
if c.media == nil {
return fmt.Errorf("media supervisor disabled")
@@ -337,4 +331,4 @@ func isModeOpcode(op byte) bool {
default:
return false
}
}
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
<title>Multi Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-BI_1Ts67.js"></script>
<script type="module" crossorigin src="/assets/index-CwvJUtN6.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CsRcYKTY.css">
</head>
<body>
+4 -1
View File
@@ -120,6 +120,9 @@ export function useCommandPipeline() {
case 'oi':
sendOiCommand(step.command);
break;
case 'sensorStream':
enableSensorStream();
break;
case 'drive':
sendDriveDirect(step.speeds ?? { left: 0, right: 0 });
break;
@@ -143,7 +146,7 @@ export function useCommandPipeline() {
}
}
},
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle],
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle, enableSensorStream],
);
const sendNightVision = useCallback(
+3 -1
View File
@@ -53,10 +53,12 @@ export const DEFAULT_MACROS = [
{
id: 'drive-sequence',
label: 'Drive',
description: 'Start, dock, and full command sequence used by the drive button.',
description: 'Start OI, request sensors, dock poke, then full mode for driving.',
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' },