mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
add some automation to pi side
This commit is contained in:
@@ -73,6 +73,17 @@ function handleRoverConnection(ws) {
|
||||
io.emit('commandAck', { roverId: pending.roverId, id: msg.id, status: msg.status, error: msg.error });
|
||||
}
|
||||
break;
|
||||
case 'event':
|
||||
if (!roverId) {
|
||||
return;
|
||||
}
|
||||
io.emit('roverEvent', {
|
||||
roverId,
|
||||
event: msg.event,
|
||||
ts: msg.ts || Date.now(),
|
||||
data: msg.data || {},
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user