|
@@ -392,33 +392,35 @@ void set_axis_is_at_home(const AxisEnum axis);
|
392
|
392
|
void set_axis_never_homed(const AxisEnum axis);
|
393
|
393
|
linear_axis_bits_t axes_should_home(linear_axis_bits_t axis_bits=linear_bits);
|
394
|
394
|
bool homing_needed_error(linear_axis_bits_t axis_bits=linear_bits);
|
395
|
|
- FORCE_INLINE void set_axis_unhomed(const AxisEnum axis) { CBI(axis_homed, axis); }
|
396
|
|
- FORCE_INLINE void set_axis_untrusted(const AxisEnum axis) { CBI(axis_trusted, axis); }
|
397
|
|
- FORCE_INLINE void set_all_unhomed() { axis_homed = axis_trusted = 0; }
|
398
|
|
- FORCE_INLINE void set_axis_homed(const AxisEnum axis) { SBI(axis_homed, axis); }
|
399
|
|
- FORCE_INLINE void set_axis_trusted(const AxisEnum axis) { SBI(axis_trusted, axis); }
|
400
|
|
- FORCE_INLINE void set_all_homed() { axis_homed = axis_trusted = linear_bits; }
|
|
395
|
+ inline void set_axis_unhomed(const AxisEnum axis) { CBI(axis_homed, axis); }
|
|
396
|
+ inline void set_axis_untrusted(const AxisEnum axis) { CBI(axis_trusted, axis); }
|
|
397
|
+ inline void set_all_unhomed() { axis_homed = axis_trusted = 0; }
|
|
398
|
+ inline void set_axis_homed(const AxisEnum axis) { SBI(axis_homed, axis); }
|
|
399
|
+ inline void set_axis_trusted(const AxisEnum axis) { SBI(axis_trusted, axis); }
|
|
400
|
+ inline void set_all_homed() { axis_homed = axis_trusted = linear_bits; }
|
401
|
401
|
#else
|
402
|
402
|
constexpr linear_axis_bits_t axis_homed = linear_bits, axis_trusted = linear_bits; // Zero-endstop machines are always homed and trusted
|
403
|
|
- FORCE_INLINE void homeaxis(const AxisEnum axis) {}
|
404
|
|
- FORCE_INLINE void set_axis_never_homed(const AxisEnum) {}
|
405
|
|
- FORCE_INLINE linear_axis_bits_t axes_should_home(linear_axis_bits_t=linear_bits) { return false; }
|
406
|
|
- FORCE_INLINE bool homing_needed_error(linear_axis_bits_t=linear_bits) { return false; }
|
407
|
|
- FORCE_INLINE void set_axis_unhomed(const AxisEnum axis) {}
|
408
|
|
- FORCE_INLINE void set_axis_untrusted(const AxisEnum axis) {}
|
409
|
|
- FORCE_INLINE void set_all_unhomed() {}
|
410
|
|
- FORCE_INLINE void set_axis_homed(const AxisEnum axis) {}
|
411
|
|
- FORCE_INLINE void set_axis_trusted(const AxisEnum axis) {}
|
412
|
|
- FORCE_INLINE void set_all_homed() {}
|
413
|
|
-#endif
|
414
|
|
-
|
415
|
|
-FORCE_INLINE bool axis_was_homed(const AxisEnum axis) { return TEST(axis_homed, axis); }
|
416
|
|
-FORCE_INLINE bool axis_is_trusted(const AxisEnum axis) { return TEST(axis_trusted, axis); }
|
417
|
|
-FORCE_INLINE bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; }
|
418
|
|
-FORCE_INLINE bool no_axes_homed() { return !axis_homed; }
|
419
|
|
-FORCE_INLINE bool all_axes_homed() { return linear_bits == (axis_homed & linear_bits); }
|
420
|
|
-FORCE_INLINE bool homing_needed() { return !all_axes_homed(); }
|
421
|
|
-FORCE_INLINE bool all_axes_trusted() { return linear_bits == (axis_trusted & linear_bits); }
|
|
403
|
+ inline void homeaxis(const AxisEnum axis) {}
|
|
404
|
+ inline void set_axis_never_homed(const AxisEnum) {}
|
|
405
|
+ inline linear_axis_bits_t axes_should_home(linear_axis_bits_t=linear_bits) { return false; }
|
|
406
|
+ inline bool homing_needed_error(linear_axis_bits_t=linear_bits) { return false; }
|
|
407
|
+ inline void set_axis_unhomed(const AxisEnum axis) {}
|
|
408
|
+ inline void set_axis_untrusted(const AxisEnum axis) {}
|
|
409
|
+ inline void set_all_unhomed() {}
|
|
410
|
+ inline void set_axis_homed(const AxisEnum axis) {}
|
|
411
|
+ inline void set_axis_trusted(const AxisEnum axis) {}
|
|
412
|
+ inline void set_all_homed() {}
|
|
413
|
+#endif
|
|
414
|
+
|
|
415
|
+inline bool axis_was_homed(const AxisEnum axis) { return TEST(axis_homed, axis); }
|
|
416
|
+inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axis_trusted, axis); }
|
|
417
|
+inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; }
|
|
418
|
+inline bool no_axes_homed() { return !axis_homed; }
|
|
419
|
+inline bool all_axes_homed() { return linear_bits == (axis_homed & linear_bits); }
|
|
420
|
+inline bool homing_needed() { return !all_axes_homed(); }
|
|
421
|
+inline bool all_axes_trusted() { return linear_bits == (axis_trusted & linear_bits); }
|
|
422
|
+
|
|
423
|
+void home_if_needed(const bool keeplev=false);
|
422
|
424
|
|
423
|
425
|
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
424
|
426
|
#define MOTION_CONDITIONS (IsRunning() && !homing_needed_error())
|