Avatar for Alessandro

Alessandro

Member since Oct 2021 • Last active Jan 2023
  • 8 conversations
  • 146 comments

Most recent activity

    • 25 comments
    • 3,246 views
  • in Bangle.js
    Avatar for Alessandro

    Thank you :)

  • in Bangle.js
    Avatar for Alessandro

    Nice!

    I just noticed an issue with Swiper Clock Launch: I can navigate from Clock to Launcher but Launcher to Clock does not work anymore. I already did a settings rewrite. No errors in the console.


    btw slope clock is really cool!

  • in Bangle.js
    Avatar for Alessandro

    Thanks, I can try it but I'm not sure about it: without the renderTopBar() method the battery lasts at least 10 days. Now it lasts 2/3 days :-(

    I have no widgets installed: only alarms, messages & android app.

  • in Bangle.js
    Avatar for Alessandro

    I updated the renderTopBar() method to draw the "widgets" only if its value has been changed but there's something wrong. Last night battery drop from 70% to 30% :-(

    let prevLocked = undefined;
    let prevConnected = undefined;
    
    function renderTopBar() {
        const itemW = 10;
        const itemH = 2;
    
        let locked = Bangle.isLocked();
        if (locked != prevLocked) {
          const lockColor = locked ? g.theme.fg : g.theme.bg;
          g.setColor(lockColor).fillRect(0, 0, itemW, itemH).setColor(g.theme.fg);
          prevLocked = locked;
        }
    
        let connected = NRF.getSecurityStatus().connected;
        if (connected != prevConnected) {
          const bluetoothColor = connected ? (g.theme.dark ? "#0ff" : "#00f") : (g.theme.dark ? "#666" : "#999");
          g.setColor(bluetoothColor).fillRect(item­W + 1, 0, 1 + itemW * 2, itemH).setColor(g.theme.fg);
          prevConnected = connected;
        }
    }
    
    Bangle.on("lock", b => {
        renderTopBar();
    });
    NRF.on("connect", () => {
        renderTopBar();
    });
    NRF.on("disconnect", () => {
        renderTopBar();
    });
    

    Am I missing anything else?

  • in Bangle.js
    Avatar for Alessandro

    Not sure if ClockFace and Layout libs do that automatically because I'm currently not using them, but are you drawing the screen every minute or so?

    Yes, I configured Clockface with a "precision" of 60 seconds.

    If you draw the screen every cycle, it may be the reason.

    Damn, I didn't notice I forgot to redraw my topbar only if something changed .-. I'll fix asap!

    Thanks!

  • in Bangle.js
    Avatar for Alessandro

    Hello!

    Lately I have little free time but I am trying to work on my own clock using ClockFace and Layout libs.

    My goals are:

    • fullscreen (no widgets)
    • only show date + time + steps
    • custom "widgets" in the top bar
    • battery status in the bottom bar

    After I added the top bar I noticed a HUGE battery drain (30-40% per day!) but I don't undestand why.
    What's wrong with my code?

    The code is in my fork: https://github.com/alessandrococco/Bangl­eApps/blob/poc-my-clock/apps/patclock/ap­p.js

    Thank you! :-)

  • in Bangle.js
    Avatar for Alessandro

    Hi! Didn't know about setLCDOverlay, it's awesome!

    Just installed your test apps, really nice concept, I really like it, thank you!

  • in Bangle.js
    Avatar for Alessandro

    I recently bought a cheap nylon strap https://www.amazon.it/dp/B09Q62CLXV

    It's more comfortable than the silicone one.

Actions