Improvement for ENSURE_SMOOTH_MOVES

Instead of waiting for a single long block, compare the complete block
buffer runtime for the long_move() check.
This commit is contained in:
Sebastianv650
2016-11-21 17:49:16 +01:00
parent 0f891e848b
commit 8190483eeb
3 changed files with 20 additions and 1 deletions

View File

@ -136,6 +136,10 @@ float Planner::previous_speed[NUM_AXIS],
float Planner::position_float[NUM_AXIS] = { 0 };
#endif
#if ENABLED(ENSURE_SMOOTH_MOVES)
uint32_t Planner::block_buffer_runtime_us = 0;
#endif
/**
* Class and Instance Methods
*/
@ -954,6 +958,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
segment_time = (MIN_BLOCK_TIME) * 1000UL;
}
block->segment_time = segment_time;
block_buffer_runtime_us += segment_time;
#endif
block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0