Browse Source

Fix Z_AFTER_HOMING without probe (#19607)

ellensp 4 years ago
parent
commit
d99fdcf526
1 changed files with 8 additions and 9 deletions
  1. 8
    9
      Marlin/src/module/probe.h

+ 8
- 9
Marlin/src/module/probe.h View File

84
         do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted
84
         do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted
85
       #endif
85
       #endif
86
     }
86
     }
87
-    static inline void move_z_after_homing() {
88
-      #ifdef Z_AFTER_HOMING
89
-        do_z_clearance(Z_AFTER_HOMING, true, true, true);
90
-      #elif defined(Z_AFTER_PROBING)
91
-        move_z_after_probing();
92
-      #endif
93
-    }
94
     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);
87
     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);
95
     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) {
88
     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) {
96
       return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
89
       return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
98
 
91
 
99
   #else
92
   #else
100
 
93
 
101
-    FORCE_INLINE static void move_z_after_homing() {}
102
-
103
     static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767
94
     static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767
104
 
95
 
105
     static bool set_deployed(const bool) { return false; }
96
     static bool set_deployed(const bool) { return false; }
108
 
99
 
109
   #endif
100
   #endif
110
 
101
 
102
+  static inline void move_z_after_homing() {
103
+    #ifdef Z_AFTER_HOMING
104
+      do_z_clearance(Z_AFTER_HOMING, true, true, true);
105
+    #elif BOTH(Z_AFTER_PROBING,HAS_BED_PROBE)
106
+      move_z_after_probing();
107
+    #endif
108
+  }
109
+
111
   FORCE_INLINE static bool can_reach(const xy_pos_t &pos) { return can_reach(pos.x, pos.y); }
110
   FORCE_INLINE static bool can_reach(const xy_pos_t &pos) { return can_reach(pos.x, pos.y); }
112
 
111
 
113
   FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {
112
   FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {

Loading…
Cancel
Save