From ee4f37fe0c61dd525d4f03e800da38c42781b66f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 24 May 2018 09:42:33 -0400 Subject: stepper: Add STEPPER_BUZZ command Add a new command that can help diagnose stepper motor connectivity. Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index 1bfb14c1..7f1f7f51 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -78,12 +78,15 @@ class MCU_stepper: return int(mcu_pos + 0.5) return int(mcu_pos - 0.5) def set_ignore_move(self, ignore_move): + was_ignore = (self._stepcompress_push_const + is not self._ffi_lib.stepcompress_push_const) if ignore_move: self._stepcompress_push_const = (lambda *args: 0) self._stepcompress_push_delta = (lambda *args: 0) else: self._stepcompress_push_const = self._ffi_lib.stepcompress_push_const self._stepcompress_push_delta = self._ffi_lib.stepcompress_push_delta + return was_ignore def note_homing_start(self, homing_clock): ret = self._ffi_lib.stepcompress_set_homing( self._stepqueue, homing_clock) -- cgit v1.2.3-70-g09d2