fix menu
This commit is contained in:
parent
4a1f9d0af2
commit
eb3063181a
@ -82,14 +82,13 @@ result enter_jog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MENU(mainMenu, "Main menu", doNothing, noEvent, wrapStyle
|
MENU(mainMenu, "Main menu", doNothing, noEvent, wrapStyle
|
||||||
|
,OP("Jog", enter_jog, enterEvent)
|
||||||
,OP("Sub1", doNothing, noEvent)
|
,OP("Sub1", doNothing, noEvent)
|
||||||
,OP("Sub2", doNothing, noEvent)
|
,OP("Sub2", doNothing, noEvent)
|
||||||
,OP("Jog", enter_jog, enterEvent)
|
|
||||||
//,EXIT("<Back")
|
|
||||||
);
|
);
|
||||||
|
|
||||||
MENU_OUTPUTS(out, MAX_DEPTH
|
MENU_OUTPUTS(out, MAX_DEPTH
|
||||||
,LIQUIDCRYSTAL_OUT(lcd, {0, 0, 16, 20})
|
,LIQUIDCRYSTAL_OUT(lcd, {0, 0, 16, 2})
|
||||||
,NONE
|
,NONE
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -107,10 +106,10 @@ void ButtonHandler_menu(const ButtonParam& param) {
|
|||||||
Serial.println("Click");
|
Serial.println("Click");
|
||||||
switch (param.button) {
|
switch (param.button) {
|
||||||
case KEY_UP:
|
case KEY_UP:
|
||||||
nav.doNav(upCmd);
|
nav.doNav(downCmd);
|
||||||
break;
|
break;
|
||||||
case KEY_DOWN:
|
case KEY_DOWN:
|
||||||
nav.doNav(downCmd);
|
nav.doNav(upCmd);
|
||||||
break;
|
break;
|
||||||
case KEY_SELECT:
|
case KEY_SELECT:
|
||||||
nav.doNav(enterCmd);
|
nav.doNav(enterCmd);
|
||||||
@ -156,6 +155,8 @@ void ButtonHandler_jog(const ButtonParam& param) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Serial.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user