You are reading a single comment by @Numerist and its replies. Click here to read the full conversation.
  • Problem with GPS: I have a clock face that's almost identical on Bangle.js 1 and 2. Version 1 keeps good time. Version 2 gets ahead by 4 or 5 seconds a day. Both attempt to use GPS time. On rebooting Version 1, I get a notice that GPS time is being used. On Version 2, no notice of that.

    I'm using the app GPS Time with the following custom boot code:

    setInterval(function() {
      Bangle.on("GPS",function cb(g) {
        if (!g.time || (g.time.getFullYear()<2000) ||
           (g.time.getFullYear()>2200)) {
          // GPS receiver's time not set
        } else {
          // We have a GPS time. Set time
    }, (60-(new Date()).getMinutes())*60*1000);

    Should a reboot message appear on Version 2 that GPS time is being used? (Javascript is mostly foreign to me; the custom boot code is mostly Gordon's but for the whole watch the code was created by someone else.)

    The watch face code and/or the custom boot code won't run in the emulator for Bangle.js 2, giving the follow error:

    Uncaught ReferenceError: "BTN3" is not defined
    at line 5 col 13 in .boot1
    global.BTN1=BTN3; global.BTN3=_;

    There is of course no BTN3 in the code itself.


Avatar for Numerist @Numerist started