diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index 04e7e85d..6b0a96ac 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -291,6 +291,8 @@ your extruder heater takes 2 minutes to hit the target on heating. #define Z_HEIGHT_HIDE_LIVE_ADJUST_MENU 2.0f +#define HOME_Z_SEARCH_THRESHOLD 0.15f // Threshold of the Z height in calibration + //============================= Bed Auto Leveling =========================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 447cc082..c39b52e6 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2860,7 +2860,8 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level) #endif //TMC2130 enable_endstops(endstops_enabled); - if (st_get_position_mm(Z_AXIS) == MESH_HOME_Z_SEARCH) + if ((st_get_position_mm(Z_AXIS) <= (MESH_HOME_Z_SEARCH + HOME_Z_SEARCH_THRESHOLD)) && + (st_get_position_mm(Z_AXIS) >= (MESH_HOME_Z_SEARCH - HOME_Z_SEARCH_THRESHOLD))) { if (onlyZ) { diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 2539e82c..45b88c7b 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -257,7 +257,7 @@ BED SETTINGS #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 9 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index fbbc332d..44778ab6 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -256,7 +256,7 @@ BED SETTINGS #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 9 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h index d0d0341c..370681e2 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h @@ -314,7 +314,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h index c931b7db..bdf4baba 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h @@ -315,7 +315,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h index c5df948c..8f80dfb5 100644 --- a/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h @@ -314,7 +314,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h index cc2498d6..bf0687e0 100644 --- a/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h @@ -315,7 +315,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index b2b26617..6f09c6f8 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -422,7 +422,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h index 5736b632..11166810 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h @@ -424,7 +424,7 @@ #define BED_ADJUSTMENT_UM_MAX 100 #define MESH_HOME_Z_CALIB 0.2 -#define MESH_HOME_Z_SEARCH 5 //Z lift for homing, mesh bed leveling etc. +#define MESH_HOME_Z_SEARCH 5.0f // Z lift for homing, mesh bed leveling etc. #define X_PROBE_OFFSET_FROM_EXTRUDER 23 // Z probe to nozzle X offset: -left +right #define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Z probe to nozzle Y offset: -front +behind