|
|
@ -372,7 +372,7 @@ static uint8_t target_extruder;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
const int servo_endstop_id[] = SERVO_ENDSTOP_IDS;
|
|
|
|
const int servo_endstop_id[] = SERVO_ENDSTOP_IDS;
|
|
|
|
const int servo_endstop_angle[][2] = SERVO_ENDSTOP_ANGLES;
|
|
|
|
const int servo_endstop_angle[][2] = SERVO_ENDSTOP_ANGLES;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -724,7 +724,7 @@ void servo_init() {
|
|
|
|
servo[3].detach();
|
|
|
|
servo[3].detach();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
|
|
|
|
|
|
|
|
endstops.enable_z_probe(false);
|
|
|
|
endstops.enable_z_probe(false);
|
|
|
|
|
|
|
|
|
|
|
@ -1701,7 +1701,12 @@ static void setup_for_endstop_move() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void raise_z_after_probing() {
|
|
|
|
inline void raise_z_after_probing() {
|
|
|
|
|
|
|
|
#if Z_RAISE_AFTER_PROBING > 0
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("raise_z_after_probing()");
|
|
|
|
|
|
|
|
#endif
|
|
|
|
do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
|
|
|
|
do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void clean_up_after_endstop_move() {
|
|
|
|
static void clean_up_after_endstop_move() {
|
|
|
@ -1724,7 +1729,7 @@ static void setup_for_endstop_move() {
|
|
|
|
|
|
|
|
|
|
|
|
if (endstops.z_probe_enabled) return;
|
|
|
|
if (endstops.z_probe_enabled) return;
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
|
|
|
|
|
|
|
|
// Engage Z Servo endstop if enabled
|
|
|
|
// Engage Z Servo endstop if enabled
|
|
|
|
if (servo_endstop_id[Z_AXIS] >= 0) servo[servo_endstop_id[Z_AXIS]].move(servo_endstop_angle[Z_AXIS][0]);
|
|
|
|
if (servo_endstop_id[Z_AXIS] >= 0) servo[servo_endstop_id[Z_AXIS]].move(servo_endstop_angle[Z_AXIS][0]);
|
|
|
@ -1811,7 +1816,7 @@ static void setup_for_endstop_move() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void stow_z_probe(bool doRaise = true) {
|
|
|
|
static void stow_z_probe(bool doRaise = true) {
|
|
|
|
#if !(HAS_SERVO_ENDSTOPS && (Z_RAISE_AFTER_PROBING > 0))
|
|
|
|
#if !(ENABLED(HAS_SERVO_ENDSTOPS) && (Z_RAISE_AFTER_PROBING > 0))
|
|
|
|
UNUSED(doRaise);
|
|
|
|
UNUSED(doRaise);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
@ -1820,21 +1825,13 @@ static void setup_for_endstop_move() {
|
|
|
|
|
|
|
|
|
|
|
|
if (!endstops.z_probe_enabled) return;
|
|
|
|
if (!endstops.z_probe_enabled) return;
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
|
|
|
|
|
|
|
|
// Retract Z Servo endstop if enabled
|
|
|
|
// Retract Z Servo endstop if enabled
|
|
|
|
if (servo_endstop_id[Z_AXIS] >= 0) {
|
|
|
|
if (servo_endstop_id[Z_AXIS] >= 0) {
|
|
|
|
|
|
|
|
|
|
|
|
#if Z_RAISE_AFTER_PROBING > 0
|
|
|
|
#if Z_RAISE_AFTER_PROBING > 0
|
|
|
|
if (doRaise) {
|
|
|
|
if (doRaise) {
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
|
|
|
if (DEBUGGING(LEVELING)) {
|
|
|
|
|
|
|
|
SERIAL_ECHOPAIR("Raise Z (after) by ", Z_RAISE_AFTER_PROBING);
|
|
|
|
|
|
|
|
SERIAL_EOL;
|
|
|
|
|
|
|
|
SERIAL_ECHO("> SERVO_ENDSTOPS > raise_z_after_probing()");
|
|
|
|
|
|
|
|
SERIAL_EOL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
raise_z_after_probing(); // this also updates current_position
|
|
|
|
raise_z_after_probing(); // this also updates current_position
|
|
|
|
stepper.synchronize();
|
|
|
|
stepper.synchronize();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2062,7 +2059,7 @@ static void setup_for_endstop_move() {
|
|
|
|
|
|
|
|
|
|
|
|
#endif // DELTA
|
|
|
|
#endif // DELTA
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS && DISABLED(Z_PROBE_SLED)
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_SLED)
|
|
|
|
|
|
|
|
|
|
|
|
void raise_z_for_servo() {
|
|
|
|
void raise_z_for_servo() {
|
|
|
|
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
|
|
|
|
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
|
|
|
@ -2122,9 +2119,7 @@ static void setup_for_endstop_move() {
|
|
|
|
|
|
|
|
|
|
|
|
float oldXpos = current_position[X_AXIS]; // save x position
|
|
|
|
float oldXpos = current_position[X_AXIS]; // save x position
|
|
|
|
if (dock) {
|
|
|
|
if (dock) {
|
|
|
|
#if Z_RAISE_AFTER_PROBING > 0
|
|
|
|
|
|
|
|
raise_z_after_probing(); // raise Z
|
|
|
|
raise_z_after_probing(); // raise Z
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Dock sled a bit closer to ensure proper capturing
|
|
|
|
// Dock sled a bit closer to ensure proper capturing
|
|
|
|
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1);
|
|
|
|
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1);
|
|
|
|
digitalWrite(SLED_PIN, LOW); // turn off magnet
|
|
|
|
digitalWrite(SLED_PIN, LOW); // turn off magnet
|
|
|
@ -2173,33 +2168,36 @@ static void homeaxis(AxisEnum axis) {
|
|
|
|
sync_plan_position();
|
|
|
|
sync_plan_position();
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
#define _Z_SERVO_TEST (axis != Z_AXIS) // deploy Z, servo.move XY
|
|
|
|
#define _Z_SERVO_TEST (axis != Z_AXIS) // already deployed Z
|
|
|
|
#define _Z_PROBE_SUBTEST false // Z will never be invoked
|
|
|
|
#define _Z_SERVO_SUBTEST false // Z will never be invoked
|
|
|
|
#define _Z_DEPLOY (dock_sled(false))
|
|
|
|
#define _Z_DEPLOY (dock_sled(false))
|
|
|
|
#define _Z_STOW (dock_sled(true))
|
|
|
|
#define _Z_STOW (dock_sled(true))
|
|
|
|
#elif SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
#elif SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
#define _Z_SERVO_TEST (axis != Z_AXIS) // servo.move XY
|
|
|
|
#define _Z_SERVO_TEST (axis != Z_AXIS) // already deployed Z
|
|
|
|
#define _Z_PROBE_SUBTEST false // Z will never be invoked
|
|
|
|
#define _Z_SERVO_SUBTEST false // Z will never be invoked
|
|
|
|
#define _Z_DEPLOY (deploy_z_probe())
|
|
|
|
#define _Z_DEPLOY (deploy_z_probe())
|
|
|
|
#define _Z_STOW (stow_z_probe())
|
|
|
|
#define _Z_STOW (stow_z_probe())
|
|
|
|
#elif HAS_SERVO_ENDSTOPS
|
|
|
|
#elif ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
#define _Z_SERVO_TEST true // servo.move X, Y, Z
|
|
|
|
#define _Z_SERVO_TEST true // Z not deployed yet
|
|
|
|
#define _Z_PROBE_SUBTEST (axis == Z_AXIS) // Z is a probe
|
|
|
|
#define _Z_SERVO_SUBTEST (axis == Z_AXIS) // Z is a probe
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if (axis == Z_AXIS) {
|
|
|
|
|
|
|
|
// If there's a Z probe that needs deployment...
|
|
|
|
// If there's a Z probe that needs deployment...
|
|
|
|
#if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
#if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
// ...and homing Z towards the bed? Deploy it.
|
|
|
|
// ...and homing Z towards the bed? Deploy it.
|
|
|
|
if (axis_home_dir < 0) _Z_DEPLOY;
|
|
|
|
if (axis == Z_AXIS && axis_home_dir < 0) {
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> SERVO_LEVELING > " STRINGIFY(_Z_DEPLOY));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_Z_DEPLOY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
// Engage an X or Y Servo endstop if enabled
|
|
|
|
// Engage an X, Y (or Z) Servo endstop if enabled
|
|
|
|
if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
|
|
|
|
if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
|
|
|
|
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][0]);
|
|
|
|
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][0]);
|
|
|
|
if (_Z_PROBE_SUBTEST) endstops.z_probe_enabled = true;
|
|
|
|
if (_Z_SERVO_SUBTEST) endstops.z_probe_enabled = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
@ -2316,7 +2314,7 @@ static void homeaxis(AxisEnum axis) {
|
|
|
|
axis_known_position[axis] = true;
|
|
|
|
axis_known_position[axis] = true;
|
|
|
|
axis_homed[axis] = true;
|
|
|
|
axis_homed[axis] = true;
|
|
|
|
|
|
|
|
|
|
|
|
// Put away the Z probe
|
|
|
|
// Put away the Z probe with a function
|
|
|
|
#if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
#if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
if (axis == Z_AXIS && axis_home_dir < 0) {
|
|
|
|
if (axis == Z_AXIS && axis_home_dir < 0) {
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
@ -2326,16 +2324,32 @@ static void homeaxis(AxisEnum axis) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Retract Servo endstop if enabled
|
|
|
|
// Retract X, Y (or Z) Servo endstop if enabled
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
|
|
|
|
if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
|
|
|
|
|
|
|
|
// Raise the servo probe before stow outside ABL context.
|
|
|
|
|
|
|
|
// This is a workaround to allow use of a Servo Probe without
|
|
|
|
|
|
|
|
// ABL until more global probe handling is implemented.
|
|
|
|
|
|
|
|
#if Z_RAISE_AFTER_PROBING > 0
|
|
|
|
|
|
|
|
if (axis == Z_AXIS) {
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOPAIR("Raise Z (after) by ", Z_RAISE_AFTER_PROBING);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
current_position[Z_AXIS] = Z_RAISE_AFTER_PROBING;
|
|
|
|
|
|
|
|
feedrate = homing_feedrate[Z_AXIS];
|
|
|
|
|
|
|
|
line_to_current_position();
|
|
|
|
|
|
|
|
stepper.synchronize();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> SERVO_ENDSTOPS > Stow with servo.move()");
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> SERVO_ENDSTOPS > Stow with servo.move()");
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
|
|
|
|
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
|
|
|
|
if (_Z_PROBE_SUBTEST) endstops.enable_z_probe(false);
|
|
|
|
if (_Z_SERVO_SUBTEST) endstops.enable_z_probe(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HAS_SERVO_ENDSTOPS
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3564,7 +3578,7 @@ inline void gcode_G28() {
|
|
|
|
// Allen Key Probe for Delta
|
|
|
|
// Allen Key Probe for Delta
|
|
|
|
#if ENABLED(Z_PROBE_ALLEN_KEY) || SERVO_LEVELING
|
|
|
|
#if ENABLED(Z_PROBE_ALLEN_KEY) || SERVO_LEVELING
|
|
|
|
stow_z_probe();
|
|
|
|
stow_z_probe();
|
|
|
|
#elif Z_RAISE_AFTER_PROBING > 0
|
|
|
|
#else
|
|
|
|
raise_z_after_probing(); // for non Allen Key probes, such as simple mechanical probe
|
|
|
|
raise_z_after_probing(); // for non Allen Key probes, such as simple mechanical probe
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#else // !DELTA
|
|
|
|
#else // !DELTA
|
|
|
@ -3624,7 +3638,7 @@ inline void gcode_G28() {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
current_position[Z_AXIS] = -zprobe_zoffset + (z_tmp - real_z)
|
|
|
|
current_position[Z_AXIS] = -zprobe_zoffset + (z_tmp - real_z)
|
|
|
|
#if HAS_SERVO_ENDSTOPS || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED)
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED)
|
|
|
|
+ Z_RAISE_AFTER_PROBING
|
|
|
|
+ Z_RAISE_AFTER_PROBING
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
;
|
|
|
|
;
|
|
|
@ -3639,9 +3653,9 @@ inline void gcode_G28() {
|
|
|
|
// Sled assembly for Cartesian bots
|
|
|
|
// Sled assembly for Cartesian bots
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
dock_sled(true); // dock the sled
|
|
|
|
dock_sled(true); // dock the sled
|
|
|
|
#elif Z_RAISE_AFTER_PROBING > 0
|
|
|
|
#else
|
|
|
|
// Raise Z axis for non-delta and non servo based probes
|
|
|
|
// Raise Z axis for non-delta and non servo based probes
|
|
|
|
#if !defined(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
|
|
|
|
#if DISABLED(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
|
|
|
|
raise_z_after_probing();
|
|
|
|
raise_z_after_probing();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -3685,7 +3699,7 @@ inline void gcode_G28() {
|
|
|
|
* G30: Do a single Z probe at the current XY
|
|
|
|
* G30: Do a single Z probe at the current XY
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline void gcode_G30() {
|
|
|
|
inline void gcode_G30() {
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
raise_z_for_servo();
|
|
|
|
raise_z_for_servo();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
deploy_z_probe(); // Engage Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
|
|
|
deploy_z_probe(); // Engage Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
|
|
@ -3707,7 +3721,7 @@ inline void gcode_G28() {
|
|
|
|
|
|
|
|
|
|
|
|
clean_up_after_endstop_move(); // Too early. must be done after the stowing.
|
|
|
|
clean_up_after_endstop_move(); // Too early. must be done after the stowing.
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
raise_z_for_servo();
|
|
|
|
raise_z_for_servo();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
stow_z_probe(false); // Retract Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
|
|
|
stow_z_probe(false); // Retract Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
|
|
@ -5816,13 +5830,13 @@ inline void gcode_M303() {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline void gcode_M400() { stepper.synchronize(); }
|
|
|
|
inline void gcode_M400() { stepper.synchronize(); }
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(Z_PROBE_SLED) && (HAS_SERVO_ENDSTOPS || ENABLED(Z_PROBE_ALLEN_KEY))
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(Z_PROBE_SLED) && (ENABLED(HAS_SERVO_ENDSTOPS) || ENABLED(Z_PROBE_ALLEN_KEY))
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* M401: Engage Z Servo endstop if available
|
|
|
|
* M401: Engage Z Servo endstop if available
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline void gcode_M401() {
|
|
|
|
inline void gcode_M401() {
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
raise_z_for_servo();
|
|
|
|
raise_z_for_servo();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
deploy_z_probe();
|
|
|
|
deploy_z_probe();
|
|
|
@ -5832,13 +5846,13 @@ inline void gcode_M400() { stepper.synchronize(); }
|
|
|
|
* M402: Retract Z Servo endstop if enabled
|
|
|
|
* M402: Retract Z Servo endstop if enabled
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline void gcode_M402() {
|
|
|
|
inline void gcode_M402() {
|
|
|
|
#if HAS_SERVO_ENDSTOPS
|
|
|
|
#if ENABLED(HAS_SERVO_ENDSTOPS)
|
|
|
|
raise_z_for_servo();
|
|
|
|
raise_z_for_servo();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
stow_z_probe(false);
|
|
|
|
stow_z_probe(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
|
|
|
#endif // AUTO_BED_LEVELING_FEATURE && (ENABLED(HAS_SERVO_ENDSTOPS) || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
|
|
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
|
|
|
|
|
|
|
|
|
|
@ -7054,14 +7068,14 @@ void process_next_command() {
|
|
|
|
gcode_M400();
|
|
|
|
gcode_M400();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && (HAS_SERVO_ENDSTOPS || ENABLED(Z_PROBE_ALLEN_KEY)) && DISABLED(Z_PROBE_SLED)
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && (ENABLED(HAS_SERVO_ENDSTOPS) || ENABLED(Z_PROBE_ALLEN_KEY)) && DISABLED(Z_PROBE_SLED)
|
|
|
|
case 401:
|
|
|
|
case 401:
|
|
|
|
gcode_M401();
|
|
|
|
gcode_M401();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 402:
|
|
|
|
case 402:
|
|
|
|
gcode_M402();
|
|
|
|
gcode_M402();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
|
|
|
#endif // AUTO_BED_LEVELING_FEATURE && (ENABLED(HAS_SERVO_ENDSTOPS) || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
|
|
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
|
|
|
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
|
|
|
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
|
|
|
|