Avatar for malaire

malaire

Member since Oct 2021 • Last active Jun 2023
  • 15 conversations
  • 211 comments

Most recent activity

    • 14 comments
    • 1,812 views
  • in Bangle.js
    Avatar for malaire

    So maybe temperature has not such a big influence?

    It depends. ppm is most stable around 20°C - 30°C, so if you mostly keep watch in wrist or in room temperature then you don't see much difference in ppm. But if you wear watch in winter on top of clothing the difference can be large.

    Here's graph of my Bangle 2 ppm from year ago:
    (horizontal scale is temperature in Celsius, vertical scale is ppm)

  • in Bangle.js
    Avatar for malaire

    For my "Advanced PPM" I recorded temperature and drift at multiple stable temperatures and then calculated needed quadratic equation from those datapoints.

    While it would be possible for widget to automatically follow temperature and detect when temperature has remained stable long enough, problem is that GPS only works outside and so you can't use e.g. freezer for stable cold temperature, or room temperature for another datapoint as I did.

    I don't see how user would be able to get the needed datapoints at multiple stable temperatures with GPS.

    (I guess it might be possible to calculate needed quadratic equation without stable temperatures but my math skills aren't enough for that.)

  • in Bangle.js
    Avatar for malaire

    I don't think that would help much as drift depends a lot on temperature.

    (In my app loader there is a version which supports "Advanced PPM" which takes temperature into account, but configuring that is so difficult that I didn't publish that version into main app loader.)

  • in Bangle.js
    Avatar for malaire

    Some code for an example. If you define your widget as

    WIDGETS.mywidget = {
        area: ...,
        draw: ...,
        width: ...,
        someVariable: 123,
        someFunction: () => { ... },
      };
    

    Then in your clock, after calling Bangle.loadWidgets(), you can use WIDGETS.mywidget.someVariable and WIDGETS.mywidget.someFunction().

  • in Bangle.js
    Avatar for malaire

    All properties/functions of a widget are globally available as WIDGETS.widgetname.property, for example my widget has function setClockError which is available as WIDGETS.adjust.setClockError(x).

    The reason is that certain processes should not be interrupted when the user presses the button to go to the setting screen.

    All widgets are stopped and restarted when user goes to settings screen, just like when user changes to any other app. (Settings is just one of the apps.)

  • in Bangle.js
    Avatar for malaire

    hmm, how setInterval works if watch time is changed with setTime while setInterval is going?

  • in Bangle.js
    Avatar for malaire

    That's only accurate for first draw. It's better to use this at end of each draw so that every draw will be accurate:

    setTimeout(()=>{
      draw();
    }, 1000 - (Date.now() % 1000));
    
  • in Bangle.js
    Avatar for malaire

    Not necessarily. For example 8x8 bitmap font needs 8 bytes per character and as of Unicode 14.0 there are 144 697 characters, so full font would take about 1.1 MB and would easily fit into Bangle.js 2

    (This ignores the fact that you shouldn't just render each character as-is as there are complex rules of how some Unicode characters should be rendered.)

  • in Bangle.js
    Avatar for malaire

    I think it would make more sense for Espruino to support UTF-8 strings, and then support fonts which include some parts of UTF-8, instead of having codepages.

Actions