Bläddra i källkod

Fix set_current_from_steppers_for_axis(E_AXIS) bug

Scott Lahteine 5 år sedan
förälder
incheckning
edd1b76a9a
1 ändrade filer med 5 tillägg och 4 borttagningar
  1. 5
    4
      Marlin/src/module/motion.cpp

+ 5
- 4
Marlin/src/module/motion.cpp Visa fil

272
  */
272
  */
273
 void set_current_from_steppers_for_axis(const AxisEnum axis) {
273
 void set_current_from_steppers_for_axis(const AxisEnum axis) {
274
   get_cartesian_from_steppers();
274
   get_cartesian_from_steppers();
275
+  xyze_pos_t pos = cartes;
276
+  pos.e = planner.get_axis_position_mm(E_AXIS);
275
 
277
 
276
   #if HAS_POSITION_MODIFIERS
278
   #if HAS_POSITION_MODIFIERS
277
-    xyze_pos_t pos = { cartes.x, cartes.y, cartes.z, current_position.e };
278
     planner.unapply_modifiers(pos
279
     planner.unapply_modifiers(pos
279
       #if HAS_LEVELING
280
       #if HAS_LEVELING
280
         , true
281
         , true
281
       #endif
282
       #endif
282
     );
283
     );
283
-    const xyze_pos_t &cartes = pos;
284
   #endif
284
   #endif
285
+
285
   if (axis == ALL_AXES)
286
   if (axis == ALL_AXES)
286
-    current_position = cartes;
287
+    current_position = pos;
287
   else
288
   else
288
-    current_position[axis] = cartes[axis];
289
+    current_position[axis] = pos[axis];
289
 }
290
 }
290
 
291
 
291
 /**
292
 /**

Laddar…
Avbryt
Spara