diff --git a/klippy/extras/tmc2130.py b/klippy/extras/tmc2130.py index 3ecae3f2e..e7ba9ddd5 100644 --- a/klippy/extras/tmc2130.py +++ b/klippy/extras/tmc2130.py @@ -5,7 +5,6 @@ # This file may be distributed under the terms of the GNU GPLv3 license. import math from . import bus, tmc -from configfile import PrinterConfig TMC_FREQUENCY = 13200000.0 @@ -201,19 +200,6 @@ class TMC2130CurrentHelper(tmc.BaseTMCCurrentHelper): def __init__(self, config, mcu_tmc): super().__init__(config, mcu_tmc, MAX_CURRENT) - pconfig: PrinterConfig = self.printer.lookup_object("configfile") - - self.sense_resistor = config.get("sense_resistor", None) - if self.sense_resistor is None: - pconfig.warn( - "config", - f"""[{self.name}] sense_resistor not specified; using default = 0.110. - If this value is wrong, it might burn your house down. - This parameter will be mandatory in future versions. - Specify the parameter to resolve this warning""", - self.name, - "sense_resistor", - ) self.sense_resistor = config.getfloat( "sense_resistor", 0.110, above=0.0 diff --git a/klippy/extras/tmc5160.py b/klippy/extras/tmc5160.py index f1003f977..1477ba84f 100644 --- a/klippy/extras/tmc5160.py +++ b/klippy/extras/tmc5160.py @@ -6,7 +6,6 @@ import math from . import tmc from . import tmc2130 -from configfile import PrinterConfig TMC_FREQUENCY = 12000000.0 @@ -255,19 +254,6 @@ class TMC5160CurrentHelper(tmc.BaseTMCCurrentHelper): def __init__(self, config, mcu_tmc): super().__init__(config, mcu_tmc, MAX_CURRENT) - pconfig: PrinterConfig = self.printer.lookup_object("configfile") - - self.sense_resistor = config.get("sense_resistor", None) - if self.sense_resistor is None: - pconfig.warn( - "config", - f"""[{self.name}] sense_resistor not specified; using default = 0.075. - If this value is wrong, it might burn your house down. - This parameter will be mandatory in future versions. - Specify the parameter to resolve this warning""", - self.name, - "sense_resistor", - ) self.sense_resistor = config.getfloat( "sense_resistor", 0.075, above=0.0