From cb047e907035d7e921ae856fc2c29482e347ce80 Mon Sep 17 00:00:00 2001 From: Caleb Anderson Date: Mon, 29 Dec 2014 10:19:25 -0700 Subject: [PATCH] Actual menu change. Moved menu logic to not be shown unless not currently printing. (untested but straight-forward, printer in a bad state currently) --- Marlin/ultralcd.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 916114899..d3060dc50 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -65,6 +65,10 @@ static void lcd_set_contrast(); static void lcd_control_retract_menu(); static void lcd_sdcard_menu(); +#ifdef DELTA_CALIBRATION_MENU +static void lcd_delta_calibrate_menu(); +#endif // DELTA_CALIBRATION_MENU + static void lcd_quick_feedback();//Cause an LCD refresh, and give the user visual or audible feedback that something has happened /* Different types of actions that can be used in menu items. */ @@ -334,6 +338,9 @@ static void lcd_main_menu() MENU_ITEM(submenu, MSG_TUNE, lcd_tune_menu); }else{ MENU_ITEM(submenu, MSG_PREPARE, lcd_prepare_menu); +#ifdef DELTA_CALIBRATION_MENU + MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu); +#endif // DELTA_CALIBRATION_MENU } MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu); #ifdef SDSUPPORT @@ -628,6 +635,20 @@ static void lcd_prepare_menu() END_MENU(); } +#ifdef DELTA_CALIBRATION_MENU +static void lcd_delta_calibrate_menu() +{ + START_MENU(); + MENU_ITEM(back, MSG_MAIN, lcd_main_menu); + MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); + MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_X, PSTR("G0 F8000 X-77.94 Y-45 Z0")); + MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Y, PSTR("G0 F8000 X77.94 Y-45 Z0")); + MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0")); + MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0")); + END_MENU(); +} +#endif // DELTA_CALIBRATION_MENU + float move_menu_scale; static void lcd_move_menu_axis();