Include temperature_sensor in listing of temperatures

This update will add temperature sensors to the main menu and 
temperature panels.
This commit is contained in:
Jordan
2021-05-08 14:31:50 -04:00
parent c2c4e9c42e
commit 7b9c98a0a8
3 changed files with 9 additions and 2 deletions

View File

@@ -54,11 +54,13 @@ class Printer:
if "shared_heater" in self.config[x]:
continue
self.extrudercount += 1
if x.startswith('heater_bed') or x.startswith('heater_generic '):
if x == 'heater_bed' or x.startswith('heater_generic ') or x.startswith('temperature_sensor '):
logging.info("X: %s" % x)
self.devices[x] = {
"temperature": 0,
"target": 0
}
logging.info("self.devices: %s" % self.devices)
if x.startswith('bed_mesh '):
r = self.config[x]
r['x_count'] = int(r['x_count'])
@@ -181,6 +183,8 @@ class Printer:
heaters.append("heater_bed")
for h in self.get_config_section_list("heater_generic "):
heaters.append(h)
for h in self.get_config_section_list("temperature_sensor "):
heaters.append(h)
return heaters
def get_printer_status_data(self):