Ensure smooth print moves even with LCD enabled
lcd_update can take so much time that the block buffer gets drained if there are only short segments. This leads to jerky printer movements for example in circles and a bad print quality. This change implements a simple check: Only if the block currently executed is long enough, run lcd_update. This also means the printer will not show actual values on the LCD nor will it respond to buttons pressed. A option that keeps the menu accessible is also available. Aditionaly, slow down if a block would be so fast that adding a new block to the buffer would take more time. In this case, the buffer would drain until it's empty in worst case.
This commit is contained in:
committed by
Scott Lahteine
parent
0be6167f14
commit
de89dc9f04
@ -123,6 +123,10 @@ typedef struct {
|
||||
#if ENABLED(BARICUDA)
|
||||
uint32_t valve_pressure, e_to_p_pressure;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENSURE_SMOOTH_MOVES)
|
||||
uint32_t segment_time;
|
||||
#endif
|
||||
|
||||
} block_t;
|
||||
|
||||
@ -366,6 +370,17 @@ class Planner {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if ENABLED(ENSURE_SMOOTH_MOVES)
|
||||
static bool long_move() {
|
||||
if (blocks_queued()) {
|
||||
block_t* block = &block_buffer[block_buffer_tail];
|
||||
return (block->segment_time > (LCD_UPDATE_THRESHOLD * 1000UL));
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTOTEMP)
|
||||
static float autotemp_max;
|
||||
static float autotemp_min;
|
||||
|
Reference in New Issue
Block a user