From d028f42e99f21f9dac83f850fbf29f869597704d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 28 Dec 2016 22:17:49 -0500 Subject: [PATCH] mcu: Don't call steppersync_flush if steppersync not created Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/mcu.py b/klippy/mcu.py index 7afea412..c9927841 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -521,6 +521,8 @@ class MCU: def send(self, cmd, minclock=0, reqclock=0, cq=None): self.serial.send(cmd, minclock, reqclock, cq=cq) def flush_moves(self, print_time): + if self._steppersync is None: + return mcu_time = print_time + self._print_start_time clock = int(mcu_time * self._mcu_freq) self.ffi_lib.steppersync_flush(self._steppersync, clock)