aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/delta.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-12 11:41:41 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-11-12 17:32:18 -0500
commitbfb34e07017248268474281dc6678a8d141458ad (patch)
tree70ea938b8c9686bf3909e4b4a5c1499058af218d /klippy/kinematics/delta.py
parentf50e054bd069a0e7ae9455dfa5ddfc6894c4789e (diff)
downloadkutter-bfb34e07017248268474281dc6678a8d141458ad.tar.gz
kutter-bfb34e07017248268474281dc6678a8d141458ad.tar.xz
kutter-bfb34e07017248268474281dc6678a8d141458ad.zip
stepper_enable: Move motor_off() logic to stepper_enable.py
Directly disable all the stepper motors on a global motor_off() from the StepperEnable() class in stepper_enable.py. This simplifies the toolhead and kinematic classes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics/delta.py')
-rw-r--r--klippy/kinematics/delta.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py
index 3bd01e8f..af3aa092 100644
--- a/klippy/kinematics/delta.py
+++ b/klippy/kinematics/delta.py
@@ -23,6 +23,8 @@ class DeltaKinematics:
stepper_configs[2], need_position_minmax = False,
default_position_endstop=a_endstop)
self.rails = [rail_a, rail_b, rail_c]
+ config.get_printer().register_event_handler("stepper_enable:motor_off",
+ self._motor_off)
# Setup stepper max halt velocity
self.max_velocity, self.max_accel = toolhead.get_max_velocity()
self.max_z_velocity = config.getfloat(
@@ -105,10 +107,8 @@ class DeltaKinematics:
forcepos = list(self.home_position)
forcepos[2] = -1.5 * math.sqrt(max(self.arm2)-self.max_xy2)
homing_state.home_rails(self.rails, forcepos, self.home_position)
- def motor_off(self, print_time):
+ def _motor_off(self, print_time):
self.limit_xy2 = -1.
- for rail in self.rails:
- rail.motor_enable(print_time, 0)
self.need_home = True
def check_move(self, move):
end_pos = move.end_pos