1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Update some ABL/UBL conditionals

This commit is contained in:
Scott Lahteine 2019-02-24 20:29:03 -06:00
parent 833c2e54a1
commit 808b076000
8 changed files with 26 additions and 22 deletions

View File

@ -358,7 +358,7 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOLNPGM(" Nozzle)"); SERIAL_ECHOLNPGM(" Nozzle)");
#endif #endif
#if HAS_ABL #if HAS_ABL_OR_UBL
SERIAL_ECHOLNPGM("Auto Bed Leveling: " SERIAL_ECHOLNPGM("Auto Bed Leveling: "
#if ENABLED(AUTO_BED_LEVELING_LINEAR) #if ENABLED(AUTO_BED_LEVELING_LINEAR)
"LINEAR" "LINEAR"

View File

@ -26,7 +26,7 @@
#include "../../../inc/MarlinConfig.h" #include "../../../inc/MarlinConfig.h"
#if OLDSCHOOL_ABL #if HAS_ABL_NOT_UBL
#include "../../gcode.h" #include "../../gcode.h"
#include "../../../feature/bedlevel/bedlevel.h" #include "../../../feature/bedlevel/bedlevel.h"
@ -1005,4 +1005,4 @@ G29_TYPE GcodeSuite::G29() {
G29_RETURN(isnan(measured_z)); G29_RETURN(isnan(measured_z));
} }
#endif // OLDSCHOOL_ABL #endif // HAS_ABL_NOT_UBL

View File

@ -1248,13 +1248,13 @@
#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA))) #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_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 ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
#define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) #define HAS_ABL_NOT_UBL (ABL_PLANAR || ABL_GRID)
#define HAS_ABL (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL)) #define HAS_ABL_OR_UBL (HAS_ABL_NOT_UBL || ENABLED(AUTO_BED_LEVELING_UBL))
#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) #define HAS_LEVELING (HAS_ABL_OR_UBL || ENABLED(MESH_BED_LEVELING))
#define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY)) #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 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 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)) #define HAS_POSITION_MODIFIERS (ENABLED(FWRETRACT) || HAS_LEVELING || ENABLED(SKEW_CORRECTION))
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)

View File

@ -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 * 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." #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 #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'." #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 #endif
#elif OLDSCHOOL_ABL #elif HAS_ABL_NOT_UBL
/** /**
* Auto Bed Leveling * 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(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."); 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) #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." #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
#endif #endif
#if ENABLED(G29_RETRY_AND_RECOVER) && HAS_LEVELING && !OLDSCHOOL_ABL #if ENABLED(G29_RETRY_AND_RECOVER)
#error "G29_RETRY_AND_RECOVER currently only supports ABL" #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 #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 ENABLED(LCD_BED_LEVELING)
#if !HAS_LCD_MENU #if !HAS_LCD_MENU
#error "LCD_BED_LEVELING requires a programmable LCD controller." #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." #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
#endif #endif
#endif #endif

View File

@ -156,4 +156,4 @@ void matrix_3x3::debug(PGM_P const title) {
} }
} }
#endif // HAS_ABL #endif // HAS_ABL_OR_UBL

View File

@ -2556,7 +2556,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM(":"); SERIAL_ECHOLNPGM(":");
} }
#elif HAS_ABL #elif HAS_ABL_OR_UBL
CONFIG_ECHO_HEADING("Auto Bed Leveling:"); CONFIG_ECHO_HEADING("Auto Bed Leveling:");

View File

@ -155,7 +155,7 @@ float cartes[XYZ];
float workspace_offset[XYZ] = { 0 }; float workspace_offset[XYZ] = { 0 };
#endif #endif
#if OLDSCHOOL_ABL #if HAS_ABL_NOT_UBL
float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED); float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
#endif #endif

View File

@ -58,7 +58,7 @@ extern float cartes[XYZ];
extern float delta[ABC]; extern float delta[ABC];
#endif #endif
#if OLDSCHOOL_ABL #if HAS_ABL_NOT_UBL
extern float xy_probe_feedrate_mm_s; extern float xy_probe_feedrate_mm_s;
#define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s
#elif defined(XY_PROBE_SPEED) #elif defined(XY_PROBE_SPEED)