forked from FOSS/BangleApps
Merge pull request #252 from myxor/gps-info-satellites
GPS Info: Show number of satellites while waiting for fixmaster
commit
82790d5f38
|
@ -722,7 +722,7 @@
|
|||
"id": "gpsinfo",
|
||||
"name": "GPS Info",
|
||||
"icon": "gps-info.png",
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"description": "An application that displays information about altitude, lat/lon, satellites and time",
|
||||
"tags": "gps",
|
||||
"type": "app",
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
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.drawString("Waiting for GPS", 120, 80);
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue