reorder menu, so it makes more sense on screen (looks erratic in source, of course).

This commit is contained in:
Ronald Schaten 2022-02-06 18:20:59 +01:00
parent 332c5937a6
commit e5d127d62b

View File

@ -72,6 +72,9 @@ void lcd_print(int line, String string) {
}
// ===
// Order of menu entries looks chaotic. It makes sense on screen.
// This is because serial IO (which is used since ArduinoMenu doesn't support
// analog keypad) doesn't implement setFieldMode().
result enter_jog() {
Serial.println("enter_jog()");
@ -99,11 +102,11 @@ TOGGLE(bLcdBlackout, setLcdBlackout, "LCD Blackout: ", doNothing, noEvent, wrapS
MENU(configuration, "Configuration", doNothing, anyEvent, wrapStyle
,FIELD(tSettle, "tSettle", "ms", 0, 2000, 100, 10, doNothing, noEvent, wrapStyle)
,FIELD(tFocus, "tFocus", "ms", 0, 2000, 500, 10, doNothing, noEvent, wrapStyle)
,FIELD(tShutter, "tShutter", "ms", 0, 2000, 500, 10, doNothing, noEvent, wrapStyle)
,SUBMENU(setReturn)
,SUBMENU(setLcdBlackout)
,EXIT("<Back")
,SUBMENU(setLcdBlackout)
,SUBMENU(setReturn)
,FIELD(tShutter, "tShutter", "ms", 0, 2000, 500, 10, doNothing, noEvent, wrapStyle)
,FIELD(tFocus, "tFocus", "ms", 0, 2000, 500, 10, doNothing, noEvent, wrapStyle)
);
int nSteps = 10;
@ -111,15 +114,15 @@ float distance = 0.5;
MENU(scene, "Scene", doNothing, anyEvent, wrapStyle
,FIELD(nSteps, "nSteps", "steps", 0, 100, 10, 1, doNothing, noEvent, wrapStyle)
,FIELD(distance, "distance", "mm", 0.1, 10, 1, 0.1, doNothing, noEvent, wrapStyle)
,EXIT("<Back")
,FIELD(distance, "distance", "mm", 0.1, 10, 1, 0.1, doNothing, noEvent, wrapStyle)
);
MENU(mainMenu, "PhotoStepper", doNothing, noEvent, wrapStyle
,OP("Jog", enter_jog, enterEvent)
,SUBMENU(configuration)
,SUBMENU(scene)
,OP("Run", doNothing, noEvent)
,SUBMENU(scene)
,SUBMENU(configuration)
);
MENU_OUTPUTS(out, MAX_DEPTH
@ -141,10 +144,10 @@ void ButtonHandler_menu(const ButtonParam& param) {
Serial.println("Click");
switch (param.button) {
case KEY_UP:
nav.doNav(downCmd);
nav.doNav(upCmd);
break;
case KEY_DOWN:
nav.doNav(upCmd);
nav.doNav(downCmd);
break;
case KEY_SELECT:
nav.doNav(enterCmd);