-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
Hi, I just updated to V4 (I was using V3.1.1 previously) and notice that all the code examples now use a MENU_INPUTS line.
Prior to this I was handling all input like this:
if (inMenu) {
if (currentMillis - menuMillis > BUT_DELAY) {
menuMillis = currentMillis;
if (btn_up.sense() == buttons_debounce) {
nav.doNav(upCmd); // navigate up
inptimeoutMillis = currentMillis;
} else if (btn_down.sense() == buttons_debounce) {
nav.doNav(downCmd); // navigate down
inptimeoutMillis = currentMillis;
} else if (btn_enter.sense() == buttons_debounce) {
nav.doNav(enterCmd); // do current command
inptimeoutMillis = currentMillis;
}
nav.active().dirty=true;//for a menu
nav.navFocus->dirty=true;//should invalidate also full screen fields assert(nav.navFocus!=NULL)
nav.poll();//do serial input
display1.display();
display1.clearDisplay();
}
}Now my code fails to compile, complaining about the Serial device (which I don't want to use anyway). It's just luck that it worked previously.
What do I need to change to make things work, I already am using a buttons library to catch input so was hoping there would be some form of null handler - I need to catch the button presses myself because I'm using a long press to turn off the menus and the buttons are controlling other screens at the same time.
Metadata
Metadata
Assignees
Labels
No labels