Browse Source

️ G12 - Only require used axes to be homed (#23422)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
FB4S_WIFI
Mathew Winters 3 years ago
committed by Scott Lahteine
parent
commit
8257040faf
  1. 3
      Marlin/src/gcode/feature/clean/G12.cpp
  2. 2
      Marlin/src/module/motion.h

3
Marlin/src/gcode/feature/clean/G12.cpp

@ -46,7 +46,8 @@
*/ */
void GcodeSuite::G12() { void GcodeSuite::G12() {
// Don't allow nozzle cleaning without homing first // Don't allow nozzle cleaning without homing first
if (homing_needed_error()) return; if (homing_needed_error(linear_bits & ~TERN0(NOZZLE_CLEAN_NO_Z, Z_AXIS) & ~TERN0(NOZZLE_CLEAN_NO_Y, Y_AXIS)))
return;
#ifdef WIPE_SEQUENCE_COMMANDS #ifdef WIPE_SEQUENCE_COMMANDS
if (!parser.seen_any()) { if (!parser.seen_any()) {

2
Marlin/src/module/motion.h

@ -404,7 +404,7 @@ void set_axis_is_at_home(const AxisEnum axis);
constexpr linear_axis_bits_t axis_homed = linear_bits, axis_trusted = linear_bits; // Zero-endstop machines are always homed and trusted constexpr linear_axis_bits_t axis_homed = linear_bits, axis_trusted = linear_bits; // Zero-endstop machines are always homed and trusted
inline void homeaxis(const AxisEnum axis) {} inline void homeaxis(const AxisEnum axis) {}
inline void set_axis_never_homed(const AxisEnum) {} inline void set_axis_never_homed(const AxisEnum) {}
inline linear_axis_bits_t axes_should_home(linear_axis_bits_t=linear_bits) { return false; } inline linear_axis_bits_t axes_should_home(linear_axis_bits_t=linear_bits) { return 0; }
inline bool homing_needed_error(linear_axis_bits_t=linear_bits) { return false; } inline bool homing_needed_error(linear_axis_bits_t=linear_bits) { return false; }
inline void set_axis_unhomed(const AxisEnum axis) {} inline void set_axis_unhomed(const AxisEnum axis) {}
inline void set_axis_untrusted(const AxisEnum axis) {} inline void set_axis_untrusted(const AxisEnum axis) {}

Loading…
Cancel
Save