mirror of https://github.com/Desuuuu/klipper.git
stepper: No need to pass stepper_kinematics to set_step_dist()
Also, no need to log in stepper.py as the update is already logged in extruder.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d4bf61262e
commit
336af2f28d
|
@ -194,14 +194,14 @@ class PrinterExtruder:
|
||||||
toolhead = self.printer.lookup_object('toolhead')
|
toolhead = self.printer.lookup_object('toolhead')
|
||||||
if 'DISTANCE' not in params:
|
if 'DISTANCE' not in params:
|
||||||
step_dist = self.stepper.get_step_dist()
|
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
|
return
|
||||||
dist = gcode.get_float('DISTANCE', params, 0.)
|
dist = gcode.get_float('DISTANCE', params, 0.)
|
||||||
toolhead.flush_step_generation()
|
toolhead.flush_step_generation()
|
||||||
self.stepper.set_step_dist(self.sk_extruder, dist)
|
self.stepper.set_step_dist(dist)
|
||||||
step_dist = self.stepper.get_step_dist()
|
gcode.respond_info("Extruder '%s' step distance set to %0.6f"
|
||||||
gcode.respond_info("%s E step distance set: %f" %
|
% (self.name, dist))
|
||||||
(self.name, step_dist))
|
|
||||||
cmd_ACTIVATE_EXTRUDER_help = "Change the active extruder"
|
cmd_ACTIVATE_EXTRUDER_help = "Change the active extruder"
|
||||||
def cmd_ACTIVATE_EXTRUDER(self, params):
|
def cmd_ACTIVATE_EXTRUDER(self, params):
|
||||||
gcode = self.printer.lookup_object('gcode')
|
gcode = self.printer.lookup_object('gcode')
|
||||||
|
|
|
@ -94,10 +94,9 @@ class MCU_stepper:
|
||||||
return self._oid
|
return self._oid
|
||||||
def get_step_dist(self):
|
def get_step_dist(self):
|
||||||
return self._step_dist
|
return self._step_dist
|
||||||
def set_step_dist(self, sk, dist):
|
def set_step_dist(self, dist):
|
||||||
self._step_dist = dist
|
self._step_dist = dist
|
||||||
self.set_stepper_kinematics(sk)
|
self.set_stepper_kinematics(self._stepper_kinematics)
|
||||||
logging.info("%s manually set to =%.6f", (self._name, dist))
|
|
||||||
def is_dir_inverted(self):
|
def is_dir_inverted(self):
|
||||||
return self._invert_dir
|
return self._invert_dir
|
||||||
def calc_position_from_coord(self, coord):
|
def calc_position_from_coord(self, coord):
|
||||||
|
|
|
@ -11,3 +11,7 @@ G1 E7
|
||||||
G28
|
G28
|
||||||
G1 X20 Y20 Z1
|
G1 X20 Y20 Z1
|
||||||
G1 X25 Y25 E7.5
|
G1 X25 Y25 E7.5
|
||||||
|
|
||||||
|
# Update step_distance
|
||||||
|
SET_EXTRUDER_STEP_DISTANCE EXTRUDER=extruder DISTANCE=.005
|
||||||
|
G1 X30 Y30 E8.0
|
||||||
|
|
Loading…
Reference in New Issue