homing: Fix references to CommandError()
Commit ea85d419
moved CommandError from homing.py to gcode.py, but
failed to fix the references to CommandError within homing.py. Fix
that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ee7230893d
commit
c57352a336
|
@ -69,7 +69,7 @@ class Homing:
|
||||||
error = None
|
error = None
|
||||||
try:
|
try:
|
||||||
self.toolhead.drip_move(movepos, speed, all_endstop_trigger)
|
self.toolhead.drip_move(movepos, speed, all_endstop_trigger)
|
||||||
except CommandError as e:
|
except self.printer.command_error as e:
|
||||||
error = "Error during homing move: %s" % (str(e),)
|
error = "Error during homing move: %s" % (str(e),)
|
||||||
# Wait for endstops to trigger
|
# Wait for endstops to trigger
|
||||||
move_end_print_time = self.toolhead.get_last_move_time()
|
move_end_print_time = self.toolhead.get_last_move_time()
|
||||||
|
@ -92,18 +92,19 @@ class Homing:
|
||||||
try:
|
try:
|
||||||
self.printer.send_event("homing:homing_move_end",
|
self.printer.send_event("homing:homing_move_end",
|
||||||
[es for es, name in endstops])
|
[es for es, name in endstops])
|
||||||
except CommandError as e:
|
except self.printer.command_error as e:
|
||||||
if error is None:
|
if error is None:
|
||||||
error = str(e)
|
error = str(e)
|
||||||
if error is not None:
|
if error is not None:
|
||||||
raise CommandError(error)
|
raise self.printer.command_error(error)
|
||||||
# Check if some movement occurred
|
# Check if some movement occurred
|
||||||
if verify_movement:
|
if verify_movement:
|
||||||
for s, name, spos, epos in end_mcu_pos:
|
for s, name, spos, epos in end_mcu_pos:
|
||||||
if spos == epos:
|
if spos == epos:
|
||||||
if probe_pos:
|
if probe_pos:
|
||||||
raise CommandError("Probe triggered prior to movement")
|
raise self.printer.command_error(
|
||||||
raise CommandError(
|
"Probe triggered prior to movement")
|
||||||
|
raise self.printer.command_error(
|
||||||
"Endstop %s still triggered after retract" % (name,))
|
"Endstop %s still triggered after retract" % (name,))
|
||||||
def home_rails(self, rails, forcepos, movepos):
|
def home_rails(self, rails, forcepos, movepos):
|
||||||
# Notify of upcoming homing operation
|
# Notify of upcoming homing operation
|
||||||
|
@ -148,7 +149,7 @@ class Homing:
|
||||||
self.changed_axes = axes
|
self.changed_axes = axes
|
||||||
try:
|
try:
|
||||||
self.toolhead.get_kinematics().home(self)
|
self.toolhead.get_kinematics().home(self)
|
||||||
except CommandError:
|
except self.printer.command_error:
|
||||||
self.printer.lookup_object('stepper_enable').motor_off()
|
self.printer.lookup_object('stepper_enable').motor_off()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue