printer: Add get_heaters

This commit is contained in:
Jordan Ruthe 2021-02-19 14:40:33 -05:00
parent 41e2008249
commit 3326551d5e

View File

@ -162,6 +162,14 @@ class Printer:
def get_gcode_macros(self): def get_gcode_macros(self):
return self.get_config_section_list("gcode_macro ") return self.get_config_section_list("gcode_macro ")
def get_heaters(self):
heaters = []
if self.has_heated_bed():
heaters.append("heater_bed")
for h in self.get_config_section_list("heater_generic "):
heaters.append(h)
return heaters
def get_printer_status_data(self): def get_printer_status_data(self):
data = { data = {
"printer": { "printer": {