Avatar for Numerist

Numerist

Member since Jan 2021 • Last active Jan 2022
  • 5 conversations
  • 86 comments

Most recent activity

  • in Bangle.js
    Avatar for Numerist
    1. Does GPS time run on Bangle.js 2 indoors after being connected outdoors?

    2. Is it possible to sync with an iPhone's time? Automatically once or twice a day, if possible.

  • in Bangle.js
    Avatar for Numerist

    What does this do?

  • in Bangle.js
    Avatar for Numerist

    @myownself
    It's possible that on Bangle.js 2, the time gains too much. There are variables still to test, and it's still possible that the code I'm using for a very specialized clock (that no one else uses) is the problem. However, overnight the well-known Anton Clock seems to have gained a lot also. Temperature is not the factor here.

    I'm interested to know whether others have the gaining problem that @malaire and I have noticed.

    Gaining 2 seconds a day is okay with me only if I have a way to automatically correct that daily. At present the only way I know is to reload my watch script manually, although just now even that didn't work.

    If I could sync to an iPhone, I'd be all set. I'm not aware that's possible.

    I'm not a coder and know very little of javascript or about Bangle.js. I still don't know whether on Bangle.js 2 the GPS time, once set outside, still works inside, and whether I can access it continually. That seemed to solve my time problem on Bangle.js 1.

  • in Bangle.js
    Avatar for Numerist

    For watch 2 I'd like to know a way to invoke GPS time that is likely to work and is necessarily different from what I had in watch 1.

    Of course, GPS time needs to work on watch 2 indoors with no satellite, after an outdoor connection. Is that possible?

  • in Bangle.js
    Avatar for Numerist
    1. Is there a difference between watch 1 and watch 2 in the way they keep the time steady?

    2. Is there a difference in the way the two watches recognize or adhere to GPS time?

  • in Bangle.js
    Avatar for Numerist

    Thanks. Setting the watch down to be stationary outdoors fixes the fix problem, so to speak! The watch still gains, possibly not at a continuous rate. After setting GPS Time last night, this morning it may have gained 2+ seconds, and after a total of about 24 hours, it has gained 4+ seconds. Does that suggest anything?

    Rebooting the next day put the watch 15 seconds behind. Reloading the watch script fixed that.

    Why this is happening, I don't know, because it isn't happening now with Bangle.js 1.

  • in Bangle.js
    Avatar for Numerist

    The code below takes out the checks mentioned above. The watch (Dozenal Time 2 on Bangle.js 2) still gains 4+ seconds a day. (Bangle.js 1 does not.)

    Can it be determined from this whether it is reading GPS time, continually? Must the GPS be acquired and set before the watch face is uploaded? The reverse? Does it matter?

    I apologize once again for not being a scripter. Most of the rest of the watch code was written by a person who left the project. A little of the most obvious javascript I understand, but that's all.

    // Time fix with GPS
    function fixTime() {
    	Bangle.on("GPS",function cb(g) {
    		Bangle.setGPSPower(0,"time");
    		Bangle.removeListener("GPS",cb);
    		// We have a GPS time. Set time
    		setTime(g.time.getTime()/1000);
    		}
        );
    	Bangle.setGPSPower(1,"time");
    	setTimeout(fixTime, 10*60*1000); // every 10 minutes
    }
    // Start time fixing with GPS on next 10 minute interval
    setTimeout(fixTime, ((60-(new Date()).getMinutes()) % 10) * 60 * 1000);
    
  • in Bangle.js
    Avatar for Numerist

    Everything's up to date. Apparently running on GPS time, then, watch 1 keeps fairly good time but watch 2 races ahead. Is there a fundamental difference I'm missing?

    Is the set GPS time perhaps not registering in Bangle.js 2?

  • in Bangle.js
    Avatar for Numerist

    2v11 in Bangle 2. I've tried putting the bootcode into the actual watch face code, with the same result. If GPS time is not in firmware, does that mean it can't be accessed at all for registering time in the watch?

  • in Bangle.js
    Avatar for Numerist

    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) {
        Bangle.setGPSPower(0,"time");
        Bangle.removeListener("GPS",cb);
        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
          setTime(g.time.getTime()/1000);
        }
      });
      Bangle.setGPSPower(1,"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.

Actions