mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -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 {
|
if err != nil {
|
||||||
return fmt.Errorf("raw decode: %w", err)
|
return fmt.Errorf("raw decode: %w", err)
|
||||||
}
|
}
|
||||||
if err := c.adapter.SendRaw(buf); err != nil {
|
return c.adapter.SendRaw(buf)
|
||||||
return err
|
|
||||||
}
|
|
||||||
if len(buf) > 0 && isModeOpcode(buf[0]) {
|
|
||||||
return c.ensureSensorStream()
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
case msg.Media != nil:
|
case msg.Media != nil:
|
||||||
if c.media == nil {
|
if c.media == nil {
|
||||||
return fmt.Errorf("media supervisor disabled")
|
return fmt.Errorf("media supervisor disabled")
|
||||||
|
|||||||
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-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<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">
|
<link rel="stylesheet" crossorigin href="/assets/index-CsRcYKTY.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -120,6 +120,9 @@ export function useCommandPipeline() {
|
|||||||
case 'oi':
|
case 'oi':
|
||||||
sendOiCommand(step.command);
|
sendOiCommand(step.command);
|
||||||
break;
|
break;
|
||||||
|
case 'sensorStream':
|
||||||
|
enableSensorStream();
|
||||||
|
break;
|
||||||
case 'drive':
|
case 'drive':
|
||||||
sendDriveDirect(step.speeds ?? { left: 0, right: 0 });
|
sendDriveDirect(step.speeds ?? { left: 0, right: 0 });
|
||||||
break;
|
break;
|
||||||
@@ -143,7 +146,7 @@ export function useCommandPipeline() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle],
|
[roverId, sendOiCommand, sendDriveDirect, sendAuxMotors, sendServoAngle, enableSensorStream],
|
||||||
);
|
);
|
||||||
|
|
||||||
const sendNightVision = useCallback(
|
const sendNightVision = useCallback(
|
||||||
|
|||||||
@@ -53,10 +53,12 @@ export const DEFAULT_MACROS = [
|
|||||||
{
|
{
|
||||||
id: 'drive-sequence',
|
id: 'drive-sequence',
|
||||||
label: 'Drive',
|
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: [
|
steps: [
|
||||||
{ type: 'oi', command: 'start' },
|
{ type: 'oi', command: 'start' },
|
||||||
{ type: 'pause', duration: COMMAND_DELAY_MS },
|
{ type: 'pause', duration: COMMAND_DELAY_MS },
|
||||||
|
{ type: 'sensorStream', enable: true },
|
||||||
|
{ type: 'pause', duration: COMMAND_DELAY_MS },
|
||||||
{ type: 'oi', command: 'dock' },
|
{ type: 'oi', command: 'dock' },
|
||||||
{ type: 'pause', duration: COMMAND_DELAY_MS },
|
{ type: 'pause', duration: COMMAND_DELAY_MS },
|
||||||
{ type: 'oi', command: 'full' },
|
{ type: 'oi', command: 'full' },
|
||||||
|
|||||||
Reference in New Issue
Block a user