• For sure, sorry for any confusion.

    1. 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.
    2. Connect with the WebIDE - "Download from RAM" shows this duplicated code.
    3. 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);});
    
About

Avatar for sfnk @sfnk started