diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 0b20192c..b517bbab 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4619,14 +4619,15 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) } if (correction == 0) continue; - float offset = float(correction) * 0.001f; - if (fabs(offset) > 0.101f) { + + if (labs(correction) > BED_ADJUSTMENT_UM_MAX) { SERIAL_ERROR_START; SERIAL_ECHOPGM("Excessive bed leveling correction: "); - SERIAL_ECHO(offset); + SERIAL_ECHO(correction); SERIAL_ECHOLNPGM(" microns"); } else { + float offset = float(correction) * 0.001f; switch (i) { case 0: for (uint8_t row = 0; row < 3; ++row) { diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index ae07f144..5354b3a3 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3064,8 +3064,6 @@ void lcd_adjust_bed_reset(void) _md->status = 0; } -#define BED_ADJUSTMENT_UM_MAX 50 - void lcd_adjust_bed(void) { _menu_data_adjust_bed_t* _md = (_menu_data_adjust_bed_t*)&(menu_data[0]); diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 85227539..3b9f7698 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -246,6 +246,9 @@ BED SETTINGS #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index d001f37f..2d00929f 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -246,6 +246,9 @@ BED SETTINGS #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h index 464ef55c..a9dcefe4 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h @@ -302,6 +302,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h index e1f5ba09..38d18134 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h @@ -303,6 +303,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h index 3e8bb3b2..53b545e8 100644 --- a/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h @@ -302,6 +302,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h index 45bcd8eb..e786b70f 100644 --- a/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h @@ -303,6 +303,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index d64436d1..c400b016 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -412,6 +412,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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. diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h index f64428cb..37512071 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h @@ -412,6 +412,9 @@ #define MESH_MEAS_NUM_X_POINTS 3 #define MESH_MEAS_NUM_Y_POINTS 3 +// Maximum bed level correction value +#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.