From 2bad02e60d4e10a0b25e01d0c1775a6b952c61b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 7 Jun 2016 17:29:34 -0700 Subject: [PATCH] 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)