diff options
author | Ryan Klaassen <ryan.klaassen@multitech.com> | 2016-08-16 14:07:33 -0500 |
---|---|---|
committer | Ryan Klaassen <ryan.klaassen@multitech.com> | 2016-08-16 14:07:33 -0500 |
commit | 1a729268b2ac7a0e79aee137c4f7c4e27e21f2c3 (patch) | |
tree | b218a7222a0e5d4b2888b24306f2efaa6f7b9ae4 | |
parent | 875d5ed6c71d2ef839bd8c020e42c7ddd9a29623 (diff) | |
download | mtdot-box-evb-factory-firmware-1a729268b2ac7a0e79aee137c4f7c4e27e21f2c3.tar.gz mtdot-box-evb-factory-firmware-1a729268b2ac7a0e79aee137c4f7c4e27e21f2c3.tar.bz2 mtdot-box-evb-factory-firmware-1a729268b2ac7a0e79aee137c4f7c4e27e21f2c3.zip |
Replace Layout.h
-rw-r--r-- | Layout/Layout.h | 84 |
1 files changed, 36 insertions, 48 deletions
diff --git a/Layout/Layout.h b/Layout/Layout.h index 90ffe8d..c493ce2 100644 --- a/Layout/Layout.h +++ b/Layout/Layout.h @@ -16,61 +16,49 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __LAYOUT_H__ -#define __LAYOUT_H__ +#ifndef __LAYOUTJOIN_H__ +#define __LAYOUTJOIN_H__ -#include "DOGS102.h" -#include <string> +#include "Layout.h" +#include "mDot.h" -class Label { +class LayoutJoin : public Layout { public: - Label(uint8_t col, uint8_t row, std::string value); + LayoutJoin(DOGS102* lcd, uint8_t band); + ~LayoutJoin(); - uint8_t _col; - uint8_t _row; - std::string _value; -}; - -class Field { - public: - Field(uint8_t col, uint8_t row, uint8_t maxSize); - - uint8_t _col; - uint8_t _row; - uint8_t _maxSize; -}; - -class Image { - public: - Image(uint8_t col, uint8_t row, const uint8_t* bmp); - - uint8_t _col; - uint8_t _row; - const uint8_t* _bmp; -}; + void display(); + void displayEditFsb(uint8_t rate, uint32_t power, uint8_t band, string key, string id); -class Layout { - public: - Layout(DOGS102* lcd); - ~Layout(); - - virtual void display() = 0; - - protected: - void clear(); - void startUpdate(); - void endUpdate(); - bool writeLabel(const Label& label); - bool writeField(const Field& field, const std::string& value, bool apply = false); - bool writeField(const Field& field, const char* value, size_t size, bool apply = false); - bool writeImage(const Image& image, bool apply = false); - void removeField(const Field& field); + void updateId(std::string id); + void updateKey(std::string key); + void updateFsb(uint8_t band); + void updateJoinFsb(uint8_t band); + void updateRate(uint8_t rate); + void updatePower(uint32_t power); + void updateAttempt(uint32_t attempt); + void updateStatus(std::string status); + void updateCountdown(uint32_t seconds); + void displayCancel(bool display = true); private: - bool writeText(uint8_t col, uint8_t row, const char* value, size_t size); - bool writeBmp(uint8_t col, uint8_t row, const uint8_t* bmp); + Label _lId; + Label _lKey; + Label _lFsb; + Label _lRate; + Label _lPower; + Label _lAttempt; - DOGS102* _lcd; + Field _fStatus; + Field _fId; + Field _fKey; + Field _fFsb; + Field _fRate; + Field _fPower; + Field _fAttempt; + Field _fCountdown; + Field _fCountdownLabel; + Field _fCancel; + uint8_t _band; }; - #endif |