-
• #2
Hi! Thanks for tracking this down, that's a huge help!
I think you're right - it's nicer to put it in Gadgetbridge so all the GPS structs on the Bangle have speed in the same format.
I've just put a fix into Gadgetbridge, so it should be in the next nightly build (or next time I update the play store)
-
• #3
Thanks Gordon!
I'll wait for the next F-Droid Bangle.js Gadgetbridge update.For anybody stumbling across this post, this is my temporary work-around:
var androidOverwriteGps = false; var androidSettings = require("Storage").readJSON("android.settings.json",1)||{}; if ('overwriteGps' in androidSettings && androidSettings.overwriteGps) androidOverwriteGps = true; ... [snip] ... if (androidOverwriteGps) // speed from Android GPS is in m/s (not kph) fix.speed *= 3.6;
Hi fellow Banglers
While working on an app which also displays the current speed, I've noticed that the read-out was wrong when using the "Overwrite GPS" function of the Android integration. I'm not a Java expert, but as far as I can tell, the code in Gadgetbride (app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java) forwards the Android
location.getSpeed()
unchanged. According to the Android SDK, that's in "meters per second" - so, not what the Bangle API should return (ie. kph).I think the correct fix (speed * 3.6) should be done in Gadgetbridge. Alternatively, the Bangle android app could do the same. Thoughts?
BTW I'm new to Bangle coding. The watch is brilliant!