From 7f56fcdc391d449c749ff794518b7fff328d996a Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Fri, 4 Dec 2015 10:21:27 -0600 Subject: display if GPS was detected on startup screen --- Layout/LayoutStartup.cpp | 11 +++++++++++ Layout/LayoutStartup.h | 2 ++ 2 files changed, 13 insertions(+) (limited to 'Layout') diff --git a/Layout/LayoutStartup.cpp b/Layout/LayoutStartup.cpp index c317a7f..1662155 100644 --- a/Layout/LayoutStartup.cpp +++ b/Layout/LayoutStartup.cpp @@ -11,6 +11,7 @@ LayoutStartup::LayoutStartup(DOGS102* lcd, mDot* dot) _lVersion(0, 5, "Version"), _fVersion(8, 5, 9), _fId(0, 7, 17), + _fGps(0, 6, 17), _iLogo(0, 0, MultiTech_Logo) {} @@ -32,3 +33,13 @@ void LayoutStartup::display() { endUpdate(); } + +void LayoutStartup::updateGPS(bool gps) { + char buf[32]; + size_t size; + + memset(buf, 0, sizeof(buf)); + size = snprintf(buf, sizeof(buf), "%sGPS Detected", gps ? "" : "No "); + writeField(_fGps, buf, size); +} + diff --git a/Layout/LayoutStartup.h b/Layout/LayoutStartup.h index c67ab1e..4490887 100644 --- a/Layout/LayoutStartup.h +++ b/Layout/LayoutStartup.h @@ -10,6 +10,7 @@ class LayoutStartup : public Layout { ~LayoutStartup(); void display(); + void updateGPS(bool gps); private: mDot* _dot; @@ -19,6 +20,7 @@ class LayoutStartup : public Layout { Label _lVersion; Field _fVersion; + Field _fGps; Field _fId; Image _iLogo; -- cgit v1.2.3