I install "default apps" -> this already installs my app as clock app, then you get prompted to "reload" or set it in the apploader to automatically reload. No further install from the WebIDE.
Connect with the WebIDE - "Download from RAM" shows this duplicated code.
Prints in the WebIDEs console are also duplicated, so is behaviour of the app, e.g. buzzing executed twice (multiple times?)
I will try what @Ganblejs suggested now and report back.
edit: this showed no different behaviour.
Edit: the duplication is only present for
setInterval()
setTimeout()
Bangle.on()
NRF.on()
2x my code, 1x code from the widget?
var bleServiceOptions = { "uart": true };
NRF.on("connect", function () {WIDGETS["bluetooth"].draw();});
NRF.on("connect", function () {connected=true;uiLog("connected");});
NRF.on("connect", function () {connected=true;uiLog("connected");});
NRF.on("disconnect", function () {WIDGETS["bluetooth"].draw();});
NRF.on("disconnect", function () {connected=false;uiLog("disconnected");NRF.eraseBonds(onBondErased);});
NRF.on("disconnect", function () {connected=false;uiLog("disconnected");NRF.eraseBonds(onBondErased);});
NRF.on("bond", function (status) {uiLog("bond: "+status);if(status=="success"){connected=true;}else{connected=false;}});
NRF.on("bond", function (status) {uiLog("bond: "+status);if(status=="success"){connected=true;}else{connected=false;}});
NRF.on("advertising", function (isAdvertising) {uiLog("advertising: "+isAdvertising);});
NRF.on("advertising", function (isAdvertising) {uiLog("advertising: "+isAdvertising);});
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.
For sure, sorry for any confusion.
I will try what @Ganblejs suggested now and report back.
edit: this showed no different behaviour.
Edit: the duplication is only present for
2x my code, 1x code from the widget?