It's really likely that clearInterval got called with undefined as an argument as @AkosLukacs says.
If you install the 2v03 firmware then I've changed the way it works, so if you call clearInterval(undefined) rather than just clearInterval() then it'll throw an exception.
What you can then do is either leave a PC connected to the serial port of the MDBT42Q logging what it outputs, or you can log it to RAM:
var log="";
LoopbackB.on('data',d=>log+=d);
NRF.on('disconnect', function(reason) { LoopbackA.setConsole(); });
Now when you disconnect all outputs get logged to log. When you reconnect you can just run print(log) to see what got printed - and if there was an exception then it'll be in there along with a stack trace of where it occurred.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It's really likely that
clearInterval
got called withundefined
as an argument as @AkosLukacs says.If you install the 2v03 firmware then I've changed the way it works, so if you call
clearInterval(undefined)
rather than justclearInterval()
then it'll throw an exception.What you can then do is either leave a PC connected to the serial port of the MDBT42Q logging what it outputs, or you can log it to RAM:
Now when you disconnect all outputs get logged to
log
. When you reconnect you can just runprint(log)
to see what got printed - and if there was an exception then it'll be in there along with a stack trace of where it occurred.