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:
Kevin O'Connor 2018-06-21 18:15:23 -04:00
parent 9a97a348ae
commit b96542f0e5
7 changed files with 26 additions and 24 deletions

View file

@ -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())])