mirror of https://github.com/espruino/BangleApps
GPS Info: Show number of satellites while waiting for fix
parent
50e61015ec
commit
9edc3a6592
|
@ -722,7 +722,7 @@
|
||||||
"id": "gpsinfo",
|
"id": "gpsinfo",
|
||||||
"name": "GPS Info",
|
"name": "GPS Info",
|
||||||
"icon": "gps-info.png",
|
"icon": "gps-info.png",
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"description": "An application that displays information about altitude, lat/lon, satellites and time",
|
"description": "An application that displays information about altitude, lat/lon, satellites and time",
|
||||||
"tags": "gps",
|
"tags": "gps",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
0.02: Ensure screen doesn't display garbage at startup
|
0.02: Ensure screen doesn't display garbage at startup
|
||||||
|
0.03: Show number of satellites while waiting for fix
|
|
@ -52,7 +52,11 @@ function onGPS(fix) {
|
||||||
g.setFont("6x8", 2);
|
g.setFont("6x8", 2);
|
||||||
g.drawString("Waiting for GPS", 120, 80);
|
g.drawString("Waiting for GPS", 120, 80);
|
||||||
nofix = (nofix+1) % 4;
|
nofix = (nofix+1) % 4;
|
||||||
g.drawString(".".repeat(nofix) + " ".repeat(4-nofix), 120, 120)
|
g.drawString(".".repeat(nofix) + " ".repeat(4-nofix), 120, 120);
|
||||||
|
// Show number of satellites:
|
||||||
|
g.setFontAlign(0,0);
|
||||||
|
g.setFont("6x8");
|
||||||
|
g.drawString(fix.satellites+" satellites", 120, 100);
|
||||||
}
|
}
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue