Skip to content

Commit

Permalink
Revert "feat/tmc - warning for sense_resistor"
Browse files Browse the repository at this point in the history
This reverts commit fdb52d4.
  • Loading branch information
lraithel15133 committed Jul 18, 2024
1 parent c61695c commit a945c63
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions klippy/extras/tmc2130.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions klippy/extras/tmc5160.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import math
from . import tmc
from . import tmc2130
from configfile import PrinterConfig

TMC_FREQUENCY = 12000000.0

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a945c63

Please sign in to comment.