Avatar for Gordon

Gordon

Member since Sep 2013 • Last active Dec 2022

Most recent activity

  • in Bangle.js
    Avatar for Gordon

    Thanks for the update @halemmerich - that log is really interesting.

    TransactionBuilder - Unable to write characteristic: null seems to happen because the characteristic we're writing to (txCharacteristic in BangleJSDeviceSupport) is null. BUT txCharacteristic is only ever written once, in initializeDevice.

    So, it seems this doesn't 'just happen'. There is some kind of reconnect, and BangleJSDeviceSupport is torn down and then restarted, but either initializeDevice doesn't get called, or it does but the characteristics didn't get read and so null gets returned.

    I've had a quick check and it seems like none of the other watches deal with this eventuality - they all assume that getCharacteristic won't return null too.

    But it would explain a lot - there is flow control when sending from Bangle.js to Gadgetbridge, so what happens is Gadgetbridge connects, but never enables notifications on the Bluetooth serial characteristic. After a while the Bangle has sent enough data that its internal buffer gets full, and it sits there just waiting for Gadgetbridge to enable notifications on the characteristic, which it never does.

    It looks like initializeDevice is called twice from AbstractBTLEDeviceSupport - once in performInitialized and once in onServicesDiscovered. So maybe if performInitialized gets called and the Bangle isn't connected, we can get in this state where initializeDevice is called before services are discovered?

    I could really do with a Gadgetbridge log including the moment things went wrong to be sure

    ... but this definitely looks like a Gadgetbridge issue now, rather than Bangle.js.

  • in Bangle.js
    Avatar for Gordon

    This is great, thanks! Do you want to add it to the main app loader now it can go in without conflicting?

    ... Or do you think we should have some code in the app loader to automatically uninstall 'conflicting' apps first?

  • in Bangle.js
    Avatar for Gordon

    Revert this PR? https://github.com/espruino/BangleApps/p­ull/2369

    Also I'm really wondering why the watchface is still loaded when the launcher is shown

    You implemented the remove function, but presumably didn't actually manage to remove all of the stuff that the clock loaded in it? https://github.com/pebl-hank/BangleApps/­blob/383f18f92facbf8a4ea44bad2f8ea9ce0f7­63f6a/apps/hworldclock/app.js#L305-L313

    There's info on implementing/testing here: http://www.espruino.com/Bangle.js+Fast+L­oad

    Specifically handling stuff like drag is covered here: http://www.espruino.com/Bangle.js+Fast+L­oad#event-handlers

    Although really for drag you should be using setUI({mode:"custom",clock:true,drag:...­})

    Best bet is just to not have the remove function for now, and then the clock will unload 'normally' and will get rid of all the changes.

  • in Bangle.js
    Avatar for Gordon

    Yes, although when widgets like 'back' remove themselves they clear where they were already. I'm sure there are plenty of others that don't though.

    It's probably one of those things that's far more effort to get working nicely than it is a benefit.

  • in Bangle.js
    Avatar for Gordon

    I don't think you can - I guess the question is why do you need to? Can't you keep track yourself?

  • in Bangle.js
    Avatar for Gordon

    Ok, if you install the latest circlesclock from the development app loader at https://espruino.github.io/BangleApps/

    Then I believe the heart rate monitor should be fixed. It will however be running all the time the circlesclock is showing (with a heart rate circle). Hopefully power draw won't actually be that large now though.

    The tap-to-activate idea was good though, and maybe that should be re-introduced in the clock_info library. You can now tap on an item to select it, then swipe up and down to change (more info in the README).

    What happened was circlesclock got moved over to using something new called clock_info so that it could display a whole bunch of extra stuff: http://www.espruino.com/Bangle.js+Clock+­Info

    ... but that change left all the old code in there, and it seems it also broke anything that should auto-update (like heart rate, altitude, etc). I've fixed it - but it's taken ages and I imagine someone will probably complain that some feature is now missing.

  • in Bangle.js
    Avatar for Gordon

    Hi - I've just looked into this and I'm afraid as far as I can tell this was totally broken by the last set of changes at https://github.com/espruino/BangleApps/p­ull/2251

    I'm going to see if I can fix it now

  • in Bangle.js
    Avatar for Gordon

    I really like to maintain and improve my clocks :D

    I noticed - thank you! It makes a big difference to the quality of them.

    There's a good reason why if you search by most-installed at https://banglejs.com/apps/?c=clock BW Clock is second only to Anton (which is installed by default!)

    Does SlopeClock++ support the weather clock info ?

    It should, yes. Have you tried left-right swipes? The clock_info is in categories and swiping left-right changes category while up/down goes within that category

  • in Bangle.js
    Avatar for Gordon

    Great! Having seen that PR it did make me think that it probably would be preferable to not clear the background of the widget bar at all - since I think nearly every widget already clears the background itself anyway.

    ... but as you saw I think changing it and then testing it didn't break stuff could be quite a big undertaking :)

  • in Bangle.js
    Avatar for Gordon

    Yes - you can use g.setRotation(2) (you need to redraw after it).

    The screen won't automatically swap back when the next app loads (since it's set up so left-handed users can permanently keep their watch in that state), so you'll need to implement a handler for the Bangle.on('kill', ...) event to call g.setRotation(0) to put it back.

Actions