mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
woah
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -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
@@ -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>
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user