Ver código fonte

Fix Z_AFTER_HOMING without probe (#19607)

ellensp 4 anos atrás
pai
commit
d99fdcf526
1 arquivos alterados com 8 adições e 9 exclusões
  1. 8
    9
      Marlin/src/module/probe.h

+ 8
- 9
Marlin/src/module/probe.h Ver arquivo

@@ -84,13 +84,6 @@ public:
84 84
         do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted
85 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 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 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 89
       return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
@@ -98,8 +91,6 @@ public:
98 91
 
99 92
   #else
100 93
 
101
-    FORCE_INLINE static void move_z_after_homing() {}
102
-
103 94
     static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767
104 95
 
105 96
     static bool set_deployed(const bool) { return false; }
@@ -108,6 +99,14 @@ public:
108 99
 
109 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 110
   FORCE_INLINE static bool can_reach(const xy_pos_t &pos) { return can_reach(pos.x, pos.y); }
112 111
 
113 112
   FORCE_INLINE static bool good_bounds(const xy_pos_t &lf, const xy_pos_t &rb) {

Carregando…
Cancelar
Salvar