Avatar for Alessandro

Alessandro

Member since Oct 2021 • Last active Sep 2022
  • 8 conversations
  • 144 comments

Most recent activity

  • 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.

    • 4 comments
    • 695 views
  • in Bangle.js
    Avatar for Alessandro

    I don't think we should make the clock do this

    I just realized that a clockface hourstrike wouldn't work if the clock is not active 😅 Yes, bootcode should be a better place for it.

    How about linking it to Quiet Mode?

    That's what I was thinking! In a local branch I'm trying to "merge" the Quiet Mode Schedule into the default quiet mode menu - imho there's no need to have a "quiet mode" menu and a different app to manage it.

    We can make qmsched emit an event when switching, and have ClockFace force a redraw when that happens, so the clock can adjust it's precision then.

    I like it!

  • in Bangle.js
    Avatar for Alessandro

    You could use the new ClockFace library and avoid low-level boilerplate :)

Actions