diff --git a/.travis.yml b/.travis.yml index 53e3dcbf1..c11220292 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 15bfd5ef4..e8ce1dac4 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 0ebfeff04..bad4b4c33 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 36c1239da..bf1f3d8d2 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 55e068957..9324c29a0 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 d5b6ed0b2..d8928bb6e 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 7b9849bac..83031364e 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 e99d4dd01..7f77cfe91 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 2d3067c6d..59b3085b2 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 d1522c3fa..1bdd817cb 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 13c484ac1..b3dfae090 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 0da46efdd..a6ae5c1a6 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 ae59c5d15..f8b096154 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 638ce4032..9c03d745a 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 4560cd8b9..ade5752b5 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 e2e9227b3..c1d665507 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 4729e39be..993cf3f64 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 a37bced78..d2baf230a 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 c23b546ab..a599d469f 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 db34f1ab0..df662c6ba 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 9e85c919d..8fdbf04a2 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)