Fix number of packets received

master
Marco H 2023-01-15 15:46:54 +01:00
parent 4a7b525a94
commit ab1da4278b
3 changed files with 8 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) {
@ -113,8 +114,12 @@ function onGPS(fix) {
layout.time.label = "Time: "+formatTime(fix.time);
layout.sat.label = "Satellites: "+satellites;
layout.maidenhead.label = "Maidenhead: "+maidenhead;
layout.dataCounter.label = dataCounter;
layout.render();
} else {
layout.clear(layout.dataCounter);
layout.dataCounter.label = dataCounter;
layout.render(layout.dataCounter);
if (fix.satelites != lastFix.satelites) {
layout.clear(layout.sat);
layout.sat.label = fix.satellites;
@ -127,9 +132,6 @@ 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);
}
}
@ -157,6 +159,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",