Explorar el Código

Fix M166 Gradient Mix for DELTA (#19285)

Kadah hace 3 años
padre
commit
bb017038d4
No account linked to committer's email address
Se han modificado 2 ficheros con 14 adiciones y 2 borrados
  1. 6
    1
      Marlin/src/feature/mixing.cpp
  2. 8
    1
      Marlin/src/gcode/feature/mixing/M166.cpp

+ 6
- 1
Marlin/src/feature/mixing.cpp Ver fichero

@@ -180,7 +180,12 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=
180 180
   }
181 181
 
182 182
   void Mixer::update_gradient_for_planner_z() {
183
-    update_gradient_for_z(planner.get_axis_position_mm(Z_AXIS));
183
+    #if ENABLED(DELTA)
184
+      get_cartesian_from_steppers();
185
+      update_gradient_for_z(cartes.z);
186
+    #else
187
+      update_gradient_for_z(planner.get_axis_position_mm(Z_AXIS));
188
+    #endif
184 189
   }
185 190
 
186 191
 #endif // GRADIENT_MIX

+ 8
- 1
Marlin/src/gcode/feature/mixing/M166.cpp Ver fichero

@@ -86,7 +86,14 @@ void GcodeSuite::M166() {
86 86
     echo_zt(mixer.gradient.end_vtool, mixer.gradient.end_z);
87 87
 
88 88
     mixer.update_mix_from_gradient();
89
-    SERIAL_ECHOPAIR(" ; Current Z", planner.get_axis_position_mm(Z_AXIS));
89
+
90
+    SERIAL_ECHOPGM(" ; Current Z");
91
+    #if ENABLED(DELTA)
92
+      get_cartesian_from_steppers();
93
+      SERIAL_ECHO(cartes.z);
94
+    #else
95
+      SERIAL_ECHO(planner.get_axis_position_mm(Z_AXIS));
96
+    #endif
90 97
     echo_mix();
91 98
   }
92 99
 

Loading…
Cancelar
Guardar