diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index 61582b4a2..b1a7e4292 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -358,7 +358,7 @@ void safe_delay(millis_t ms) { SERIAL_ECHOLNPGM(" Nozzle)"); #endif - #if HAS_ABL + #if HAS_ABL_OR_UBL SERIAL_ECHOLNPGM("Auto Bed Leveling: " #if ENABLED(AUTO_BED_LEVELING_LINEAR) "LINEAR" diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index b9a67aeb7..7d09c4168 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -26,7 +26,7 @@ #include "../../../inc/MarlinConfig.h" -#if OLDSCHOOL_ABL +#if HAS_ABL_NOT_UBL #include "../../gcode.h" #include "../../../feature/bedlevel/bedlevel.h" @@ -1005,4 +1005,4 @@ G29_TYPE GcodeSuite::G29() { G29_RETURN(isnan(measured_z)); } -#endif // OLDSCHOOL_ABL +#endif // HAS_ABL_NOT_UBL diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 666d3e7db..b91104b77 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1245,16 +1245,16 @@ /** * Set granular options based on the specific type of leveling */ -#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA))) -#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) -#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) -#define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) -#define HAS_ABL (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL)) -#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) -#define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY)) -#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) +#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA))) +#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) +#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) +#define HAS_ABL_NOT_UBL (ABL_PLANAR || ABL_GRID) +#define HAS_ABL_OR_UBL (HAS_ABL_NOT_UBL || ENABLED(AUTO_BED_LEVELING_UBL)) +#define HAS_LEVELING (HAS_ABL_OR_UBL || ENABLED(MESH_BED_LEVELING)) +#define HAS_AUTOLEVEL (HAS_ABL_OR_UBL && DISABLED(PROBE_MANUALLY)) +#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) #define PLANNER_LEVELING (HAS_LEVELING && DISABLED(AUTO_BED_LEVELING_UBL)) -#define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) +#define HAS_PROBING_PROCEDURE (HAS_ABL_OR_UBL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) #define HAS_POSITION_MODIFIERS (ENABLED(FWRETRACT) || HAS_LEVELING || ENABLED(SKEW_CORRECTION)) #if ENABLED(AUTO_BED_LEVELING_UBL) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 13d97ce91..adc8671da 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1061,7 +1061,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Require some kind of probe for bed leveling and probe testing */ - #if OLDSCHOOL_ABL && !PROBE_SELECTED + #if HAS_ABL_NOT_UBL && !PROBE_SELECTED #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo." #endif @@ -1115,7 +1115,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'." #endif -#elif OLDSCHOOL_ABL +#elif HAS_ABL_NOT_UBL /** * Auto Bed Leveling @@ -1140,7 +1140,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS static_assert(FRONT_PROBE_BED_POSITION >= MIN_PROBE_Y, "FRONT_PROBE_BED_POSITION is outside the probe region."); static_assert(BACK_PROBE_BED_POSITION <= MAX_PROBE_Y, "BACK_PROBE_BED_POSITION is outside the probe region."); - #endif // AUTO_BED_LEVELING_3POINT + #endif #elif ENABLED(MESH_BED_LEVELING) @@ -1171,8 +1171,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD." #endif -#if ENABLED(G29_RETRY_AND_RECOVER) && HAS_LEVELING && !OLDSCHOOL_ABL - #error "G29_RETRY_AND_RECOVER currently only supports ABL" +#if ENABLED(G29_RETRY_AND_RECOVER) + #if ENABLED(AUTO_BED_LEVELING_UBL) + #error "G29_RETRY_AND_RECOVER is not compatible with UBL." + #elif ENABLED(MESH_BED_LEVELING) + #error "G29_RETRY_AND_RECOVER is not compatible with MESH_BED_LEVELING." + #endif #endif /** @@ -1181,7 +1185,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #if ENABLED(LCD_BED_LEVELING) #if !HAS_LCD_MENU #error "LCD_BED_LEVELING requires a programmable LCD controller." - #elif !(ENABLED(MESH_BED_LEVELING) || OLDSCHOOL_ABL) + #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL) #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." #endif #endif diff --git a/Marlin/src/libs/vector_3.cpp b/Marlin/src/libs/vector_3.cpp index 17f7d0b29..a320085aa 100644 --- a/Marlin/src/libs/vector_3.cpp +++ b/Marlin/src/libs/vector_3.cpp @@ -156,4 +156,4 @@ void matrix_3x3::debug(PGM_P const title) { } } -#endif // HAS_ABL +#endif // HAS_ABL_OR_UBL diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 3430db901..91991585d 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -2556,7 +2556,7 @@ void MarlinSettings::reset() { SERIAL_ECHOLNPGM(":"); } - #elif HAS_ABL + #elif HAS_ABL_OR_UBL CONFIG_ECHO_HEADING("Auto Bed Leveling:"); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 3f727b815..481719b74 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -155,7 +155,7 @@ float cartes[XYZ]; float workspace_offset[XYZ] = { 0 }; #endif -#if OLDSCHOOL_ABL +#if HAS_ABL_NOT_UBL float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED); #endif diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 5aea339a1..515a684a3 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -58,7 +58,7 @@ extern float cartes[XYZ]; extern float delta[ABC]; #endif -#if OLDSCHOOL_ABL +#if HAS_ABL_NOT_UBL extern float xy_probe_feedrate_mm_s; #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s #elif defined(XY_PROBE_SPEED)