Skip to content

Commit

Permalink
Add set_all_homed
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 27, 2020
1 parent a12ac5e commit e0b413c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit e0b413c

Please sign in to comment.