You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • When the bt signal goes low or near lost, the espruino device reboots

    So is it that problem? That sounds a lot more serious than just a delay to me...

    I always had issues when code in setInterval run longer than the interval. Since the interpreter is single threaded it won't run the code again if it did not finish but maybe it runs again right after previous one ends not giving chance to any other code or idle loop to run?

    It should work ok - it tries to rechedule as soon as possible, but only after processing inputs and running through other intervals I believe. I guess it's possible if the first interval adds a timeout/interval itself it might trigger a re-run which might cause the behaviour you're having?

  • So is it that problem? That sounds a lot more serious than just a delay to me...

    I believe so, I was able to make the dsd6 run slower just by making the signal worse, and eventually it was rebooting when using puck.js.com script. But I did not want the cli to be exposed anyway, so the NRF.updateServices solution is better in any case for real use, I did not investigate further. I can try something if you like though, I have a nice visual feedback of the delays to reboot sequence, the ball moves slower and then stops :)

    but I do not have the probem anymore, the NRF.updateServices way solved it for me.

About

Avatar for Gordon @Gordon started