From d1b41ea4a1e1419c83aa1bfad31d24a51ff533ff Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 19 Jul 2021 12:34:23 -0400 Subject: [PATCH] force_move: Note force_enable() and restore_enable() are internal functions Signed-off-by: Kevin O'Connor --- klippy/extras/force_move.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py index eb2577df..d4c3932a 100644 --- a/klippy/extras/force_move.py +++ b/klippy/extras/force_move.py @@ -56,7 +56,7 @@ class ForceMove: if name not in self.steppers: raise self.printer.config_error("Unknown stepper %s" % (name,)) return self.steppers[name] - def force_enable(self, stepper): + def _force_enable(self, stepper): toolhead = self.printer.lookup_object('toolhead') print_time = toolhead.get_last_move_time() stepper_enable = self.printer.lookup_object('stepper_enable') @@ -66,7 +66,7 @@ class ForceMove: enable.motor_enable(print_time) toolhead.dwell(STALL_TIME) return was_enable - def restore_enable(self, stepper, was_enable): + def _restore_enable(self, stepper, was_enable): if not was_enable: toolhead = self.printer.lookup_object('toolhead') toolhead.dwell(STALL_TIME) @@ -101,7 +101,7 @@ class ForceMove: def cmd_STEPPER_BUZZ(self, gcmd): stepper = self._lookup_stepper(gcmd) logging.info("Stepper buzz %s", stepper.get_name()) - was_enable = self.force_enable(stepper) + was_enable = self._force_enable(stepper) toolhead = self.printer.lookup_object('toolhead') dist, speed = BUZZ_DISTANCE, BUZZ_VELOCITY if stepper.units_in_radians(): @@ -111,7 +111,7 @@ class ForceMove: toolhead.dwell(.050) self.manual_move(stepper, -dist, speed) toolhead.dwell(.450) - self.restore_enable(stepper, was_enable) + self._restore_enable(stepper, was_enable) cmd_FORCE_MOVE_help = "Manually move a stepper; invalidates kinematics" def cmd_FORCE_MOVE(self, gcmd): stepper = self._lookup_stepper(gcmd) @@ -120,7 +120,7 @@ class ForceMove: accel = gcmd.get_float('ACCEL', 0., minval=0.) logging.info("FORCE_MOVE %s distance=%.3f velocity=%.3f accel=%.3f", stepper.get_name(), distance, speed, accel) - self.force_enable(stepper) + self._force_enable(stepper) self.manual_move(stepper, distance, speed, accel) cmd_SET_KINEMATIC_POSITION_help = "Force a low-level kinematic position" def cmd_SET_KINEMATIC_POSITION(self, gcmd):