aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-06-09 12:35:54 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-06-09 12:35:54 -0400
commit61fc57e659f765680068bddd0d03d6ff637c6c6a (patch)
treeab43c0405ec79ee64af00d44abf3cce9d89cf583 /klippy/toolhead.py
parentd7754a8f93bc3788399d4f1a80b578698e6cc3ef (diff)
downloadkutter-61fc57e659f765680068bddd0d03d6ff637c6c6a.tar.gz
kutter-61fc57e659f765680068bddd0d03d6ff637c6c6a.tar.xz
kutter-61fc57e659f765680068bddd0d03d6ff637c6c6a.zip
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>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index 713b0009..64790130 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -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