From df435a4cf9e7dead0cb2a57600e3d4eac5a18ab4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 5 Sep 2018 14:24:05 +0200 Subject: [PATCH] Don't recalculate last trapezoid if last command is not a move I think we're just missing the last trapezoid then sometimes. Let's see what the effect of that is. Contributes to issue CURA-5561. --- 50_inst_per_sec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/50_inst_per_sec.py b/50_inst_per_sec.py index 67f1b6b8ac..22e8a3896a 100644 --- a/50_inst_per_sec.py +++ b/50_inst_per_sec.py @@ -392,6 +392,7 @@ class CommandBuffer: current = None for current in self._all_commands: if current.estimated_exec_time_in_ms >= 0: + current = None continue #Not a movement command. if previous: @@ -402,7 +403,7 @@ class CommandBuffer: previous._recalculate = False previous = current - if current is not None: + if current is not None and current.estimated_exec_time_in_ms >= 0: current.calculate_trapezoid(current._entry_speed / current._nominal_feedrate, MINIMUM_PLANNER_SPEED / current._nominal_feedrate) current._recalculate = False