Start GPS after loading app, just in case widgets affect it (#449)

master
Gordon Williams 2020-05-26 17:02:10 +01:00
parent 43c81b06dc
commit 5530b80ca8
3 changed files with 4 additions and 3 deletions

View File

@ -303,7 +303,7 @@
{ "id": "speedo", { "id": "speedo",
"name": "Speedo", "name": "Speedo",
"icon": "speedo.png", "icon": "speedo.png",
"version":"0.03", "version":"0.04",
"description": "Show the current speed according to the GPS", "description": "Show the current speed according to the GPS",
"tags": "tool,outdoors,gps", "tags": "tool,outdoors,gps",
"storage": [ "storage": [

View File

@ -2,3 +2,4 @@
0.02: Add widgets to app 0.02: Add widgets to app
0.03: Use offscreen buffer (not doublebuffer) 0.03: Use offscreen buffer (not doublebuffer)
Use 'locale' to get internationalised speed Use 'locale' to get internationalised speed
0.04: Start GPS after loading app, just in case widgets affect it (#449)

View File

@ -1,4 +1,3 @@
Bangle.setGPSPower(1);
var buf = Graphics.createArrayBuffer(240,120,1,{msb:true}); var buf = Graphics.createArrayBuffer(240,120,1,{msb:true});
var lastFix = {fix:0,satellites:0}; var lastFix = {fix:0,satellites:0};
function onGPS(fix) { function onGPS(fix) {
@ -31,3 +30,4 @@ Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();
Bangle.on('GPS', onGPS); Bangle.on('GPS', onGPS);
Bangle.setGPSPower(1);