Serial LCD Menu system with buttons instead of RPG. Based on Peihsun Yeh's work
Fork of Menu by
Revision 5:70fec61bebaf, committed 2013-08-04
- Comitter:
- mshuck
- Date:
- Sun Aug 04 18:02:39 2013 +0000
- Parent:
- 4:343f2993a66b
- Commit message:
- Serial LCD based; removed RPG and hard defined buttons
Changed in this revision
Navigator.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 343f2993a66b -r 70fec61bebaf Navigator.cpp --- a/Navigator.cpp Sun Aug 04 17:19:36 2013 +0000 +++ b/Navigator.cpp Sun Aug 04 18:02:39 2013 +0000 @@ -33,12 +33,12 @@ if(cursorLine == 2){ // moving down in menu lcd->printf("%s", activeMenu->selections[cursorPos-1].selText); - lcd->setPosition(0,1); // Sparkfun Serial LCD based on PIC16LF88 + lcd->setPosition(1,0); // Sparkfun Serial LCD based on PIC16LF88 lcd->printf("%s", activeMenu->selections[cursorPos].selText); } else { // moving up in menu lcd->printf("%s", activeMenu->selections[cursorPos].selText); - lcd->setPosition(0,1); // Sparkfun Serial LCD based on PIC16LF88 + lcd->setPosition(1,0); // Sparkfun Serial LCD based on PIC16LF88 lcd->printf("%s", activeMenu->selections[cursorPos+1].selText); } } @@ -46,17 +46,15 @@ void Navigator::printCursor() { - //if(activeMenu->selections[cursorPos].childMenu == NULL) printf("No Child Menu"); - //else printf("%s", activeMenu->selections[cursorPos].childMenu->menuID); - lcd->setPosition(0,0); + lcd->setPosition(0,0); // Sparkfun Serial LCD based on PIC16LF88 if(cursorLine == 1){ lcd->printf(">"); - lcd->setPosition(0,2); + lcd->setPosition(1,0); // Sparkfun Serial LCD based on PIC16LF88 lcd->printf(" "); } else if(cursorLine == 2){ lcd->printf(" "); - lcd->setPosition(0,3); + lcd->setPosition(1,0); // Sparkfun Serial LCD based on PIC16LF88 lcd->printf(">"); } }