[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:
Sebastianv650 2018-01-12 01:50:18 +01:00 committed by Scott Lahteine
parent 4393c3ef7f
commit e2871f0dcd
2 changed files with 14 additions and 5 deletions

View file

@ -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