mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
heater: Rename add_sensor() to add_sensor_factory()
Signed-off-by: Douglas Hammond <wizhippo@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
cf6c5e6f18
commit
bb4fab5570
4 changed files with 12 additions and 12 deletions
|
@ -191,7 +191,7 @@ def load_config(config):
|
|||
for sensor_type, params in [("AD595", AD595), ("PT100 INA826", PT100)]:
|
||||
func = (lambda config, params=params:
|
||||
PrinterADCtoTemperature(config, LinearVoltage(config, params)))
|
||||
pheater.add_sensor(sensor_type, func)
|
||||
pheater.add_sensor_factory(sensor_type, func)
|
||||
|
||||
def load_config_prefix(config):
|
||||
if config.get("resistance1", None) is None:
|
||||
|
@ -199,4 +199,4 @@ def load_config_prefix(config):
|
|||
else:
|
||||
custom_sensor = CustomLinearResistance(config)
|
||||
pheater = config.get_printer().lookup_object("heater")
|
||||
pheater.add_sensor(custom_sensor.name, custom_sensor.create)
|
||||
pheater.add_sensor_factory(custom_sensor.name, custom_sensor.create)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue