Browse Source

Add set_all_homed

Scott Lahteine 5 years ago
parent
commit
e0b413cf19
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      Marlin/src/feature/powerloss.cpp
  2. 1
    0
      Marlin/src/module/motion.h

+ 1
- 1
Marlin/src/feature/powerloss.cpp View File

365
   #endif
365
   #endif
366
 
366
 
367
   // Pretend that all axes are homed
367
   // Pretend that all axes are homed
368
-  axis_homed = axis_known_position = xyz_bits;
368
+  set_all_homed();
369
 
369
 
370
   // Recover volumetric extrusion state
370
   // Recover volumetric extrusion state
371
   #if DISABLED(NO_VOLUMETRICS)
371
   #if DISABLED(NO_VOLUMETRICS)

+ 1
- 0
Marlin/src/module/motion.h View File

40
 FORCE_INLINE bool no_axes_homed() { return !axis_homed; }
40
 FORCE_INLINE bool no_axes_homed() { return !axis_homed; }
41
 FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
41
 FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
42
 FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
42
 FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
43
+FORCE_INLINE void set_all_homed() { axis_homed = axis_known_position = xyz_bits; }
43
 FORCE_INLINE void set_all_unhomed() { axis_homed = axis_known_position = 0; }
44
 FORCE_INLINE void set_all_unhomed() { axis_homed = axis_known_position = 0; }
44
 
45
 
45
 FORCE_INLINE bool homing_needed() {
46
 FORCE_INLINE bool homing_needed() {

Loading…
Cancel
Save