|
@@ -33,6 +33,7 @@
|
33
|
33
|
|
34
|
34
|
#include "planner.h"
|
35
|
35
|
#include "language.h"
|
|
36
|
+#include "temperature.h"
|
36
|
37
|
|
37
|
38
|
// See the meaning in the documentation of cubic_b_spline().
|
38
|
39
|
#define MIN_STEP 0.002
|
|
@@ -116,7 +117,18 @@ void cubic_b_spline(const float position[NUM_AXIS], const float target[NUM_AXIS]
|
116
|
117
|
tmp[X_AXIS] = position[X_AXIS];
|
117
|
118
|
tmp[Y_AXIS] = position[Y_AXIS];
|
118
|
119
|
float step = MAX_STEP;
|
|
120
|
+
|
|
121
|
+ uint8_t idle_counter = 0;
|
|
122
|
+ millis_t next_ping_ms = millis() + 200UL;
|
|
123
|
+
|
119
|
124
|
while (t < 1.0) {
|
|
125
|
+
|
|
126
|
+ millis_t now = millis();
|
|
127
|
+ if (ELAPSED(now, next_ping_ms)) {
|
|
128
|
+ next_ping_ms = now + 200UL;
|
|
129
|
+ (idle_counter++ & 0x03) ? thermalManager.manage_heater() : idle();
|
|
130
|
+ }
|
|
131
|
+
|
120
|
132
|
// First try to reduce the step in order to make it sufficiently
|
121
|
133
|
// close to a linear interpolation.
|
122
|
134
|
bool did_reduce = false;
|