add some automation to pi side

This commit is contained in:
legop3
2025-11-11 21:04:04 -05:00
parent 3bc2921f25
commit 74a460a980
11 changed files with 278 additions and 17 deletions
+11
View File
@@ -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;
}