From 30a1f22e1d8feac8c7d3dd541105cdd4af255c5d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 26 Sep 2025 11:59:07 -0400 Subject: [PATCH] motion_queuing: Improve run to run stability of flushing when in debug mode Signed-off-by: Kevin O'Connor --- klippy/extras/motion_queuing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/motion_queuing.py b/klippy/extras/motion_queuing.py index 3491545a8..93f5594cd 100644 --- a/klippy/extras/motion_queuing.py +++ b/klippy/extras/motion_queuing.py @@ -224,8 +224,8 @@ class PrinterMotionQueuing: flush_count = 0 while self.last_step_gen_time < faux_time: target = self.last_step_gen_time + batch_time - if flush_count > 100.: - target = faux_time + if flush_count > 100. and faux_time > target: + target += int((faux_time-target) / batch_time) * batch_time self._advance_flush_time(0., target) flush_count += 1 if flush_count: