From 0bc27ddeae03930deb6106144b49e0614fe002da Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 11 Nov 2015 14:24:49 -0600 Subject: add layout for startup screen, tweak main to display startup and sit in loop --- Layout/LayoutStartup.cpp | 25 +++++++++++++++++++++++++ Layout/LayoutStartup.h | 23 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Layout/LayoutStartup.cpp create mode 100644 Layout/LayoutStartup.h (limited to 'Layout') diff --git a/Layout/LayoutStartup.cpp b/Layout/LayoutStartup.cpp new file mode 100644 index 0000000..c005b2f --- /dev/null +++ b/Layout/LayoutStartup.cpp @@ -0,0 +1,25 @@ +#include "LayoutStartup.h" +#include "MultiTech_Logo.h" +#include "version.h" + +LayoutStartup::LayoutStartup(DOGS102* lcd) + : Layout(lcd), + _lName(0, 3, "MTDOT-BOX/EVB"), + _lInfo(0, 4, "Factory Firmware"), + _lVersion(0, 5, "Version"), + _fVersion(8, 5, 9), + _iLogo(0, 0, MultiTech_Logo) +{} + +void LayoutStartup::display() { + clear(); + startUpdate(); + + writeImage(_iLogo._col, _iLogo._row, _iLogo._bmp); + writeField(_lName._col, _lName._row, _lName._value); + writeField(_lInfo._col, _lInfo._row, _lInfo._value); + writeField(_lVersion._col, _lVersion._row, _lVersion._value); + writeField(_fVersion._col, _fVersion._row, MTDOT_BOX_VERSION, sizeof(MTDOT_BOX_VERSION)); + + endUpdate(); +} diff --git a/Layout/LayoutStartup.h b/Layout/LayoutStartup.h new file mode 100644 index 0000000..de8935e --- /dev/null +++ b/Layout/LayoutStartup.h @@ -0,0 +1,23 @@ +#ifndef __LAYOUTSTARTUP_H__ +#define __LAYOUTSTARTUP_H__ + +#include "Layout.h" + +class LayoutStartup : public Layout { + public: + LayoutStartup(DOGS102* lcd); + ~LayoutStartup(); + + void display(); + + private: + Label _lName; + Label _lInfo; + Label _lVersion; + + Field _fVersion; + + Image _iLogo; +}; + +#endif -- cgit v1.2.3