toolhead: Extend flushing slightly past required time

There is no harm in enabling flushing for a little longer than
necessary.  In contrast, a slight rounding issue causing a message to
not get flushed properly could result in an error.  So, extend the
flushing time slightly to avoid potential issues.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2024-01-17 11:22:16 -05:00
parent 3d3b87f97f
commit 7a74888b43
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,6 @@
import chelper
MAX_SCHEDULE_TIME = 5.0
CLOCK_SYNC_EXTRA_TIME = 0.050
class error(Exception):
pass
@ -118,8 +117,7 @@ class MCU_queued_pwm:
# Continue flushing to resend time
wakeclock += self._duration_ticks
wake_print_time = self._mcu.clock_to_print_time(wakeclock)
self._toolhead.note_kinematic_activity(wake_print_time
+ CLOCK_SYNC_EXTRA_TIME)
self._toolhead.note_kinematic_activity(wake_print_time)
def set_pwm(self, print_time, value):
clock = self._mcu.print_time_to_clock(print_time)
if self._invert: