From ab1eb70d1c70dd438f6b283503f7473cdc080d0f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 11 Feb 2017 14:43:36 -0500 Subject: toolhead: Rework lookahead flush to be more stable during high cpu Change the lookahead queue so that it attempts to buffer at least buffer_time_high amount of moves when first starting a print. This helps ensure the buffer is normally always full. If the buffer falls below buffer_time_low then it is either due to the end of a print or because octoprint/klippy is unable to keep up. Change the code so that in this case the lookahead queue will attempt to gather buffer_time_high amount of moves before restarting movement. Update the default buffer_time_low to 1 second and buffer_time_high to 2 seconds. With the above changes a smaller buffer_time_high and a larger buffer_time_low are more practical. Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index f6a21746..83ff1fdb 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -393,7 +393,7 @@ class MCU: def dummy_set_print_start_time(eventtime): pass def dummy_get_print_buffer_time(eventtime, last_move_end): - return 0.250 + return 1.250 self.set_print_start_time = dummy_set_print_start_time self.get_print_buffer_time = dummy_get_print_buffer_time def timeout_handler(self, eventtime): -- cgit v1.2.3-70-g09d2