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>
This commit is contained in:
Kevin O'Connor 2016-12-28 21:24:12 -05:00
parent f2b406fc5e
commit 2e03d84755
2 changed files with 10 additions and 1 deletions

View file

@ -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)