-
Sure. Thanks. I'm already refactoring some of the code.
So I can post the old code or spend some time to get the new sorted.One single puck advertising full blast will cause about 20-30 events / second on the receiver side.
Having all eight pucks together will process about 115-130 events / second.Currently it is hard to trigger the error message. It just happened at some time while testing the device "in the field".
The error was actually bothExecution Interrupted
(multiple times) and alsoExecution Interrupted during event processing
The BLE connection was quite slow and laggy at that point.
Are you willing to share your code? Maybe you could put it in a new post and I might be able to take a look at the setScan handler and see if I can offer any pointers?
If you're not already, using the 'filter' as a second argument to it should help to reduce overhead by allowing espruino itself to filter out un-needed packets.
This happens is Ctrl-C is sent (which the IDE does automatically if it doesn't get a response) when the device is busy processing events - so yes, that's probably related.
Either some JS code is taking a very long time to process, or there's so much Bluetooth traffic it's spending all its time handling it.