|
@@ -672,8 +672,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
672
|
672
|
#endif
|
673
|
673
|
|
674
|
674
|
#if ENABLED(LIN_ADVANCE)
|
675
|
|
- const float target_float[XYZE] = { a, b, c, e },
|
676
|
|
- mm_D_float = sqrt(sq(target_float[X_AXIS] - position_float[X_AXIS]) + sq(target_float[Y_AXIS] - position_float[Y_AXIS]));
|
|
675
|
+ const float mm_D_float = sqrt(sq(a - position_float[X_AXIS]) + sq(b - position_float[Y_AXIS]));
|
677
|
676
|
#endif
|
678
|
677
|
|
679
|
678
|
const long da = target[X_AXIS] - position[X_AXIS],
|
|
@@ -707,13 +706,14 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
707
|
706
|
if (DEBUGGING(DRYRUN)) {
|
708
|
707
|
position[E_AXIS] = target[E_AXIS];
|
709
|
708
|
#if ENABLED(LIN_ADVANCE)
|
710
|
|
- position_float[E_AXIS] = target_float[E_AXIS];
|
|
709
|
+ position_float[E_AXIS] = e;
|
711
|
710
|
#endif
|
712
|
711
|
}
|
713
|
712
|
|
714
|
713
|
long de = target[E_AXIS] - position[E_AXIS];
|
|
714
|
+
|
715
|
715
|
#if ENABLED(LIN_ADVANCE)
|
716
|
|
- float de_float = target_float[E_AXIS] - position_float[E_AXIS];
|
|
716
|
+ float de_float = e - position_float[E_AXIS];
|
717
|
717
|
#endif
|
718
|
718
|
|
719
|
719
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
|
@@ -722,7 +722,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
722
|
722
|
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
723
|
723
|
de = 0; // no difference
|
724
|
724
|
#if ENABLED(LIN_ADVANCE)
|
725
|
|
- position_float[E_AXIS] = target_float[E_AXIS];
|
|
725
|
+ position_float[E_AXIS] = e;
|
726
|
726
|
de_float = 0;
|
727
|
727
|
#endif
|
728
|
728
|
SERIAL_ECHO_START;
|
|
@@ -733,7 +733,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
733
|
733
|
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
734
|
734
|
de = 0; // no difference
|
735
|
735
|
#if ENABLED(LIN_ADVANCE)
|
736
|
|
- position_float[E_AXIS] = target_float[E_AXIS];
|
|
736
|
+ position_float[E_AXIS] = e;
|
737
|
737
|
de_float = 0;
|
738
|
738
|
#endif
|
739
|
739
|
SERIAL_ECHO_START;
|
|
@@ -1356,7 +1356,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
1356
|
1356
|
// Update the position (only when a move was queued)
|
1357
|
1357
|
memcpy(position, target, sizeof(position));
|
1358
|
1358
|
#if ENABLED(LIN_ADVANCE)
|
1359
|
|
- memcpy(position_float, target_float, sizeof(position_float));
|
|
1359
|
+ position_float[X_AXIS] = a;
|
|
1360
|
+ position_float[Y_AXIS] = b;
|
|
1361
|
+ position_float[Z_AXIS] = c;
|
|
1362
|
+ position_float[E_AXIS] = e;
|
1360
|
1363
|
#endif
|
1361
|
1364
|
|
1362
|
1365
|
recalculate();
|