diff --git a/apps.json b/apps.json index 94609831a..23a0638da 100644 --- a/apps.json +++ b/apps.json @@ -2822,8 +2822,8 @@ "name": "Walkers Clock", "shortName":"Walkers Clock", "icon": "walkersclock48.png", - "version":"0.02", - "description": "A larg font watch, displays steps, can switch GPS on/off, displays grid reference", + "version":"0.03", + "description": "A large font watch, displays steps, can switch GPS on/off, displays grid reference", "type":"clock", "tags": "clock, gps, tools, outdoors", "readme": "README.md", diff --git a/apps/walkersclock/ChangeLog b/apps/walkersclock/ChangeLog index 411b8503c..41f1cf805 100644 --- a/apps/walkersclock/ChangeLog +++ b/apps/walkersclock/ChangeLog @@ -1,2 +1,3 @@ 0.01: First version of the Walkers Clock 0.02: Fixed screen flicker +0.03: Added display of GPS fix lat/lon and course \ No newline at end of file diff --git a/apps/walkersclock/app.js b/apps/walkersclock/app.js index 5e4b114a9..001a3edcd 100644 --- a/apps/walkersclock/app.js +++ b/apps/walkersclock/app.js @@ -34,8 +34,10 @@ const GPS_SATS = "gps_sats"; const GPS_RUNNING = "gps_running"; const GDISP_OS = "g_osref"; +const GDISP_LATLN = "g_latln"; const GDISP_SPEED = "g_speed"; const GDISP_ALT = "g_alt"; +const GDISP_COURSE = "g_course"; const Y_TIME = 40; const Y_ACTIVITY = 120; @@ -138,14 +140,21 @@ function drawActivity() { case GDISP_OS: activityStr = ref; break; + case GDISP_LATLN: + g.setFontVector(26); + activityStr = last_fix.lat.toFixed(4) + ", " + last_fix.lon.toFixed(4); + break; case GDISP_SPEED: speed = last_fix.speed; speed = speed.toFixed(1); - activityStr = speed + "kph" + activityStr = speed + "kph"; break; case GDISP_ALT: activityStr = last_fix.alt + "m"; break; + case GDISP_COURSE: + activityStr = last_fix.course; + break; } g.clearRect(0, Y_ACTIVITY, 239, Y_MODELINE - 1); @@ -203,12 +212,18 @@ function drawInfo() { case GDISP_OS: str = "GPS: Grid"; break; + case GDISP_LATLN: + str = "GPS: Lat,Lon"; + break; case GDISP_SPEED: str = "GPS: Speed"; break; case GDISP_ALT: str = "GPS: Alt"; break; + case GDISP_COURSE: + str = "GPS: Course"; + break; } drawModeLine(str,col); return; @@ -280,6 +295,12 @@ function changeInfoMode() { gpsDisplay = GDISP_ALT; break; case GDISP_ALT: + gpsDisplay = GDISP_COURSE; + break; + case GDISP_COURSE: + gpsDisplay = GDISP_LATLN; + break; + case GDISP_LATLN: default: gpsDisplay = GDISP_OS; break;