aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.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/toolhead.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/toolhead.py')
-rw-r--r--klippy/toolhead.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index d802df7e..521475d2 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -182,7 +182,6 @@ class MoveQueue:
# Enough moves have been queued to reach the target flush time.
self.flush(lazy=True)
-STALL_TIME = 0.100
MOVE_BATCH_TIME = 0.500
DRIP_SEGMENT_TIME = 0.050
@@ -203,8 +202,6 @@ class ToolHead:
self.can_pause = False
self.move_queue = MoveQueue(self)
self.commanded_pos = [0., 0., 0., 0.]
- self.printer.register_event_handler("gcode:request_restart",
- self._handle_request_restart)
self.printer.register_event_handler("klippy:shutdown",
self._handle_shutdown)
# Velocity and acceleration control
@@ -405,15 +402,6 @@ class ToolHead:
next_print_time = self.get_last_move_time() + max(0., delay)
self._update_move_time(next_print_time)
self._check_stall()
- def motor_off(self):
- self.dwell(STALL_TIME)
- last_move_time = self.get_last_move_time()
- self.kin.motor_off(last_move_time)
- for ext in kinematics.extruder.get_printer_extruders(self.printer):
- ext.motor_off(last_move_time)
- self.printer.send_event("toolhead:motor_off", last_move_time)
- self.dwell(STALL_TIME)
- logging.debug('; Max time of %f', last_move_time)
def wait_moves(self):
self._flush_lookahead()
eventtime = self.reactor.monotonic()
@@ -493,8 +481,6 @@ class ToolHead:
'estimated_print_time': estimated_print_time,
'position': homing.Coord(*self.commanded_pos),
'printing_time': print_time - last_print_start_time }
- def _handle_request_restart(self, print_time):
- self.motor_off()
def _handle_shutdown(self):
self.can_pause = False
self.move_queue.reset()