stepper: Calculate the stepper name directly from the config section

There is no need to pass the name to the PrinterStepper class as it
can determine the name itself.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2017-10-29 10:58:04 -04:00
parent fda988889b
commit aaeda540b6
5 changed files with 10 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ class PrinterExtruder:
def __init__(self, printer, config):
self.config = config
self.heater = heater.PrinterHeater(printer, config)
self.stepper = stepper.PrinterStepper(printer, config, 'extruder')
self.stepper = stepper.PrinterStepper(printer, config)
self.nozzle_diameter = config.getfloat('nozzle_diameter', above=0.)
filament_diameter = config.getfloat(
'filament_diameter', minval=self.nozzle_diameter)