Now turns GPS off after upload
parent
46dca3a686
commit
332fed8e3d
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: Update to work with Bangle.js 2
|
0.02: Update to work with Bangle.js 2
|
||||||
0.03: Select GNSS systems to use for Bangle.js 2
|
0.03: Select GNSS systems to use for Bangle.js 2
|
||||||
|
0.04: Now turns GPS off after upload
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
function jsFromBase64(b64) {
|
function jsFromBase64(b64) {
|
||||||
var bin = atob(b64);
|
var bin = atob(b64);
|
||||||
var chunkSize = 128;
|
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
|
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 += `\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
|
//js += "\x10var t=getTime()+1;while(t>getTime());\n"; // wait 1 sec
|
||||||
|
|
@ -158,6 +158,7 @@
|
||||||
var chunk = bin.substr(i,chunkSize);
|
var chunk = bin.substr(i,chunkSize);
|
||||||
js += `\x10Serial1.write(atob("${btoa(chunk)}"))\n`;
|
js += `\x10Serial1.write(atob("${btoa(chunk)}"))\n`;
|
||||||
}
|
}
|
||||||
|
js = "\x10setTimeout(() => Bangle.setGPSPower(0,'agps'), 1000);\n"; // turn GPS off after a delay
|
||||||
return js;
|
return js;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "assistedgps",
|
"id": "assistedgps",
|
||||||
"name": "Assisted GPS Updater (AGPS)",
|
"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.",
|
"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,
|
"sortorder": -1,
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue