diff --git a/.travis.yml b/.travis.yml index 53e3dcbf17..c112202925 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,6 +94,12 @@ script: - opt_enable ENABLE_AUTO_BED_LEVELING DEBUG_LEVELING_FEATURE - build_marlin # + # Test MESH_BED_LEVELING feature, with LCD + # + - restore_configs + - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN MANUAL_BED_LEVELING ULTIMAKERCONTROLLER + - build_marlin + # # Test AUTO_BED_LEVELING & DEBUG_LEVELING_FEATURE with Servos # - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR SERVO_ENDSTOP_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 15bfd5ef47..e8ce1dac40 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0ebfeff040..bad4b4c332 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2918,17 +2918,19 @@ inline void gcode_G28() { #endif #endif - // For mesh leveling move back to Z=0 + // Enable mesh leveling again #if ENABLED(MESH_BED_LEVELING) if (mbl_was_active && home_all_axis) { current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; sync_plan_position(); mbl.active = 1; - current_position[Z_AXIS] = 0.0; - set_destination_to_current(); - feedrate = homing_feedrate[Z_AXIS]; - line_to_destination(); - stepper.synchronize(); + #if ENABLED(MESH_G28_REST_ORIGIN) + current_position[Z_AXIS] = 0.0; + set_destination_to_current(); + feedrate = homing_feedrate[Z_AXIS]; + line_to_destination(); + stepper.synchronize(); + #endif #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("mbl_was_active", current_position); #endif diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 36c1239da8..bf1f3d8d24 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -507,6 +507,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 55e068957a..9324c29a07 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -505,6 +505,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index d5b6ed0b24..d8928bb6eb 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -517,6 +517,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 7b9849bacb..83031364e2 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -519,6 +519,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index e99d4dd01a..7f77cfe912 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -542,6 +542,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 2d3067c6d7..59b3085b2c 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index d1522c3fa7..1bdd817cbe 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -519,6 +519,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 13c484ac1f..b3dfae090f 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -533,6 +533,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 0da46efdd8..a6ae5c1a67 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -546,6 +546,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index ae59c5d15c..f8b0961548 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -517,6 +517,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 638ce4032e..9c03d745ae 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -525,6 +525,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 4560cd8b93..ade5752b51 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index e2e9227b37..c1d6655077 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 4729e39be3..993cf3f64d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -567,6 +567,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index a37bced783..d2baf230a0 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -556,6 +556,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index c23b546ab2..a599d469f2 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -565,6 +565,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index db34f1ab00..df662c6bab 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -528,6 +528,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 9e85c919d8..8fdbf04a26 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -515,6 +515,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MESH_NUM_Y_POINTS 3 #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] + //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. #if ENABLED(MANUAL_BED_LEVELING)