Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 11 months ago.
Breaking out of the menu system
Hello. i would like to use them for controlling hardware with a menu system. I do not know how to break out of the the " lcd128menu() function once it is called. any suggestions? I am a novice and have been studying arrays, pointers etc. i have done some testing and concluded that once this function is called it monitors the joystick to enable selection through the menus. I would like to be able to let the user go through the menu and select options using the "fire" button on the joystick.
Thank you.
Question relating to:
1 Answer
8 years, 11 months ago.
I think you can get what you want if you change lcd128menu.cpp.
https://developer.mbed.org/users/medvdv/code/lcd128lib/file/5cd32671a837/lcd128menu.cpp
Add this at line 99 if (fire) return (menuCurrent + item)->id;
If I'm reading the code right it should then return the id value of the menu item that was selected.
Sorry for not answering i was away from mbed =)))) a lot of time =) looks like you found solution already, may be i will finish this library - its alpha state now but fell free to change it in any way you like
posted by Alexander Medvedev 11 Mar 2016