mcu: Change mcu_stepper.set_position() to take a location in millimeters

Update the set_position() method to convert from millimeters to
absolute step position.

Also, update PrinterStepper.get_homed_offset() and
mcu_stepper.get_commanded_position() to return millimeters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-04-04 19:20:54 -04:00
parent 79f31238b0
commit e4153a536f
5 changed files with 16 additions and 21 deletions

View file

@ -99,4 +99,4 @@ class PrinterStepper:
raise homing.EndstopError(
"Endstop %s incorrect phase (got %d vs %d)" % (
self.name, pos, self.homing_endstop_phase))
return delta
return delta * self.step_dist