mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
be webel
This commit is contained in:
@@ -275,6 +275,13 @@ function broadcastLidarScan(payload) {
|
||||
}
|
||||
}
|
||||
|
||||
function broadcastLidarLine(payload) {
|
||||
for (const socket of io.sockets.sockets.values()) {
|
||||
if (!isVerified(socket)) continue;
|
||||
socket.volatile.emit('neato:lidarLine', payload);
|
||||
}
|
||||
}
|
||||
|
||||
lidarRuntime =
|
||||
brainslugHost && brainslugKey
|
||||
? createLidarRuntime({
|
||||
@@ -292,6 +299,9 @@ if (lidarRuntime) {
|
||||
lidarRuntime.on('scan', (payload) => {
|
||||
broadcastLidarScan(payload);
|
||||
});
|
||||
lidarRuntime.on('line', (payload) => {
|
||||
broadcastLidarLine(payload);
|
||||
});
|
||||
lidarRuntime.on('status', () => {
|
||||
emitUpdate();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user