Add HAS_MESH conditional

master
Scott Lahteine 7 years ago
parent 88857e8028
commit b07a2aa23c

@ -783,9 +783,12 @@
#define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN))) #define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)))
#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 HAS_ABL (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL)) #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_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING))
#define PLANNER_LEVELING (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA) #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 PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
#define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
#if HAS_PROBING_PROCEDURE #if HAS_PROBING_PROCEDURE
#define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION)) #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))

@ -4357,7 +4357,7 @@ void home_all_axes() { gcode_G28(true); }
report_current_position(); report_current_position();
} }
#elif HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL) #elif OLDSCHOOL_ABL
#if ABL_GRID #if ABL_GRID
#if ENABLED(PROBE_Y_FIRST) #if ENABLED(PROBE_Y_FIRST)
@ -5281,7 +5281,7 @@ void home_all_axes() { gcode_G28(true); }
SYNC_PLAN_POSITION_KINEMATIC(); SYNC_PLAN_POSITION_KINEMATIC();
} }
#endif // HAS_ABL && !AUTO_BED_LEVELING_UBL #endif // OLDSCHOOL_ABL
#if HAS_BED_PROBE #if HAS_BED_PROBE
@ -5869,7 +5869,7 @@ void home_all_axes() { gcode_G28(true); }
#endif // G38_PROBE_TARGET #endif // G38_PROBE_TARGET
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING) #if HAS_MESH
/** /**
* G42: Move X & Y axes to mesh coordinates (I & J) * G42: Move X & Y axes to mesh coordinates (I & J)
@ -5921,7 +5921,7 @@ void home_all_axes() { gcode_G28(true); }
} }
} }
#endif // AUTO_BED_LEVELING_UBL #endif // HAS_MESH
/** /**
* G92: Set current position to given X Y Z E * G92: Set current position to given X Y Z E
@ -10989,7 +10989,7 @@ void process_next_command() {
gcode_G92(); gcode_G92();
break; break;
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING) #if HAS_MESH
case 42: case 42:
gcode_G42(); gcode_G42();
break; break;
@ -11474,7 +11474,7 @@ void process_next_command() {
break; break;
#endif #endif
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_BILINEAR) #if HAS_MESH
case 421: // M421: Set a Mesh Bed Leveling Z coordinate case 421: // M421: Set a Mesh Bed Leveling Z coordinate
gcode_M421(); gcode_M421();
break; break;
@ -12377,7 +12377,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
inline bool prepare_move_to_destination_cartesian() { inline bool prepare_move_to_destination_cartesian() {
if (current_position[X_AXIS] != destination[X_AXIS] || current_position[Y_AXIS] != destination[Y_AXIS]) { if (current_position[X_AXIS] != destination[X_AXIS] || current_position[Y_AXIS] != destination[Y_AXIS]) {
const float fr_scaled = MMS_SCALED(feedrate_mm_s); const float fr_scaled = MMS_SCALED(feedrate_mm_s);
#if HAS_LEVELING #if HAS_MESH
if (planner.leveling_active) { if (planner.leveling_active) {
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
ubl.line_to_destination_cartesian(fr_scaled, active_extruder); ubl.line_to_destination_cartesian(fr_scaled, active_extruder);
@ -12388,7 +12388,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#endif #endif
return true; return true;
} }
#endif // HAS_LEVELING #endif // HAS_MESH
line_to_destination(fr_scaled); line_to_destination(fr_scaled);
} }
else else

@ -651,7 +651,7 @@ static_assert(1 >= 0
/** /**
* Require some kind of probe for bed leveling and probe testing * Require some kind of probe for bed leveling and probe testing
*/ */
#if HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL) #if OLDSCHOOL_ABL
#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

Loading…
Cancel
Save