Skip to content

Commit f6f4d5e

Browse files
committed
toolhead: Avoid pausing an infinitesimal amount of time
Only pause if the duration is worthwhile. Due to differences in mcu clock vs system clock it's possible to repeatedly underestimate a system delay needed to bring about a sufficient mcu time - which just wastes cpu cycles retrying a pause. Once the time difference is negligible it's okay to continue. Signed-off-by: Kevin O'Connor <[email protected]>
1 parent ac6f059 commit f6f4d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

klippy/toolhead.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def _check_pause(self):
332332
# Check if there are lots of queued moves and pause if so
333333
while 1:
334334
pause_time = buffer_time - BUFFER_TIME_HIGH
335-
if pause_time <= 0.:
335+
if pause_time < .005:
336336
break
337337
if not self.can_pause:
338338
self.need_check_pause = self.reactor.NEVER

0 commit comments

Comments
 (0)