Skip to content

Commit

Permalink
bed_screws: Reset on move error
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas authored and KevinOConnor committed Nov 2, 2023
1 parent 233f504 commit 9e765da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion klippy/extras/bed_screws.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def reset(self):
self.current_screw = 0
self.accepted_screws = 0
def move(self, coord, speed):
self.printer.lookup_object('toolhead').manual_move(coord, speed)
try:
self.printer.lookup_object('toolhead').manual_move(coord, speed)
except self.printer.command_error as e:
self.unregister_commands()
self.reset()
raise
def move_to_screw(self, state, screw):
# Move up, over, and then down
self.move((None, None, self.horizontal_move_z), self.lift_speed)
Expand Down

0 comments on commit 9e765da

Please sign in to comment.