Update some ABL/UBL conditionals
This commit is contained in:
parent
833c2e54a1
commit
808b076000
8 changed files with 26 additions and 22 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -156,4 +156,4 @@ void matrix_3x3::debug(PGM_P const title) {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // HAS_ABL
|
||||
#endif // HAS_ABL_OR_UBL
|
||||
|
|
|
@ -2556,7 +2556,7 @@ void MarlinSettings::reset() {
|
|||
SERIAL_ECHOLNPGM(":");
|
||||
}
|
||||
|
||||
#elif HAS_ABL
|
||||
#elif HAS_ABL_OR_UBL
|
||||
|
||||
CONFIG_ECHO_HEADING("Auto Bed Leveling:");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Reference in a new issue