Adjust the LCD_Menu to use the mBed Application board resources
Dependents: class_project_main
Fork of SerialLCD_Menu by
Diff: Navigator.cpp
- Revision:
- 11:af7687f1a985
- Parent:
- 10:379a279cd90c
- Child:
- 12:5c543a40d9af
--- a/Navigator.cpp Tue Sep 03 07:10:56 2013 +0000 +++ b/Navigator.cpp Thu Sep 12 05:33:18 2013 +0000 @@ -59,7 +59,7 @@ } } -void Navigator::poll() +void Navigator::poll(uint8_t *returnValue) { wait_ms(10); button[0]=pbUp; @@ -77,6 +77,10 @@ (activeMenu->selections[cursorPos].fun)(); } + if(returnValue != NULL){ + *returnValue = activeMenu->selections[cursorPos].value; + } + if(activeMenu->selections[cursorPos].childMenu != NULL){ activeMenu = activeMenu->selections[cursorPos].childMenu; bottom = activeMenu->selections.size(); @@ -111,4 +115,4 @@ if(cursorPos != (bottom-1)){ cursorPos++; } -} \ No newline at end of file +}