mirror of https://github.com/Desuuuu/klipper.git
toolhead: Commands should still pause even when sync_print_time
If commands are slowly fed to the printer it could cause the number of queued commands to grow without bound. Be sure to pause the incoming command stream even if the lookahead queue is empty. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d7754a8f93
commit
61fc57e659
|
@ -316,7 +316,6 @@ class ToolHead:
|
|||
self.print_stall += 1
|
||||
self.idle_flush_print_time = 0.
|
||||
self.reactor.update_timer(self.flush_timer, eventtime + 0.100)
|
||||
return
|
||||
# Check if there are lots of queued moves and stall if so
|
||||
while 1:
|
||||
est_print_time = self.mcu.estimated_print_time(eventtime)
|
||||
|
@ -328,7 +327,9 @@ class ToolHead:
|
|||
self.need_check_stall = self.reactor.NEVER
|
||||
return
|
||||
eventtime = self.reactor.pause(eventtime + min(1., stall_time))
|
||||
self.need_check_stall = est_print_time + self.buffer_time_high + 0.100
|
||||
if not self.sync_print_time:
|
||||
self.need_check_stall = (est_print_time + self.buffer_time_high
|
||||
+ 0.100)
|
||||
def _flush_handler(self, eventtime):
|
||||
try:
|
||||
print_time = self.print_time
|
||||
|
|
Loading…
Reference in New Issue