🧑💻 Dump BOTH and EITHER macros (#25908)
This commit is contained in:
@@ -257,7 +257,7 @@ void report_current_position_projected() {
|
||||
AutoReporter<PositionReport> position_auto_reporter;
|
||||
#endif
|
||||
|
||||
#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS)
|
||||
#if ANY(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS)
|
||||
|
||||
M_StateEnum M_State_grbl = M_INIT;
|
||||
|
||||
@@ -941,7 +941,7 @@ void restore_feedrate_and_scaling() {
|
||||
|
||||
if (TERN0(DELTA, !all_axes_homed())) return;
|
||||
|
||||
#if BOTH(HAS_HOTEND_OFFSET, DELTA)
|
||||
#if ALL(HAS_HOTEND_OFFSET, DELTA)
|
||||
// The effector center position will be the target minus the hotend offset.
|
||||
const xy_pos_t offs = hotend_offset[active_extruder];
|
||||
#elif ENABLED(POLARGRAPH)
|
||||
@@ -1232,7 +1232,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool
|
||||
|
||||
// Minimum number of seconds to move the given distance
|
||||
const float seconds = cartesian_mm / (
|
||||
#if BOTH(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT)
|
||||
#if ALL(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT)
|
||||
cartes_move ? scaled_fr_mm_s : LINEAR_UNIT(scaled_fr_mm_s)
|
||||
#else
|
||||
scaled_fr_mm_s
|
||||
@@ -1542,7 +1542,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool
|
||||
void prepare_line_to_destination() {
|
||||
apply_motion_limits(destination);
|
||||
|
||||
#if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
|
||||
#if ANY(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
|
||||
|
||||
if (!DEBUGGING(DRYRUN) && destination.e != current_position.e) {
|
||||
bool ignore_e = thermalManager.tooColdToExtrude(active_extruder);
|
||||
@@ -1873,12 +1873,12 @@ void prepare_line_to_destination() {
|
||||
if (is_home_dir) {
|
||||
|
||||
if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS)) {
|
||||
#if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER)
|
||||
#if ALL(HAS_HEATED_BED, WAIT_FOR_BED_HEATER)
|
||||
// Wait for bed to heat back up between probing points
|
||||
thermalManager.wait_for_bed_heating();
|
||||
#endif
|
||||
|
||||
#if BOTH(HAS_HOTEND, WAIT_FOR_HOTEND)
|
||||
#if ALL(HAS_HOTEND, WAIT_FOR_HOTEND)
|
||||
// Wait for the hotend to heat back up between probing points
|
||||
thermalManager.wait_for_hotend_heating(active_extruder);
|
||||
#endif
|
||||
@@ -1895,7 +1895,7 @@ void prepare_line_to_destination() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if EITHER(MORGAN_SCARA, MP_SCARA)
|
||||
#if ANY(MORGAN_SCARA, MP_SCARA)
|
||||
// Tell the planner the axis is at 0
|
||||
current_position[axis] = 0;
|
||||
sync_plan_position();
|
||||
@@ -2093,11 +2093,11 @@ void prepare_line_to_destination() {
|
||||
|
||||
void homeaxis(const AxisEnum axis) {
|
||||
|
||||
#if EITHER(MORGAN_SCARA, MP_SCARA)
|
||||
#if ANY(MORGAN_SCARA, MP_SCARA)
|
||||
// Only Z homing (with probe) is permitted
|
||||
if (axis != Z_AXIS) { BUZZ(100, 880); return; }
|
||||
#else
|
||||
#define _CAN_HOME(A) (axis == _AXIS(A) && (EITHER(A##_SPI_SENSORLESS, HAS_##A##_ENDSTOP) || TERN0(HOMING_Z_WITH_PROBE, _AXIS(A) == Z_AXIS)))
|
||||
#define _CAN_HOME(A) (axis == _AXIS(A) && (ANY(A##_SPI_SENSORLESS, HAS_##A##_ENDSTOP) || TERN0(HOMING_Z_WITH_PROBE, _AXIS(A) == Z_AXIS)))
|
||||
#define _ANDCANT(N) && !_CAN_HOME(N)
|
||||
if (true MAIN_AXIS_MAP(_ANDCANT)) return;
|
||||
#endif
|
||||
@@ -2173,7 +2173,7 @@ void prepare_line_to_destination() {
|
||||
|
||||
// If a second homing move is configured...
|
||||
if (bump) {
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
if (axis == Z_AXIS && !bltouch.high_speed_mode) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
|
||||
#endif
|
||||
|
||||
@@ -2195,7 +2195,7 @@ void prepare_line_to_destination() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy())
|
||||
return; // Intermediate DEPLOY (in LOW SPEED MODE)
|
||||
#endif
|
||||
@@ -2206,7 +2206,7 @@ void prepare_line_to_destination() {
|
||||
do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true);
|
||||
}
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
if (axis == Z_AXIS) bltouch.stow(); // The final STOW
|
||||
#endif
|
||||
|
||||
@@ -2443,7 +2443,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if EITHER(MORGAN_SCARA, AXEL_TPARA)
|
||||
#if ANY(MORGAN_SCARA, AXEL_TPARA)
|
||||
scara_set_axis_is_at_home(axis);
|
||||
#elif ENABLED(DELTA)
|
||||
current_position[axis] = (axis == Z_AXIS) ? DIFF_TERN(HAS_BED_PROBE, delta_height, probe.offset.z) : base_home_pos(axis);
|
||||
|
Reference in New Issue
Block a user