Fix Z_AFTER_HOMING without probe (#19607)

This commit is contained in:
ellensp 2020-10-05 10:47:06 +13:00 committed by Scott Lahteine
parent e4d2234a04
commit d99fdcf526

View File

@ -84,13 +84,6 @@ public:
do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted
#endif #endif
} }
static inline void move_z_after_homing() {
#ifdef Z_AFTER_HOMING
do_z_clearance(Z_AFTER_HOMING, true, true, true);
#elif defined(Z_AFTER_PROBING)
move_z_after_probing();
#endif
}
static float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true); static float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true);
static inline float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true) { static inline float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true) {
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check); return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
@ -98,8 +91,6 @@ public:
#else #else
FORCE_INLINE static void move_z_after_homing() {}
static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767 static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767
static bool set_deployed(const bool) { return false; } static bool set_deployed(const bool) { return false; }
@ -108,6 +99,14 @@ public:
#endif #endif
static inline void move_z_after_homing() {
#ifdef Z_AFTER_HOMING
do_z_clearance(Z_AFTER_HOMING, true, true, true);
#elif BOTH(Z_AFTER_PROBING,HAS_BED_PROBE)
move_z_after_probing();
#endif
}
FORCE_INLINE static bool can_reach(const xy_pos_t &pos) { return can_reach(pos.x, pos.y); } FORCE_INLINE static bool can_reach(const xy_pos_t &pos) { return can_reach(pos.x, pos.y); }
FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) { FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {