1
0
Fork 0

Speedo app: Allow widgets

This allows e.g. GPS Recorder to work in the background while running Speedo
master
Erik Andresen 2020-05-07 07:23:20 +02:00
parent 51bf1d4ae4
commit 3dcd5820fc
2 changed files with 4 additions and 2 deletions

View File

@ -286,7 +286,7 @@
{ "id": "speedo",
"name": "Speedo",
"icon": "speedo.png",
"version":"0.01",
"version":"0.02",
"description": "Show the current speed according to the GPS",
"tags": "tool,outdoors,gps",
"storage": [

View File

@ -1,12 +1,14 @@
Bangle.loadWidgets();
Bangle.setGPSPower(1);
Bangle.setLCDMode("doublebuffered");
var lastFix = {fix:0,satellites:0};
function onGPS(fix) {
lastFix = fix;
g.clear();
Bangle.drawWidgets();
g.setFontAlign(0,0);
g.setFont("6x8");
g.drawString(fix.satellites+" satellites",120,6);
g.drawString(fix.satellites+" satellites",120,36);
if (fix.fix) {
var txt = (fix.speed<20) ? fix.speed.toFixed(1) : Math.round(fix.speed);
var s = 80;