From 9a43ee4629eff0af900a117cf7f28e6dfd2fa254 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 5 Sep 2018 14:05:47 +0200 Subject: [PATCH] Fix kernel parameters We did one the wrong way around and weren't safe enough with the other. Contributes to issue CURA-5561. --- 50_inst_per_sec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/50_inst_per_sec.py b/50_inst_per_sec.py index a6979755f5..600bdccfd2 100644 --- a/50_inst_per_sec.py +++ b/50_inst_per_sec.py @@ -385,9 +385,9 @@ class CommandBuffer: for cmd in self._all_commands: if cmd.estimated_exec_time_in_ms >= 0: continue #Not a movement command. - kernel_commands[2] = kernel_commands[1] - kernel_commands[1] = kernel_commands[0] - kernel_commands[0] = cmd + kernel_commands[0] = kernel_commands[1] + kernel_commands[1] = kernel_commands[2] + kernel_commands[2] = cmd self.forward_pass_kernel(kernel_commands[0], kernel_commands[1], kernel_commands[2]) self.forward_pass_kernel(kernel_commands[1], kernel_commands[2], None) @@ -452,7 +452,7 @@ class CommandBuffer: "time_in_ms": total_frame_time_in_ms}) def reverse_pass_kernel(self, previous: Optional[Command], current: Optional[Command], next: Optional[Command]) -> None: - if not previous: + if not current or not next: return #If entry speed is already at the maximum entry speed, no need to