diff --git a/apps/assistedgps/ChangeLog b/apps/assistedgps/ChangeLog index 739ccf915..ff2de6f67 100644 --- a/apps/assistedgps/ChangeLog +++ b/apps/assistedgps/ChangeLog @@ -1,3 +1,4 @@ 0.01: New App! 0.02: Update to work with Bangle.js 2 0.03: Select GNSS systems to use for Bangle.js 2 +0.04: Now turns GPS off after upload diff --git a/apps/assistedgps/custom.html b/apps/assistedgps/custom.html index 80d68a71f..75a4ecf32 100644 --- a/apps/assistedgps/custom.html +++ b/apps/assistedgps/custom.html @@ -133,7 +133,7 @@ function jsFromBase64(b64) { var bin = atob(b64); var chunkSize = 128; - var js = "\x10Bangle.setGPSPower(1);\n"; // turn GPS on + var js = "\x10Bangle.setGPSPower(1,'agps');\n"; // turn GPS on if (isB1) { // UBLOX //js += `\x10Bangle.on('GPS-raw',function (d) { if (d.startsWith("\\xB5\\x62\\x05\\x01")) Terminal.println("GPS ACK"); else if (d.startsWith("\\xB5\\x62\\x05\\x00")) Terminal.println("GPS NACK"); })\n`; //js += "\x10var t=getTime()+1;while(t>getTime());\n"; // wait 1 sec @@ -158,6 +158,7 @@ var chunk = bin.substr(i,chunkSize); js += `\x10Serial1.write(atob("${btoa(chunk)}"))\n`; } + js = "\x10setTimeout(() => Bangle.setGPSPower(0,'agps'), 1000);\n"; // turn GPS off after a delay return js; } diff --git a/apps/assistedgps/metadata.json b/apps/assistedgps/metadata.json index 4c91dcd35..ac9fe5725 100644 --- a/apps/assistedgps/metadata.json +++ b/apps/assistedgps/metadata.json @@ -1,7 +1,7 @@ { "id": "assistedgps", "name": "Assisted GPS Updater (AGPS)", - "version": "0.03", + "version": "0.04", "description": "Downloads assisted GPS (AGPS) data to Bangle.js for faster GPS startup and more accurate fixes. **No app will be installed**, this just uploads new data to the GPS chip.", "sortorder": -1, "icon": "app.png",