mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -06:00
stepper: Don't peak into PrinterStepper members
Add additional wrapper functions so that no outside callers need to peak into the member variables of PrinterStepper. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9a97a348ae
commit
b96542f0e5
7 changed files with 26 additions and 24 deletions
|
@ -599,11 +599,10 @@ class GCodeParser:
|
|||
return
|
||||
kin = self.toolhead.get_kinematics()
|
||||
steppers = kin.get_steppers()
|
||||
mcu_pos = " ".join(["%s:%d" % (s.get_name(),
|
||||
s.mcu_stepper.get_mcu_position())
|
||||
mcu_pos = " ".join(["%s:%d" % (s.get_name(), s.get_mcu_position())
|
||||
for s in steppers])
|
||||
stepper_pos = " ".join(
|
||||
["%s:%.6f" % (s.get_name(), s.mcu_stepper.get_commanded_position())
|
||||
["%s:%.6f" % (s.get_name(), s.get_commanded_position())
|
||||
for s in steppers])
|
||||
kinematic_pos = " ".join(["%s:%.6f" % (a, v)
|
||||
for a, v in zip("XYZE", kin.get_position())])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue