• @halemmerich am I right in thinking that 2 hours solid function execution in 10 hours seems like a lot? I mean the pattrn function itself is pretty small (https://github.com/espruino/BangleApps/b­lob/master/modules/buzz.js), so if that sum is really true, somehow it must have been going over and over...

    @Ganblejs Any chance you could connect with the IDE and paste this on the left hand side:

    require("Storage").write("buzzdebug.boot­.js",'require("buzz").pattern=p=>{throw new Error(`buzz! ${p}`)}');
    

    And then maybe leave it connected to the Web IDE?

    Hopefully any app that calls the buzz module will then not buzz but instead get an exception thrown with a stack trace and what the pattern was.

    And do you think it's particularly the podcast remote that's doing it? I guess maybe it's forcing hundreds of redraws of the messages widget, and that in turn is calling the pattern function?

  • And do you think it's particularly the podcast remote that's doing it? I guess maybe it's forcing hundreds of redraws of the messages widget, and that in turn is calling the pattern function?

    Since I didn't have a big battery draw and the logs looked ok when I let the watch sit with the clock face during the night, it seems to me that Podcast Addict Remote does something to trigger this buzz code. But that's of course not a super robust test, maybe it was just a one off and another night the buzz module might show up in the logs even if I let the watch sit with the clock face showing.

    The app can adjust the volume on the android device and buzzes the bangle as indication with this code:

    let setUI = function() {
    // Bangle.setUI code from rigrig's smessages app for volume control: https://git.tubul.net/rigrig/BangleApps/­src/branch/personal/apps/smessages/app.j­s
      Bangle.setUI(
        {mode : "updown",
          remove : ()=>{
            Bangle.removeListener("touch", touchHandler);
            Bangle.removeListener("swipe", swipeHandler);
            clearWatch(buttonHandler);
            widgetUtils.show();
          }
        },
          ud => {
            if (ud) Bangle.musicControl(ud>0 ? "volumedown" : "volumeup");
          }
      );
      Bangle.on("touch", touchHandler);
      Bangle.on("swipe", swipeHandler);
      let buttonHandler = setWatch(()=>{load();}, BTN, {edge:'falling'});
    };
    
    

    Does mode: "updown" or the call to Bangle.musicControl trigger the buzzing, and could that be the trigger for the buzz module deferred calls?

About

Avatar for Gordon @Gordon started