toolhead: Avoid pausing an infinitesimal amount of time

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.
It's okay to sleep a slightly longer time to avoid the issue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-09-30 20:16:27 -04:00
parent a43846c277
commit 4cd786fe08

View File

@@ -337,7 +337,8 @@ class ToolHead:
if not self.can_pause:
self.need_check_pause = self.reactor.NEVER
return
eventtime = self.reactor.pause(eventtime + min(1., pause_time))
eventtime = self.reactor.pause(
eventtime + max(.005, min(1., pause_time)))
est_print_time = self.mcu.estimated_print_time(eventtime)
buffer_time = self.print_time - est_print_time
if not self.special_queuing_state: