toolhead: Add a move.move_error() helper

Move the EndstopMoveError() code from homing.py to a new method in the
toolhead Move class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-09-03 16:22:54 -04:00
parent d0ed6e5705
commit 1f3a160f47
9 changed files with 21 additions and 26 deletions

View file

@ -217,8 +217,7 @@ class DummyExtruder:
def update_move_time(self, flush_time):
pass
def check_move(self, move):
raise homing.EndstopMoveError(
move.end_pos, "Extrude when no extruder present")
raise move.move_error("Extrude when no extruder present")
def calc_junction(self, prev_move, move):
return move.max_cruise_v2
def get_name(self):