From 06ac1f3bcfa4d4b44fa1127829a489cd738b040a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 4 Jun 2016 01:09:59 -0700 Subject: [PATCH 1/4] Reduce Reprapworld Keypad move code size --- Marlin/ultralcd.cpp | 48 ++++++++++++++------------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index fbdcb8a40c..baf04a14f5 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2310,42 +2310,24 @@ void kill_screen(const char* lcd_msg) { * */ #if ENABLED(REPRAPWORLD_KEYPAD) - static void reprapworld_keypad_move_z_up() { - encoderPosition = 1; + static void _reprapworld_keypad_move(AxisEnum axis, int dir) { move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_z(); - } - static void reprapworld_keypad_move_z_down() { - encoderPosition = -1; - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_z(); - } - static void reprapworld_keypad_move_x_left() { - encoderPosition = -1; - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_x(); - } - static void reprapworld_keypad_move_x_right() { - encoderPosition = 1; - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_x(); - } - static void reprapworld_keypad_move_y_down() { - encoderPosition = 1; - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_y(); - } - static void reprapworld_keypad_move_y_up() { - encoderPosition = -1; - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - lcd_move_y(); - } - static void reprapworld_keypad_move_home() { - enqueue_and_echo_commands_P(PSTR("G28")); // move all axes home + encoderPosition = dir; + switch (axis) { + case X_AXIS: lcd_move_x(); break; + case Y_AXIS: lcd_move_y(); break; + case Z_AXIS: lcd_move_z(); + } } + static void reprapworld_keypad_move_z_up() { _reprapworld_keypad_move(Z_AXIS, 1); } + static void reprapworld_keypad_move_z_down() { _reprapworld_keypad_move(Z_AXIS, -1); } + static void reprapworld_keypad_move_x_left() { _reprapworld_keypad_move(X_AXIS, -1); } + static void reprapworld_keypad_move_x_right() { _reprapworld_keypad_move(X_AXIS, 1); } + static void reprapworld_keypad_move_y_up() { _reprapworld_keypad_move(Y_AXIS, -1); } + static void reprapworld_keypad_move_y_down() { _reprapworld_keypad_move(Y_AXIS, 1); } + static void reprapworld_keypad_move_home() { enqueue_and_echo_commands_P(PSTR("G28")); } // move all axes home and wait #endif // REPRAPWORLD_KEYPAD - /** * * Audio feedback for controller clicks @@ -2657,7 +2639,7 @@ void lcd_update() { return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; lcdDrawUpdate = LCDVIEW_REDRAW_NOW; } - #endif //ULTIPANEL + #endif // ULTIPANEL // We arrive here every ~100ms when idling often enough. // Instead of tracking the changes simply redraw the Info Screen ~1 time a second. From 6abf9165759d76ca27d5f71dda549a63f522d12c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 7 Jun 2016 17:13:56 -0700 Subject: [PATCH 2/4] Reprapworld Keypad move step is 1mm --- Marlin/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 2 +- Marlin/example_configurations/Felix/DUAL/Configuration.h | 2 +- Marlin/example_configurations/Hephestos/Configuration.h | 2 +- Marlin/example_configurations/Hephestos_2/Configuration.h | 2 +- Marlin/example_configurations/K8200/Configuration.h | 2 +- .../RepRapWorld/Megatronics/Configuration.h | 2 +- Marlin/example_configurations/RigidBot/Configuration.h | 2 +- Marlin/example_configurations/SCARA/Configuration.h | 2 +- Marlin/example_configurations/TAZ4/Configuration.h | 2 +- Marlin/example_configurations/WITBOX/Configuration.h | 2 +- Marlin/example_configurations/adafruit/ST7565/Configuration.h | 2 +- Marlin/example_configurations/delta/biv2.5/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_pro/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_xl/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8947af1572..ac93cb453d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1160,7 +1160,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index c3765b9090..00662171c8 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1143,7 +1143,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 943b5483f3..29cc3b051a 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1141,7 +1141,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 1834986c1b..7b659c0bfa 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1152,7 +1152,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index f082073853..9ce056a900 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1154,7 +1154,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index a46c98f084..0c4a27162e 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1177,7 +1177,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index a48370e5f4..8dab9e9452 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1160,7 +1160,7 @@ // is pressed, a value of 10.0 means 10mm per click. // #define REPRAPWORLD_KEYPAD -#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index bf8de78bd2..1568ed8738 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1160,7 +1160,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 970ee80152..9123b2016a 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1168,7 +1168,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index b9264323de..a4db05cb08 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1181,7 +1181,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 8de68af4f8..d700848b55 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1152,7 +1152,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 6b5546eff4..9c690416d5 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1160,7 +1160,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 0e6ab7cefe..d0e8c37a1d 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -1255,7 +1255,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 7e27d294c4..1b81a1e540 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1249,7 +1249,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 906a33e63b..b26f2bd54c 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1252,7 +1252,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index d36d8246bb..b9b0eff1c3 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1252,7 +1252,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index d164dc72c4..5739ac3da8 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1254,7 +1254,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 6ba372f058..a87caff14a 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1163,7 +1163,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 2a723f23fd..251fae1f1b 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1154,7 +1154,7 @@ // is pressed, a value of 10.0 means 10mm per click. // //#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 // // RigidBot Panel V1.0 From eaa6f568ee380c122129fc8142c2c928d520bc5b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 4 Jun 2016 01:10:51 -0700 Subject: [PATCH 3/4] Prevent re-entrant call of Reprapworld Keypad handler --- Marlin/ultralcd.cpp | 39 +++++++++++++++++++++++++-------------- Marlin/ultralcd.h | 11 +++++++++++ 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index baf04a14f5..a68e61ebef 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2584,22 +2584,33 @@ void lcd_update() { #if ENABLED(REPRAPWORLD_KEYPAD) - #if ENABLED(DELTA) || ENABLED(SCARA) - #define _KEYPAD_MOVE_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) - #else - #define _KEYPAD_MOVE_ALLOWED true - #endif + static uint8_t keypad_debounce = 0; - if (REPRAPWORLD_KEYPAD_MOVE_HOME) reprapworld_keypad_move_home(); - if (_KEYPAD_MOVE_ALLOWED) { - if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); - if (REPRAPWORLD_KEYPAD_MOVE_Z_DOWN) reprapworld_keypad_move_z_down(); - if (REPRAPWORLD_KEYPAD_MOVE_X_LEFT) reprapworld_keypad_move_x_left(); - if (REPRAPWORLD_KEYPAD_MOVE_X_RIGHT) reprapworld_keypad_move_x_right(); - if (REPRAPWORLD_KEYPAD_MOVE_Y_DOWN) reprapworld_keypad_move_y_down(); - if (REPRAPWORLD_KEYPAD_MOVE_Y_UP) reprapworld_keypad_move_y_up(); + if (!REPRAPWORLD_KEYPAD_PRESSED) { + if (keypad_debounce > 0) keypad_debounce--; } - #endif + else if (!keypad_debounce) { + keypad_debounce = 2; + + #if DISABLED(DELTA) && Z_HOME_DIR == -1 + if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); + #endif + + if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) { + #if ENABLED(DELTA) || Z_HOME_DIR != -1 + if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); + #endif + if (REPRAPWORLD_KEYPAD_MOVE_Z_DOWN) reprapworld_keypad_move_z_down(); + if (REPRAPWORLD_KEYPAD_MOVE_X_LEFT) reprapworld_keypad_move_x_left(); + if (REPRAPWORLD_KEYPAD_MOVE_X_RIGHT) reprapworld_keypad_move_x_right(); + if (REPRAPWORLD_KEYPAD_MOVE_Y_DOWN) reprapworld_keypad_move_y_down(); + if (REPRAPWORLD_KEYPAD_MOVE_Y_UP) reprapworld_keypad_move_y_up(); + } + else { + if (REPRAPWORLD_KEYPAD_MOVE_HOME) reprapworld_keypad_move_home(); + } + } + #endif // REPRAPWORLD_KEYPAD bool encoderPastThreshold = (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP); if (encoderPastThreshold || LCD_CLICKED) { diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index ccb6f504d7..d9b6c3c0f9 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -123,6 +123,17 @@ #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_UP) #define REPRAPWORLD_KEYPAD_MOVE_X_LEFT (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_LEFT) + #define REPRAPWORLD_KEYPAD_PRESSED (buttons_reprapworld_keypad & ( \ + EN_REPRAPWORLD_KEYPAD_F3 | \ + EN_REPRAPWORLD_KEYPAD_F2 | \ + EN_REPRAPWORLD_KEYPAD_F1 | \ + EN_REPRAPWORLD_KEYPAD_DOWN | \ + EN_REPRAPWORLD_KEYPAD_RIGHT | \ + EN_REPRAPWORLD_KEYPAD_MIDDLE | \ + EN_REPRAPWORLD_KEYPAD_UP | \ + EN_REPRAPWORLD_KEYPAD_LEFT) \ + ) + #endif // REPRAPWORLD_KEYPAD #if ENABLED(NEWPANEL) From 2bad02e60d4e10a0b25e01d0c1775a6b952c61b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 7 Jun 2016 17:29:34 -0700 Subject: [PATCH 4/4] Reprapworld Keypad: F1 opens the Move Axis menu --- Marlin/ultralcd.cpp | 4 ++++ Marlin/ultralcd.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index a68e61ebef..02a0e3a22e 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2295,6 +2295,7 @@ void kill_screen(const char* lcd_msg) { currentScreen = menu_edit_callback_ ## _name; \ callbackFunc = callback; \ } + menu_edit_type(int, int3, itostr3, 1); menu_edit_type(float, float3, ftostr3, 1); menu_edit_type(float, float32, ftostr32, 100); @@ -2326,6 +2327,7 @@ void kill_screen(const char* lcd_msg) { static void reprapworld_keypad_move_y_up() { _reprapworld_keypad_move(Y_AXIS, -1); } static void reprapworld_keypad_move_y_down() { _reprapworld_keypad_move(Y_AXIS, 1); } static void reprapworld_keypad_move_home() { enqueue_and_echo_commands_P(PSTR("G28")); } // move all axes home and wait + static void reprapworld_keypad_move_menu() { lcd_goto_screen(lcd_move_menu); } #endif // REPRAPWORLD_KEYPAD /** @@ -2592,6 +2594,8 @@ void lcd_update() { else if (!keypad_debounce) { keypad_debounce = 2; + if (REPRAPWORLD_KEYPAD_MOVE_MENU) reprapworld_keypad_move_menu(); + #if DISABLED(DELTA) && Z_HOME_DIR == -1 if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); #endif diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index d9b6c3c0f9..457a70f513 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -117,6 +117,7 @@ #define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F3) #define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F2) + #define REPRAPWORLD_KEYPAD_MOVE_MENU (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F1) #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN) #define REPRAPWORLD_KEYPAD_MOVE_X_RIGHT (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT) #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_MIDDLE)