From 2caaaea9a4bdd55846cdcf24b0efba60bcdfbd51 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 16 Aug 2020 22:43:03 -0400 Subject: toolhead: Add a manual_move() helper function Add a helper function for submitting relative movements. This function will also automatically ensure gcode.reset_last_position() is called. Signed-off-by: Kevin O'Connor --- klippy/extras/bed_screws.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'klippy/extras/bed_screws.py') diff --git a/klippy/extras/bed_screws.py b/klippy/extras/bed_screws.py index c10a791f..483fc7ef 100644 --- a/klippy/extras/bed_screws.py +++ b/klippy/extras/bed_screws.py @@ -46,13 +46,7 @@ class BedScrews: self.cmd_BED_SCREWS_ADJUST, desc=self.cmd_BED_SCREWS_ADJUST_help) def move(self, coord, speed): - toolhead = self.printer.lookup_object('toolhead') - curpos = toolhead.get_position() - for i in range(len(coord)): - if coord[i] is not None: - curpos[i] = coord[i] - toolhead.move(curpos, speed) - self.gcode.reset_last_position() + self.printer.lookup_object('toolhead').manual_move(coord, speed) def move_to_screw(self, state, screw): # Move up, over, and then down self.move((None, None, self.horizontal_move_z), self.lift_speed) -- cgit v1.2.3-70-g09d2