LCD implementation of our project.
Dependencies: mbed mbed-rtos MLX90614
Diff: Measure.h
- Revision:
- 3:688b62ff6474
- Child:
- 8:81ed1135ba02
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Measure.h Sun Apr 26 16:29:53 2015 +0000 @@ -0,0 +1,52 @@ +#include "Item.h" + +#define SELECTION_LINE 6 + +class Measure: public Item { + public: + //menu items - only 2 -> start and back + Item **items[2]; + Item *next; //screen to go next + bool hasResult; + + //constructors + Measure(char * title, ST7565 *lcd, Item *back){ + this->title = title; + this->st7565 = lcd; + this->back = back; + backName = " Back"; + hasResult = false; + selected = 1; + current_line = 6; + }; + + Measure(); + + //inherited functions + virtual void display(); + virtual void update(char c); + + //set next screen + void setNext(char * t, Item *item){ + this->nextName = t; + this->next = item; + } + + //set description of screen + void setDescription(char * description){ + this->description = description; + } + + //function to set screen as result screen + void setResult(bool r){ + hasResult = r; + } + + private: + int selected, current_line; + char * description, *nextName, *backName; + void display_description(char *r); + void set_selected(int s); + void display_result(double result); + void display_items(void); +}; \ No newline at end of file