0.25: Fix issue where if Bangle.js 2 got a GPS fix but no reported time, errors could be caused by the widget (fix #935)
parent
c03ab08687
commit
cd1daba0c5
|
|
@ -661,7 +661,7 @@
|
||||||
{
|
{
|
||||||
"id": "gpsrec",
|
"id": "gpsrec",
|
||||||
"name": "GPS Recorder",
|
"name": "GPS Recorder",
|
||||||
"version": "0.24",
|
"version": "0.25",
|
||||||
"description": "Application that allows you to record a GPS track. Can run in background",
|
"description": "Application that allows you to record a GPS track. Can run in background",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tool,outdoors,gps,widget",
|
"tags": "tool,outdoors,gps,widget",
|
||||||
|
|
|
||||||
|
|
@ -26,3 +26,4 @@
|
||||||
0.22: Ensure Bangle.setGPSPower uses 'gpsrec' as a tag
|
0.22: Ensure Bangle.setGPSPower uses 'gpsrec' as a tag
|
||||||
0.23: Fix issue where tracks wouldn't record when running from OpenStMap if a period hadn't been set up first
|
0.23: Fix issue where tracks wouldn't record when running from OpenStMap if a period hadn't been set up first
|
||||||
0.24: Better support for Bangle.js 2, avoid widget area for Graphs, smooth graphs more
|
0.24: Better support for Bangle.js 2, avoid widget area for Graphs, smooth graphs more
|
||||||
|
0.25: Fix issue where if Bangle.js 2 got a GPS fix but no reported time, errors could be caused by the widget (fix #935)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
fixToggle = !fixToggle;
|
fixToggle = !fixToggle;
|
||||||
WIDGETS["gpsrec"].draw();
|
WIDGETS["gpsrec"].draw();
|
||||||
if (hasFix) {
|
if (hasFix) {
|
||||||
|
if (fix.time===undefined) fix.time = new Date(); // Bangle.js 2 can provide a fix before time it seems
|
||||||
var period = fix.time.getTime() - lastFixTime;
|
var period = fix.time.getTime() - lastFixTime;
|
||||||
if (period+500 > settings.period*1000) { // round up
|
if (period+500 > settings.period*1000) { // round up
|
||||||
lastFixTime = fix.time.getTime();
|
lastFixTime = fix.time.getTime();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue