From 7a74888b43a7e640a32fd18ae69d9dbdeaf55719 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 17 Jan 2024 11:22:16 -0500 Subject: 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 --- klippy/extras/pwm_tool.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'klippy/extras/pwm_tool.py') diff --git a/klippy/extras/pwm_tool.py b/klippy/extras/pwm_tool.py index 5fc09eab..704266a8 100644 --- a/klippy/extras/pwm_tool.py +++ b/klippy/extras/pwm_tool.py @@ -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: -- cgit v1.2.3-70-g09d2