aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-28 21:24:12 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-28 22:38:28 -0500
commit2e03d84755f466adaad64ae0054eb461869d0529 (patch)
tree07d2c66551cb23c5dad4322217312cba20486efb /klippy/toolhead.py
parentf2b406fc5e51e21af67eee2dc4a0bcec0f717029 (diff)
downloadkutter-2e03d84755f466adaad64ae0054eb461869d0529.tar.gz
kutter-2e03d84755f466adaad64ae0054eb461869d0529.tar.xz
kutter-2e03d84755f466adaad64ae0054eb461869d0529.zip
gcode: Add support for M400 command
Add ability to fully stall the input until all moves are complete. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index 504848f3..f4edd521 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -287,6 +287,11 @@ class ToolHead:
self.extruder.motor_off(last_move_time)
self.dwell(STALL_TIME)
logging.debug('; Max time of %f' % (last_move_time,))
+ def wait_moves(self):
+ self.move_queue.flush()
+ eventtime = time.time()
+ while self.print_time:
+ eventtime = self.reactor.pause(eventtime + 0.100)
def query_endstops(self):
last_move_time = self.get_last_move_time()
return self.kin.query_endstops(last_move_time)