diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py index f0264e1e..6e3e917d 100644 --- a/klippy/kinematics/extruder.py +++ b/klippy/kinematics/extruder.py @@ -194,14 +194,14 @@ class PrinterExtruder: toolhead = self.printer.lookup_object('toolhead') if 'DISTANCE' not in params: step_dist = self.stepper.get_step_dist() - gcode.respond_info("%s E step distance: %f" % (self.name, step_dist)) + gcode.respond_info("Extruder '%s' step distance is %0.6f" + % (self.name, step_dist)) return dist = gcode.get_float('DISTANCE', params, 0.) toolhead.flush_step_generation() - self.stepper.set_step_dist(self.sk_extruder, dist) - step_dist = self.stepper.get_step_dist() - gcode.respond_info("%s E step distance set: %f" % - (self.name, step_dist)) + self.stepper.set_step_dist(dist) + gcode.respond_info("Extruder '%s' step distance set to %0.6f" + % (self.name, dist)) cmd_ACTIVATE_EXTRUDER_help = "Change the active extruder" def cmd_ACTIVATE_EXTRUDER(self, params): gcode = self.printer.lookup_object('gcode') diff --git a/klippy/stepper.py b/klippy/stepper.py index bbe57ca5..5cf4ee4f 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -94,10 +94,9 @@ class MCU_stepper: return self._oid def get_step_dist(self): return self._step_dist - def set_step_dist(self, sk, dist): + def set_step_dist(self, dist): self._step_dist = dist - self.set_stepper_kinematics(sk) - logging.info("%s manually set to =%.6f", (self._name, dist)) + self.set_stepper_kinematics(self._stepper_kinematics) def is_dir_inverted(self): return self._invert_dir def calc_position_from_coord(self, coord): diff --git a/test/klippy/extruders.test b/test/klippy/extruders.test index 034b0559..22dc6ab5 100644 --- a/test/klippy/extruders.test +++ b/test/klippy/extruders.test @@ -11,3 +11,7 @@ G1 E7 G28 G1 X20 Y20 Z1 G1 X25 Y25 E7.5 + +# Update step_distance +SET_EXTRUDER_STEP_DISTANCE EXTRUDER=extruder DISTANCE=.005 +G1 X30 Y30 E8.0