aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bed_screws.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-08-16 22:43:03 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-08-20 21:03:22 -0400
commit2caaaea9a4bdd55846cdcf24b0efba60bcdfbd51 (patch)
treeca1d47ac706e350bc2dfdfa0c5553dbd674f6acb /klippy/extras/bed_screws.py
parentb9ac6d63069974a90a3740eaf2a3e5ae81e35470 (diff)
downloadkutter-2caaaea9a4bdd55846cdcf24b0efba60bcdfbd51.tar.gz
kutter-2caaaea9a4bdd55846cdcf24b0efba60bcdfbd51.tar.xz
kutter-2caaaea9a4bdd55846cdcf24b0efba60bcdfbd51.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/bed_screws.py')
-rw-r--r--klippy/extras/bed_screws.py8
1 files changed, 1 insertions, 7 deletions
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)