As noted, I think alarm.js is only called when an alarm is due, and it is called with load(...) so everything else is removed at that point and it's just the boot.js code that is run.
Reasoning for it is in the comments above it:
// Chances are boot0.js got run already and scheduled *another*
// 'load(alarm.js)' - so let's remove it first!
clearInterval();
I'm not sure it's really a huge issue as it would only ever affect things in the case the alarm actually goes off. Are you actually having issues and you think that might be the cause?
I guess now we have __FILE__ defined, boot.js could check that instead and just not schedule an alarm if global.__FILE__=="alarm.js"
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.
Hi,
As noted, I think
alarm.js
is only called when an alarm is due, and it is called withload(...)
so everything else is removed at that point and it's just theboot.js
code that is run.Reasoning for it is in the comments above it:
I'm not sure it's really a huge issue as it would only ever affect things in the case the alarm actually goes off. Are you actually having issues and you think that might be the cause?
I guess now we have
__FILE__
defined,boot.js
could check that instead and just not schedule an alarm ifglobal.__FILE__=="alarm.js"