Adjust the LCD_Menu to use the mBed Application board resources
Dependents: class_project_main
Fork of SerialLCD_Menu by
Navigator.h@3:920157b558db, 2013-08-04 (annotated)
- Committer:
- mshuck
- Date:
- Sun Aug 04 15:18:35 2013 +0000
- Revision:
- 3:920157b558db
- Parent:
- 2:2654dc659298
- Child:
- 4:343f2993a66b
LCD Menu System Success
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pyeh9 | 1:84d263c8932d | 1 | #ifndef NAVIGATOR_H |
pyeh9 | 1:84d263c8932d | 2 | #define NAVIGATOR_H |
pyeh9 | 1:84d263c8932d | 3 | |
pyeh9 | 1:84d263c8932d | 4 | #include "mbed.h" |
pyeh9 | 1:84d263c8932d | 5 | #include "Menu.h" |
mshuck | 3:920157b558db | 6 | #include "SerialLCD.h" |
pyeh9 | 1:84d263c8932d | 7 | #include "RPG.h" |
pyeh9 | 1:84d263c8932d | 8 | |
pyeh9 | 1:84d263c8932d | 9 | class Navigator { |
pyeh9 | 1:84d263c8932d | 10 | private: |
pyeh9 | 1:84d263c8932d | 11 | |
pyeh9 | 1:84d263c8932d | 12 | public: |
mshuck | 3:920157b558db | 13 | Navigator(Menu *, RPG &, SerialLCD *); |
pyeh9 | 2:2654dc659298 | 14 | Menu *activeMenu; // the current menu - can change when RPG is pushed on selection with child menu |
pyeh9 | 1:84d263c8932d | 15 | RPG rpg; |
mshuck | 3:920157b558db | 16 | SerialLCD *lcd; |
pyeh9 | 1:84d263c8932d | 17 | |
pyeh9 | 1:84d263c8932d | 18 | bool lastButton, button; |
pyeh9 | 2:2654dc659298 | 19 | int direction; // 1 = CW, -1 = CCW |
pyeh9 | 1:84d263c8932d | 20 | |
pyeh9 | 2:2654dc659298 | 21 | int bottom; // the index of the last item of current menu |
pyeh9 | 2:2654dc659298 | 22 | int cursorPos; // what selection the cursor points to |
pyeh9 | 1:84d263c8932d | 23 | int cursorLine; // what line of the lcd the cursor is on. 1 = first line, 2 = second line |
pyeh9 | 1:84d263c8932d | 24 | |
pyeh9 | 2:2654dc659298 | 25 | void poll(); // repeatedly call this function to determine if RPG is being used |
pyeh9 | 1:84d263c8932d | 26 | void moveUp(); |
pyeh9 | 1:84d263c8932d | 27 | void moveDown(); |
pyeh9 | 1:84d263c8932d | 28 | void printMenu(); |
pyeh9 | 1:84d263c8932d | 29 | void printCursor(); |
pyeh9 | 1:84d263c8932d | 30 | }; |
pyeh9 | 1:84d263c8932d | 31 | |
pyeh9 | 1:84d263c8932d | 32 | #endif |