tmc: Query the stepper step_distance from the stepper object

Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-01-05 18:07:51 -05:00
parent c36fe76d69
commit 67b2852249
2 changed files with 28 additions and 17 deletions

View File

@@ -53,6 +53,10 @@ class ForceMove:
def register_stepper(self, stepper):
name = stepper.get_name()
self.steppers[name] = stepper
def lookup_stepper(self, name):
if name not in self.steppers:
raise self.printer.config_error("Unknown stepper %s" % (name,))
return self.steppers[name]
def force_enable(self, stepper):
toolhead = self.printer.lookup_object('toolhead')
print_time = toolhead.get_last_move_time()