aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-05-24 09:42:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-05-24 09:49:17 -0400
commitee4f37fe0c61dd525d4f03e800da38c42781b66f (patch)
tree538736225c5e31f9b4918c72dc59988f12eaabd4 /klippy/mcu.py
parente50c2aa38d0f2830456ee2df2eefc38d5cca48ee (diff)
downloadkutter-ee4f37fe0c61dd525d4f03e800da38c42781b66f.tar.gz
kutter-ee4f37fe0c61dd525d4f03e800da38c42781b66f.tar.xz
kutter-ee4f37fe0c61dd525d4f03e800da38c42781b66f.zip
stepper: Add STEPPER_BUZZ command
Add a new command that can help diagnose stepper motor connectivity. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r--klippy/mcu.py3
1 files changed, 3 insertions, 0 deletions
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)