Avatar for rigrig


Member since Apr 2020 • Last active Sep 2021
  • 1 conversations

Most recent activity

  • in Bangle.js
    Avatar for rigrig

    Add layout.rerender - so you set modified:true on any item that has changed, and it then automatically updates the layout for those and redraws anything that changed.

    I guess that sounds ideal, but what if changing some text means the item changes size, so adjacent (non-modified) elements would have to move?

    Make it so you specify the layout with the maximum amount of text you expect in any particular field

    That might be a bit tricky with Vector fonts, as it depends on the actual characters.
    I'd really like to see fitWidth/fitHeight being pulled across, maybe even implicit:

    {type:"txt", font:"10%", label:"Vector:10%, automatic width" },
    {type:"txt", width:"120", label:"Vector, fitted to be 120px width" },
    {type:"txt", font:"10%", width:"120", label:"Vector:10%, cropped/padded to 120px" },

    maybe .render should automatically clear the area regardless of bgCol

    Or maybe make bgCol default to g.theme.bg when omitted, and you can set it explicitly to null/false to prevent clearing?

    Another wishlist item: specify width and height in percentages (of whole screen).

    {type:"txt", width:"50%", label:"Vector, fitted to 120px on Bangle.js 1" },
  • in Bangle.js
    Avatar for rigrig

    Gave it a spin, and it works pretty nice. Definitely a huge improvement over fiddling with pixels by hand.

    One minor annoyance I ran into:
    The smoothest way to simply update a bunch of labels with minimal flicker seems to be setting fillx: true and bgCol: g.theme.bg for every element and then do layout.update();layout.render(), but that clutters up the layout object.
    (It annoyed me enough that I wrote some code to add those properties afterwards)
    But maybe once it's baked into the firmware it will be fast enough that we can just do layout.clear();layout.update();layout.re­nder() without too much flicker?

  • in Bangle.js
    Avatar for rigrig

    This looks pretty neat, hopefully I'll have some time to play with it this weekend.

    Would it be bloaty to add something like this (untested):

      Layout.prototype.setLabel = function(id, label) {
          var l = this._l;
          if (l[id].label !== label) {
              l[id].label = label;

    (or even add it to txt/btn elements, so you could just do layout.date.setLabel('New label'))

    Just because I expect otherwise the compare-clear-update-render code will probably show up in pretty much all apps anyway.

  • in Bangle.js
    Avatar for rigrig

    I think the documentation is lagging behind a bit, but the polyfill from the bootloader should clarify some things.

    "clock" is not a callback, it is the mode. For "clock" mode it simply loads the launcher when BTN2 is pressed, so there is no need to pass a callback.

  • in Bangle.js
    Avatar for rigrig

    g is the constant for standard acceleration due to gravity: 9.8 m/s².
    This pops up a lot in accelerometers, because a sensor at rest measures 1g in the vertical direction.

  • in Bangle.js
    Avatar for rigrig

    If it's going to rescale anyway, maybe use m/s²?

  • in Bangle.js
    Avatar for rigrig

    This would be very nice, fiddling with UI positions is definitely one of my least favorite activities.

    I think we also want align:, and a way to specify which part of the screen to use. a) so you can use it with or without widgets, and b) to test if a layout fits on a smaller screen.
    (But default to just using the whole screen, or even check if Bangle.loadwidgets() has been called?)

    It would also be nice if you could make one part get all "remaining" space, so you could do something like this:

    var layout = ["vertical",
      {type:"text", font:"6x8", txt:"Temperature"},   // centered? at top of screen
      ["horizontal",               // right below "Temperature"
        {type:"text", font:"30%", txt:"20.0"},    // against left screen edge
        {type:"text", font:"6x8", txt:"'C"}       // against right screen edge
      {type:"custom", size:"fill", render:drawThermometer},//draw in middle of screen
      {type:"button", txt:"more...", touch:myTouchHandler},   // centered? at bottom
    function drawThermometer(x,y,w,h) {
      // x,y,w,h: available space after other parts are placed

    Some more questions:

    • What happens if you re-render just one "6x8" text, but it now has a different length?
    • How to handle buttons on a Bangle.js 1.0?
  • in Bangle.js
    Avatar for rigrig

    Did you setup Gadgetbridge weather reporting on your phone?

    The watch weather app doesn't check whether Gadgetbridge is connected or not, just that it has not received weather data, so it shows 'Is Gadgetbridge connected?'.

  • in Bangle.js
    Avatar for rigrig

    Nice, and using setTime is a nice touch.
    Why can't it use getPixel to get a "real" screenshot?

  • in Bangle.js
    Avatar for rigrig

    Not having the ability to screenshot on the Bangle feels like a big issue

    For most apps like clocks using the emulator would probably work, but maybe "adding screenshots is a good idea" should be documented a bit more? It's easy to overlook for people who just spent a lot of time staring at the app while developing it.
    (Somewhat off-topic: a nice addition might be some way to specify a single screenshot per app which is displayed right away in the list of apps.)

    Download stats would definitely be nice to see, but you run the risk of a feedback loop where people keep downloading the most downloaded apps.
    Maybe the About page could get a button to "Participate in survey", to submit currently installed apps? That way it's opt-in, and the idea is that people submit their setup once they are happy with it, so you won't count e.g. five HRMs per user while they try them all out.
    (And because they are submitted as set, you could even suggest apps "often used together")