homing: Add EndstopMoveError wrapper around EndstopError

Allow an EndstopError to be raised without a destination position.
Introduce EndstopMoveError wrapper so that current callers can
continue to pass in a move destination.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2016-11-18 12:42:39 -05:00
parent 2b5b899d35
commit 4f30dce64f
4 changed files with 15 additions and 11 deletions

View File

@@ -23,7 +23,8 @@ class PrinterExtruder:
self.need_motor_enable = True
def check_move(self, move):
if not self.heater.can_extrude:
raise homing.EndstopError(move.end_pos, "Extrude below minimum temp")
raise homing.EndstopMoveError(
move.end_pos, "Extrude below minimum temp")
if (not move.do_calc_junction
and not move.axes_d[0] and not move.axes_d[1]
and not move.axes_d[2]):