-
I can confirm that commit 5be8869ae36b7d9fe955e1b1071b9f8a58a038cf produces the problem:
let firstFix = true; let mesureStartTime; let latestLogTime; function calcTimeDifference(fix) { if (!fix.time) { return; } const currentDateTime = new Date(); const delta = currentDateTime - fix.time; if (firstFix || delta < 0) { // Set the time to the first time received, or if the time is behind the GPS time // because we have a forward drift console.log(`${fix.time.toISOString()} Start measuring`); setTime((new Date() - delta) / 1000); firstFix = false; mesureStartTime = latestLogTime = new Date(); } else if (!latestLogTime || (currentDateTime - latestLogTime) > 60000) { const measureSeconds = (currentDateTime - mesureStartTime) / 1000; console.log(`${currentDateTime.toISOString()} difference ${(delta / 1000).toFixed(3)} second/s within ${measureSeconds.toFixed(3)} second/s`); latestLogTime = currentDateTime; } } console.log(process.env.VERSION); Bangle.on("GPS", calcTimeDifference); Bangle.setGPSPower(1);
2v21.123 2024-06-23T18:08:40.000Z Start measuring 2024-06-23T18:09:40.012Z difference 0.013 second/s within 60.009 second/s 2024-06-23T18:10:40.020Z difference 0.020 second/s within 120.016 second/s 2024-06-23T18:11:40.025Z difference 0.025 second/s within 180.022 second/s 2024-06-23T18:12:40.033Z difference 0.034 second/s within 240.030 second/s 2024-06-23T18:13:41.026Z difference 0.026 second/s within 301.023 second/s 2024-06-23T18:14:42.019Z difference 0.019 second/s within 362.016 second/s 2024-06-23T18:15:42.023Z difference 0.024 second/s within 422.020 second/s
2v21.124 2024-06-23T18:49:06.063Z Start measuring 2024-06-23T18:50:06.106Z difference 0.044 second/s within 60.039 second/s 2024-06-23T18:51:06.146Z difference 0.084 second/s within 120.079 second/s 2024-06-23T18:52:06.182Z difference 0.119 second/s within 180.116 second/s 2024-06-23T18:53:06.216Z difference 0.153 second/s within 240.149 second/s 2024-06-23T18:54:06.250Z difference 0.187 second/s within 300.183 second/s 2024-06-23T18:55:06.286Z difference 0.224 second/s within 360.219 second/s 2024-06-23T18:56:06.328Z difference 0.266 second/s within 420.262 second/s
-
-
Change #L95 from
if (this.onPressure) Bangle.removeListener('onPressure', this.onPressure);
to
if (this.onPressure) Bangle.removeListener('pressure', this.onPressure);
('pressure' not 'onPressure')
should fix it.
-
-
Hello,
it looks like Gadgetbridge sends sent commands to all connected Bangles via the integrated Apploder.
I have connected 2 Bangles at the same time.
When I open the apploader after a short time the message "Getting app list failed, invalid JSON" appears.Because I wanted to clean up my Test Bangle I went to the "More" tab and clicked "Remove all Apps".
Then both bangles were "cleaned up".
Gadgetbridge Version: 0.71.2a-banglejs
-
I think you mean something like this:
new Issue linkBut then you lose the Github forms option, which we are using at the moment.
-
-
I have created 2 pull requests.
The first one adds the versions to the list of installed apps (preview: https://barts23.github.io/BangleApps/).
The second adds a "New issue on github" button that opens a new pre-filled issue on github.
Until the PRs are merged, the issue is pre-filled with only the firmware version of the connected bangle. -
Something else, I noticed that on the apploader from the website, agps offers to download datas from different kinds of sattelites, whereas in the gadgetbridge app, it doesn't offer the sattelites, but just data for different durations.
What you describe is the difference between Bangle.js 1 and Bangle.js 2.
For Bangle.js 1 different time periods are offered, for Bangle.js 2 only the satellite settings.The data are not compatible with each other, but they are uploaded without error message.
Maybe the apploader in the gadgetbridge app recognized your Bangle.js incorrectly?
-
I know that it is possible to start espruino itself, but then there is no
Bangle.*
Can I get espruino to load the current Bangle/Emscripten build on the console?
I have successfully created emulator_banglejs2.js.
But when I create./espruino emulator_banglejs2.js
I get the following error:
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v14.49 (c) 2021 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Uncaught Error: Can only use 'arguments' variable inside a function
-
You can try the following code:
Bangle.on("swipe", function(dirLeftRight, dirUpDown) { if (dirLeftRight == -1) { // left console.log("left"); } else if (dirLeftRight == 1) { // right console.log("right"); } else if (dirUpDown == -1) { // up console.log("Up"); } else if (dirUpDown == 1) { // down console.log("Down"); } });
-
-
My child had a run this weekend.
The distance was 1500m.
Unfortunately, I could not fully measure this run with the app, because the distance is rounded mathematically.With a planned distance of 15km, the app would already show 15km after 14501 meters.
I think it would be better to round off the measured distance.
Or is it just me who feels this is wrong? -
Does your script work indoors?
In my apartment and at work it also works indoor.
What sort of drift have you noticed so far between the two?
Approximately every 12 hours the difference increases to 2 seconds.I reset my GPS chip to factory settings with
$PCAS10,3*1F
and still got a time within a second.
I think as long as there is a satelite in view, it will also find the time. -
It may be possible to make it much simpler.
The GPS chip already provides the time about 1-2 seconds after switching on (even without fix).
I wrote an app, which turns on GPS every 4 hours, sets the clock if necessary and then turns off the GPS again.
If no time is received within 10 seconds, the GPS is also switched off.
A log file is written to measure the deviations and possibly make adjustments in the rhythm (this must be deleted manually).
Unfortunately I am not that experienced in writing js.
I would be happy if someone could review my PR (https://github.com/espruino/BangleApps/pull/1342). -
-
I have tried the AGPS update on my Bangle 2.
Unfortunately, I no longer get any GPS messages.
Neither via on('GPS-raw'), nor via on('GPS').I tried a reboot, reboot without code and factory reset.
Nothing helped.>Bangle.on("GPS", print) =undefined >Bangle.on("GPS-raw", print) =undefined >Bangle.setGPSPower(1) =true ÿ$GPTXT,01,01,02,MA=CASIC*27 false $GPTXT,01,01,02,IC=AT6558-5N-32-1C510800*48 false $GPTXT,01,01,02,SW=URANUS5,V5.1.0.0*1F false $GPTXT,01,01,02,TB=2018-04-18,10:28:16*40 false $GPTXT,01,01,02,MO=GB*77 false >new Date =Date: Wed Jan 12 2022 15:35:25 GMT+0100 >new Date =Date: Wed Jan 12 2022 15:37:37 GMT+0100
@user157973 are you from Turkey?
In Turkish the small i is missing the dot, if I remember correctly.
https://www.compart.com/unicode/U+0131
Could be a character set problem.