reorder menu, so it makes more sense on screen (looks erratic in source, of course).
This commit is contained in:
		| @@ -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() { | result enter_jog() { | ||||||
|   Serial.println("enter_jog()"); |   Serial.println("enter_jog()"); | ||||||
| @@ -99,11 +102,11 @@ TOGGLE(bLcdBlackout, setLcdBlackout, "LCD Blackout: ", doNothing, noEvent, wrapS | |||||||
|  |  | ||||||
| MENU(configuration, "Configuration", doNothing, anyEvent, wrapStyle | MENU(configuration, "Configuration", doNothing, anyEvent, wrapStyle | ||||||
|   ,FIELD(tSettle, "tSettle", "ms", 0, 2000, 100, 10, doNothing, noEvent, 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") |   ,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; | int nSteps = 10; | ||||||
| @@ -111,15 +114,15 @@ float distance = 0.5; | |||||||
|  |  | ||||||
| MENU(scene, "Scene", doNothing, anyEvent, wrapStyle | MENU(scene, "Scene", doNothing, anyEvent, wrapStyle | ||||||
|   ,FIELD(nSteps, "nSteps", "steps", 0, 100, 10, 1, doNothing, noEvent, 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") |   ,EXIT("<Back") | ||||||
|  |   ,FIELD(distance, "distance", "mm", 0.1, 10, 1, 0.1, doNothing, noEvent, wrapStyle) | ||||||
| ); | ); | ||||||
|  |  | ||||||
| MENU(mainMenu, "PhotoStepper", doNothing, noEvent, wrapStyle | MENU(mainMenu, "PhotoStepper", doNothing, noEvent, wrapStyle | ||||||
|   ,OP("Jog", enter_jog, enterEvent) |   ,OP("Jog", enter_jog, enterEvent) | ||||||
|   ,SUBMENU(configuration) |  | ||||||
|   ,SUBMENU(scene) |  | ||||||
|   ,OP("Run", doNothing, noEvent) |   ,OP("Run", doNothing, noEvent) | ||||||
|  |   ,SUBMENU(scene) | ||||||
|  |   ,SUBMENU(configuration) | ||||||
| ); | ); | ||||||
|  |  | ||||||
| MENU_OUTPUTS(out, MAX_DEPTH | MENU_OUTPUTS(out, MAX_DEPTH | ||||||
| @@ -141,10 +144,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(downCmd); |           nav.doNav(upCmd); | ||||||
|           break; |           break; | ||||||
|         case KEY_DOWN: |         case KEY_DOWN: | ||||||
|           nav.doNav(upCmd); |           nav.doNav(downCmd); | ||||||
|           break; |           break; | ||||||
|         case KEY_SELECT: |         case KEY_SELECT: | ||||||
|           nav.doNav(enterCmd); |           nav.doNav(enterCmd); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user