diff --git a/README.md b/README.md index 22a12bd5b..326599d14 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,8 @@ and which gives information about the app for the Launcher. // add an icon to allow your app to be tested "storage": [ // list of files to add to storage - {"name":"appid.js", // filename to use in storage + {"name":"appid.js", // filename to use in storage. + // If name=='RAM', the code is sent directly to Bangle.js and is not saved to a file "url":"", // URL of file to load (currently relative to apps/) "content":"..." // if supplied, this content is loaded directly "evaluate":true // if supplied, data isn't quoted into a String before upload diff --git a/apps.json b/apps.json index 7f97b6f84..284116c5e 100644 --- a/apps.json +++ b/apps.json @@ -895,6 +895,17 @@ {"name":"gpsinfo.img","url": "gps-info-icon.js","evaluate": true} ] }, + { "id": "assistedgps", + "name": "Assisted GPS Update", + "icon": "app.png", + "version":"0.01", + "description": "Downloads assisted GPS data to Bangle.js for faster GPS startup and more accurate fixes", + "custom": "custom.html", + "tags": "tool,outdoors", + "readme": "README.md", + "storage": [ + ] + }, { "id": "pomodo", "name":"Pomodoro", diff --git a/apps/assistedgps/ChangeLog b/apps/assistedgps/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/assistedgps/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/assistedgps/app.png b/apps/assistedgps/app.png new file mode 100644 index 000000000..970e85139 Binary files /dev/null and b/apps/assistedgps/app.png differ diff --git a/apps/assistedgps/custom.html b/apps/assistedgps/custom.html new file mode 100644 index 000000000..e86c660b9 --- /dev/null +++ b/apps/assistedgps/custom.html @@ -0,0 +1,113 @@ + +
+ + + + +GPS can take a long time (~5 minutes) to get an accurate position the first time it is used. + AGPS uploads a few hints to the GPS receiver about satellite positions that allow it + to get a faster, more accurate fix - however they are only valid for a short period of time.
+You can upload data that covers a longer period of time, but the upload will take longer.
+Click
+ + + + + + diff --git a/core b/core index c99967381..1b66c4ce1 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c99967381280f483877c3f11ae7b0d4dc8c53e0e +Subproject commit 1b66c4ce1ba71036bcb612a2f16bbd7fbc2c66de diff --git a/testing/GPS-comms.js b/testing/GPS-comms.js index 38d4c9dde..ca0db16b6 100644 --- a/testing/GPS-comms.js +++ b/testing/GPS-comms.js @@ -16,7 +16,7 @@ function writeGPScmd(cmd) { a += d[i]; b += a; } - d.push(a,b); + d.push(a&255,b&255); Serial1.write(d); } function readGPScmd(cmd, callback) { @@ -131,7 +131,7 @@ function setUBX_MGA_INI_TIME_UTC() { dv.setUint8(9, d.getMinutes()); dv.setUint8(10, d.getSeconds()); dv.setUint16(16, 10*60); // seconds part of accuracy - 10 minutes - writeGPScmd(a.slice()); + writeGPScmd([].slice.call(a)); } setUBX_MGA_INI_TIME_UTC();