[1.1.x] Ensure smooth printer movements (#9149)
- Never execute a block without an up-to-date trapezoid - Start blocks with MINIMUM_PLANNER_SPEED, except when coming from a full stop
This commit is contained in:
parent
4393c3ef7f
commit
e2871f0dcd
2 changed files with 14 additions and 5 deletions
|
|
@ -530,6 +530,16 @@ class Planner {
|
|||
static block_t* get_current_block() {
|
||||
if (blocks_queued()) {
|
||||
block_t * const block = &block_buffer[block_buffer_tail];
|
||||
|
||||
// If the trapezoid of this block has to be recalculated, it's not save to execute it.
|
||||
if (movesplanned() > 1) {
|
||||
block_t* next = &block_buffer[next_block_index(block_buffer_tail)];
|
||||
if (TEST(block->flag, BLOCK_BIT_RECALCULATE) || TEST(next->flag, BLOCK_BIT_RECALCULATE))
|
||||
return NULL;
|
||||
}
|
||||
else if (TEST(block->flag, BLOCK_BIT_RECALCULATE))
|
||||
return NULL;
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
block_buffer_runtime_us -= block->segment_time_us; // We can't be sure how long an active block will take, so don't count it.
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue