LCD implementation of our project.
Dependencies: mbed mbed-rtos MLX90614
Item.h@3:688b62ff6474, 2015-04-26 (annotated)
- Committer:
- ovidiup13
- Date:
- Sun Apr 26 16:29:53 2015 +0000
- Revision:
- 3:688b62ff6474
- Parent:
- 2:fcde41900fa5
- Child:
- 4:024e6a9c2ebf
added screens for interacting with other components. i.e. distance, thermo, gyro, compass, etc. Need to complete settings screen and create threads for interacting with other code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ovidiup13 | 0:1e597b0f8b3b | 1 | #ifndef _ITEM_H |
ovidiup13 | 0:1e597b0f8b3b | 2 | #define _ITEM_H |
ovidiup13 | 0:1e597b0f8b3b | 3 | |
ovidiup13 | 0:1e597b0f8b3b | 4 | #include "st7565LCD.h" |
ovidiup13 | 0:1e597b0f8b3b | 5 | #define LEFT_MARGIN 5 |
ovidiup13 | 0:1e597b0f8b3b | 6 | #define DEFAULT_COLOR 20 |
ovidiup13 | 0:1e597b0f8b3b | 7 | |
ovidiup13 | 0:1e597b0f8b3b | 8 | class Item { |
ovidiup13 | 0:1e597b0f8b3b | 9 | public: |
ovidiup13 | 0:1e597b0f8b3b | 10 | //name |
ovidiup13 | 0:1e597b0f8b3b | 11 | char * title; |
ovidiup13 | 0:1e597b0f8b3b | 12 | ST7565 * st7565; |
ovidiup13 | 0:1e597b0f8b3b | 13 | bool isSelectable; |
ovidiup13 | 3:688b62ff6474 | 14 | Item *selectedScreen, *back; |
ovidiup13 | 0:1e597b0f8b3b | 15 | |
ovidiup13 | 0:1e597b0f8b3b | 16 | //declare pure virtual functions |
ovidiup13 | 0:1e597b0f8b3b | 17 | virtual void display(void) = 0; |
ovidiup13 | 0:1e597b0f8b3b | 18 | virtual void update(char c) = 0; |
ovidiup13 | 0:1e597b0f8b3b | 19 | |
ovidiup13 | 2:fcde41900fa5 | 20 | //get title function |
ovidiup13 | 2:fcde41900fa5 | 21 | char * getTitle(void){ |
ovidiup13 | 2:fcde41900fa5 | 22 | return title; |
ovidiup13 | 2:fcde41900fa5 | 23 | } |
ovidiup13 | 2:fcde41900fa5 | 24 | |
ovidiup13 | 3:688b62ff6474 | 25 | Item * getSelectedScreen(){ |
ovidiup13 | 3:688b62ff6474 | 26 | return selectedScreen; |
ovidiup13 | 0:1e597b0f8b3b | 27 | } |
ovidiup13 | 3:688b62ff6474 | 28 | |
ovidiup13 | 3:688b62ff6474 | 29 | void setSelectedScreen(Item *s){ |
ovidiup13 | 3:688b62ff6474 | 30 | selectedScreen = s; |
ovidiup13 | 0:1e597b0f8b3b | 31 | } |
ovidiup13 | 0:1e597b0f8b3b | 32 | }; |
ovidiup13 | 0:1e597b0f8b3b | 33 | |
ovidiup13 | 0:1e597b0f8b3b | 34 | #endif |