From 5b336a4cdb42f6f288054398cb5c966585e01739 Mon Sep 17 00:00:00 2001 From: Caleb Anderson Date: Mon, 29 Dec 2014 10:13:00 -0700 Subject: [PATCH 1/2] Delta calibration menu based on http://minow.blogspot.com/index.html#4918805519571907051 To test/enable, uncomment the #define DELTA_CALIBRATION_MENU in Configuration.h --- Marlin/Configuration.h | 7 +++++++ Marlin/language_an.h | 8 ++++++++ Marlin/language_ca.h | 8 ++++++++ Marlin/language_de.h | 8 ++++++++ Marlin/language_en.h | 8 ++++++++ Marlin/language_es.h | 8 ++++++++ Marlin/language_eu.h | 8 ++++++++ Marlin/language_fi.h | 8 ++++++++ Marlin/language_fr.h | 8 ++++++++ Marlin/language_it.h | 8 ++++++++ Marlin/language_nl.h | 8 ++++++++ Marlin/language_pl.h | 8 ++++++++ Marlin/language_pt.h | 8 ++++++++ Marlin/language_ru.h | 8 ++++++++ 14 files changed, 111 insertions(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 980efc5cd..4b768a546 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -546,6 +546,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // http://reprap.org/wiki/RepRapDiscount_Smart_Controller //#define REPRAP_DISCOUNT_SMART_CONTROLLER +// Delta calibration menu +// uncomment to add three points calibration menu option. +// See http://minow.blogspot.com/index.html#4918805519571907051 +// If needed, adjust the X, Y, Z calibration coordinates +// in ultralcd.cpp@lcd_delta_calibrate_menu() +#define DELTA_CALIBRATION_MENU + // The GADGETS3D G3D LCD/SD Controller (blue PCB) // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel //#define G3D_PANEL diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 8c6820e1a..2d9c5ead5 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -136,4 +136,12 @@ #define MSG_RETRACT_ARROW "Retraer \x7E" #define MSG_STEPPER_RELEASED "Desacoplada." +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_AN_H diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index 680c6eed0..c556c027a 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Retreure" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_CA_H diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 801250b51..a05d85d95 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -128,4 +128,12 @@ #define MSG_STEPPER_RELEASED "Stepper frei" #define MSG_RECTRACT_WIDE "Rectract" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_DE_H diff --git a/Marlin/language_en.h b/Marlin/language_en.h index c094ff641..c749e9825 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Rectract" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_EN_H diff --git a/Marlin/language_es.h b/Marlin/language_es.h index eff9d6a8a..50e8bb9c3 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -136,4 +136,12 @@ #define MSG_RETRACT_ARROW "Retraer \x7E" #define MSG_STEPPER_RELEASED "Desacoplada." +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_ES_H diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 4b31b6567..e85218e18 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Atzera eragin" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_EU_H diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index b88c3759a..9117f7787 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Veda takaisin" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_FI_H diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index ffcfeb481..ab5ac818c 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -128,4 +128,12 @@ #define MSG_RECTRACT "Rectract" #define MSG_STEPPER_RELEASED "RELACHE." +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_FR_H diff --git a/Marlin/language_it.h b/Marlin/language_it.h index b70a0841c..c42e70b2a 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Ritrai" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_IT_H diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 56162d34d..67ddc7e95 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Terugtrekken" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_NL_H diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 430b90053..3de1d2090 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -128,4 +128,12 @@ #define MSG_RECTRACT "Wycofanie" #define MSG_STEPPER_RELEASED "Zwolniony." +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_PL_H diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 5c6f4fe7f..c11191615 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -132,4 +132,12 @@ #define MSG_RETRACT_ARROW "Retrair \x7E" #define MSG_STEPPER_RELEASED "Lancado." +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_PT_H diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index 844b3776b..73dd17f70 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -127,4 +127,12 @@ #define MSG_RECTRACT "Откат подачи \x7E" +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Delta Calibration" + #define MSG_DELTA_CALIBRATE_X "Calibrate X" + #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" + #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" + #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" +#endif // DELTA_CALIBRATION_MENU + #endif // LANGUAGE_RU_H From cb047e907035d7e921ae856fc2c29482e347ce80 Mon Sep 17 00:00:00 2001 From: Caleb Anderson Date: Mon, 29 Dec 2014 10:19:25 -0700 Subject: [PATCH 2/2] 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();