Merge pull request #2503 from myxor/gpsinfo

GPS Info: Fix number of packets received
pull/2506/head
Gordon Williams 2023-01-16 08:48:28 +00:00 committed by GitHub
commit 0e3d69f06a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -8,3 +8,4 @@
0.09: Fix FIFO_FULL error
0.10: Show satellites "in view" separated by GNS-system
0.11: Show number of packets received
0.12: Fix number of packets received

View File

@ -61,6 +61,7 @@ function getMaidenHead(param1,param2){
return U[fLon]+U[fLat]+sqLon+sqLat+L[subLon]+L[subLat]+extLon+extLat;
}
function onGPS(fix) {
dataCounter++;
if (lastFix.fix != fix.fix) {
// if fix is different, change the layout
if (fix.fix && leaveNofixLayout) {
@ -127,10 +128,10 @@ function onGPS(fix) {
layout.progress.label = "in view GP/BD/GL: " + nofGP + " " + nofBD + " " + nofGL;
// console.log("in view GP/BD/GL: " + nofGP + " " + nofBD + " " + nofGL);
layout.render(layout.progress);
layout.clear(layout.dataCounter);
layout.dataCounter.label = ++dataCounter;
layout.render(layout.dataCounter);
}
layout.clear(layout.dataCounter);
layout.dataCounter.label = dataCounter;
layout.render(layout.dataCounter);
}
if (listenerGPSraw == 0 && !fix.fix) {
@ -157,6 +158,7 @@ Bangle.on('GPS', onGPS);
//Bangle.on('GPS-raw', onGPSraw);
Bangle.setGPSPower(1, "app");
function exitApp() {
load();
}

View File

@ -1,7 +1,7 @@
{
"id": "gpsinfo",
"name": "GPS Info",
"version": "0.11",
"version": "0.12",
"description": "An application that displays information about latitude, longitude, altitude, speed, satellites and time",
"icon": "gps-info.png",
"type": "app",