|
@@ -203,9 +203,8 @@ void Planner::calculate_trapezoid_for_block(block_t* block, float entry_factor,
|
203
|
203
|
|
204
|
204
|
|
205
|
205
|
// The kernel called by recalculate() when scanning the plan from last to first entry.
|
206
|
|
-void Planner::reverse_pass_kernel(block_t* previous, block_t* current, block_t* next) {
|
|
206
|
+void Planner::reverse_pass_kernel(block_t* current, block_t* next) {
|
207
|
207
|
if (!current) return;
|
208
|
|
- UNUSED(previous);
|
209
|
208
|
|
210
|
209
|
if (next) {
|
211
|
210
|
// If entry speed is already at the maximum entry speed, no need to recheck. Block is cruising.
|
|
@@ -250,15 +249,14 @@ void Planner::reverse_pass() {
|
250
|
249
|
block[2] = block[1];
|
251
|
250
|
block[1] = block[0];
|
252
|
251
|
block[0] = &block_buffer[b];
|
253
|
|
- reverse_pass_kernel(block[0], block[1], block[2]);
|
|
252
|
+ reverse_pass_kernel(block[1], block[2]);
|
254
|
253
|
}
|
255
|
254
|
}
|
256
|
255
|
}
|
257
|
256
|
|
258
|
257
|
// The kernel called by recalculate() when scanning the plan from first to last entry.
|
259
|
|
-void Planner::forward_pass_kernel(block_t* previous, block_t* current, block_t* next) {
|
|
258
|
+void Planner::forward_pass_kernel(block_t* previous, block_t* current) {
|
260
|
259
|
if (!previous) return;
|
261
|
|
- UNUSED(next);
|
262
|
260
|
|
263
|
261
|
// If the previous block is an acceleration block, but it is not long enough to complete the
|
264
|
262
|
// full speed change within the block, we need to adjust the entry speed accordingly. Entry
|
|
@@ -288,9 +286,9 @@ void Planner::forward_pass() {
|
288
|
286
|
block[0] = block[1];
|
289
|
287
|
block[1] = block[2];
|
290
|
288
|
block[2] = &block_buffer[b];
|
291
|
|
- forward_pass_kernel(block[0], block[1], block[2]);
|
|
289
|
+ forward_pass_kernel(block[0], block[1]);
|
292
|
290
|
}
|
293
|
|
- forward_pass_kernel(block[1], block[2], NULL);
|
|
291
|
+ forward_pass_kernel(block[1], block[2]);
|
294
|
292
|
}
|
295
|
293
|
|
296
|
294
|
/**
|