Browse Source

Add set_all_homed

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
e0b413cf19
  1. 2
      Marlin/src/feature/powerloss.cpp
  2. 1
      Marlin/src/module/motion.h

2
Marlin/src/feature/powerloss.cpp

@ -365,7 +365,7 @@ void PrintJobRecovery::resume() {
#endif
// Pretend that all axes are homed
axis_homed = axis_known_position = xyz_bits;
set_all_homed();
// Recover volumetric extrusion state
#if DISABLED(NO_VOLUMETRICS)

1
Marlin/src/module/motion.h

@ -40,6 +40,7 @@ constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
FORCE_INLINE bool no_axes_homed() { return !axis_homed; }
FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
FORCE_INLINE void set_all_homed() { axis_homed = axis_known_position = xyz_bits; }
FORCE_INLINE void set_all_unhomed() { axis_homed = axis_known_position = 0; }
FORCE_INLINE bool homing_needed() {

Loading…
Cancel
Save