mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 04:54:11 -06:00
Generic Heater Support
Adds the ability to register a custom/generic heater through a new extra called heater_generic. This takes a gcode_id that is reported by M105. Adds a new command to set the temperature for any heater using the syntax: SET_HEATER_TEMPERATURE HEATER=<heater_name> TARGET=<target_temp> Signed-off-by: John Jardine <john@gprime.net>
This commit is contained in:
parent
805e56008f
commit
6316b2c1b6
4 changed files with 62 additions and 7 deletions
16
klippy/extras/heater_generic.py
Normal file
16
klippy/extras/heater_generic.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Support for a generic heater
|
||||
#
|
||||
# Copyright (C) 2019 John Jardine <john@gprime.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
import logging
|
||||
|
||||
class PrinterHeaterGeneric:
|
||||
def __init__(self, config):
|
||||
self.printer = config.get_printer()
|
||||
gcode_id = config.get("gcode_id")
|
||||
self.heater = self.printer.lookup_object('heater').setup_heater(config, gcode_id)
|
||||
|
||||
def load_config_prefix(config):
|
||||
return PrinterHeaterGeneric(config)
|
Loading…
Add table
Add a link
Reference in a new issue