You are reading a single comment by @cha0s and its replies. Click here to read the full conversation.
  • So this brings me to the final hackish """solution""" I came up with for keeping the display on during initial bootloading:

    if (require("Storage").read(".bootrn")) {
      require("Storage").erase(".bootrn");
      Bangle.setLCDPower(0);
    }
    Bangle.on("lcdPower", function onLcdPower(on) {
      if (!on && " random" === clockApp) {
        Bangle.removeListener("lcdPower", onLcdPower);
        require("Storage").write(".bootrn", "1");
        load();
      }
    });
    

    When powering off, a 1-byte file is written to .bootrn and when bootloading, the existence of that file is checked. I don't need to tell you that this is an ugly hack... but it works :)

    So anyway this was my journey thus far in trying to accomplish a real-time random clock face.

    Question:

    Is there any way less invasive than calling load() to accomplish this, as I have? The entire flicker hack can be removed if so. I tried things to get around this, e.g. wrapping the clock/child application in an IIFE, evaluating it, and then deleteing the function. Nothing besides load() seemed to reliably do the trick without a bunch of memory leakage.

    Also, the limit for this forum is kinda low. I'm only replying to continue the thread like this because I ran out of characters, lol.

    Anyways, I'll attach the bootloader.js and settings.js in case anyone wants to mess around with it.

    P.S. I was scared to load a different bootloader to my watch but I went for it!


    2 Attachments

About

Avatar for cha0s @cha0s started