ttu / lego-boost-browser

Library for controlling Lego Boost with Web Bluetooth API
MIT License
29 stars 12 forks source link

drive command longer than ~5 sec stop and show an error in the console #6

Open DerThorsten opened 1 year ago

DerThorsten commented 1 year ago

long running drive command like this below fail:

import LegoBoost from 'lego-boost-browser';

const boost = new LegoBoost();

async () => {
    await boost.motorTimeMultiAsync(60, -50, 50);
}

The motors stop after about 5 sec and this is shown in the console:

hub-control.js:214 Uncaught TypeError: Cannot set properties of undefined (setting 'action')
    at e.<anonymous> (hub-control.js:214:1)
    at eventEmitter.js:61:1
    at Array.forEach (<anonymous>)
    at e.emit (eventEmitter.js:60:1)
    at e.emit (hub.js:66:1)
    at e.parseMessage (hub.js:157:1)
    at BluetoothRemoteGATTCharacteristic.<anonymous> (hub.js:77:1)
hub.js:172 parseSensor unknown port 0x3a

Greetings