Add set_all_homed

This commit is contained in:
Scott Lahteine 2020-08-27 16:38:02 -05:00
parent 7d2e4481c7
commit ee572856e9
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -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 no_axes_homed() { return !axis_homed; }
FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; } 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 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 void set_all_unhomed() { axis_homed = axis_known_position = 0; }
FORCE_INLINE bool homing_needed() { FORCE_INLINE bool homing_needed() {