mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 07:04:01 -06:00
temperature_sensors: Define default thermistors in config
Move the definitions of the default thermistors from thermistors.py to the temperature_sensors.cfg file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
596cd21751
commit
c0909d2f7f
2 changed files with 64 additions and 30 deletions
|
@ -101,32 +101,6 @@ class CustomThermistor:
|
|||
def create(self, config):
|
||||
return PrinterThermistor(config, self.params)
|
||||
|
||||
# Default sensors
|
||||
Sensors = {
|
||||
"EPCOS 100K B57560G104F": {
|
||||
't1': 25., 'r1': 100000., 't2': 150., 'r2': 1641.9,
|
||||
't3': 250., 'r3': 226.15 },
|
||||
"ATC Semitec 104GT-2": {
|
||||
't1': 20., 'r1': 126800., 't2': 150., 'r2': 1360.,
|
||||
't3': 300., 'r3': 80.65 },
|
||||
"SliceEngineering 450": {
|
||||
't1': 25., 'r1': 500000., 't2': 200., 'r2': 3734.,
|
||||
't3': 400., 'r3': 240. },
|
||||
"TDK NTCG104LH104JT1": {
|
||||
't1': 25., 'r1': 100000., 't2': 50., 'r2': 31230.,
|
||||
't3': 125., 'r3': 2066. },
|
||||
"NTC 100K beta 3950": { 't1': 25., 'r1': 100000., 'beta': 3950. },
|
||||
"Honeywell 100K 135-104LAG-J01": { 't1': 25., 'r1': 100000., 'beta': 3974.},
|
||||
"NTC 100K MGB18-104F39050L32": { 't1': 25., 'r1': 100000., 'beta': 4100. },
|
||||
}
|
||||
|
||||
def load_config(config):
|
||||
# Register default thermistor types
|
||||
pheaters = config.get_printer().load_object(config, "heaters")
|
||||
for sensor_type, params in Sensors.items():
|
||||
func = (lambda config, params=params: PrinterThermistor(config, params))
|
||||
pheaters.add_sensor_factory(sensor_type, func)
|
||||
|
||||
def load_config_prefix(config):
|
||||
thermistor = CustomThermistor(config)
|
||||
pheaters = config.get_printer().load_object(config, "heaters")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue