diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-11-11 14:24:49 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-11-11 14:24:49 -0600 |
commit | 0bc27ddeae03930deb6106144b49e0614fe002da (patch) | |
tree | 1947f20d708343f1965ae12c21454f4f0fab224b /Layout | |
parent | 4e31ea44c166a59a273a51597c498c1367eeb38d (diff) | |
download | mtdot-box-evb-factory-firmware-0bc27ddeae03930deb6106144b49e0614fe002da.tar.gz mtdot-box-evb-factory-firmware-0bc27ddeae03930deb6106144b49e0614fe002da.tar.bz2 mtdot-box-evb-factory-firmware-0bc27ddeae03930deb6106144b49e0614fe002da.zip |
add layout for startup screen, tweak main to display startup and sit in loop
Diffstat (limited to 'Layout')
-rw-r--r-- | Layout/LayoutStartup.cpp | 25 | ||||
-rw-r--r-- | Layout/LayoutStartup.h | 23 |
2 files changed, 48 insertions, 0 deletions
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 |