tmc2130: Fix broken error report due to missing self.name

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-03-11 17:52:18 -05:00
parent 715b89ce0c
commit bf5c2505ab
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ def lookup_tmc_spi_chain(config):
class MCU_TMC_SPI: class MCU_TMC_SPI:
def __init__(self, config, name_to_reg, fields): def __init__(self, config, name_to_reg, fields):
self.printer = config.get_printer() self.printer = config.get_printer()
self.name = config.get_name().split()[-1]
self.tmc_spi, self.chain_pos = lookup_tmc_spi_chain(config) self.tmc_spi, self.chain_pos = lookup_tmc_spi_chain(config)
self.mutex = self.tmc_spi.mutex self.mutex = self.tmc_spi.mutex
self.name_to_reg = name_to_reg self.name_to_reg = name_to_reg