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:
parent
c2c4e9c42e
commit
7b9c98a0a8
@ -54,11 +54,13 @@ class Printer:
|
|||||||
if "shared_heater" in self.config[x]:
|
if "shared_heater" in self.config[x]:
|
||||||
continue
|
continue
|
||||||
self.extrudercount += 1
|
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] = {
|
self.devices[x] = {
|
||||||
"temperature": 0,
|
"temperature": 0,
|
||||||
"target": 0
|
"target": 0
|
||||||
}
|
}
|
||||||
|
logging.info("self.devices: %s" % self.devices)
|
||||||
if x.startswith('bed_mesh '):
|
if x.startswith('bed_mesh '):
|
||||||
r = self.config[x]
|
r = self.config[x]
|
||||||
r['x_count'] = int(r['x_count'])
|
r['x_count'] = int(r['x_count'])
|
||||||
@ -181,6 +183,8 @@ class Printer:
|
|||||||
heaters.append("heater_bed")
|
heaters.append("heater_bed")
|
||||||
for h in self.get_config_section_list("heater_generic "):
|
for h in self.get_config_section_list("heater_generic "):
|
||||||
heaters.append(h)
|
heaters.append(h)
|
||||||
|
for h in self.get_config_section_list("temperature_sensor "):
|
||||||
|
heaters.append(h)
|
||||||
return heaters
|
return heaters
|
||||||
|
|
||||||
def get_printer_status_data(self):
|
def get_printer_status_data(self):
|
||||||
|
@ -34,6 +34,8 @@ class PreheatPanel(ScreenPanel):
|
|||||||
|
|
||||||
add_heaters = self._printer.get_heaters()
|
add_heaters = self._printer.get_heaters()
|
||||||
for h in add_heaters:
|
for h in add_heaters:
|
||||||
|
if h.startswith("temperature_sensor "):
|
||||||
|
continue
|
||||||
if h == "heater_bed":
|
if h == "heater_bed":
|
||||||
self.labels[h] = self._gtk.ButtonImage("bed", self._gtk.formatTemperatureString(0, 0))
|
self.labels[h] = self._gtk.ButtonImage("bed", self._gtk.formatTemperatureString(0, 0))
|
||||||
else:
|
else:
|
||||||
|
@ -49,7 +49,8 @@ class TemperaturePanel(ScreenPanel):
|
|||||||
i = 0
|
i = 0
|
||||||
cols = 3 if len(self.heaters) > 4 else (1 if len(self.heaters) <= 2 else 2)
|
cols = 3 if len(self.heaters) > 4 else (1 if len(self.heaters) <= 2 else 2)
|
||||||
for h in self.heaters:
|
for h in self.heaters:
|
||||||
self.labels[h].connect('clicked', self.select_heater, h)
|
if not (h.startswith("temperature_sensor")):
|
||||||
|
self.labels[h].connect('clicked', self.select_heater, h)
|
||||||
eq_grid.attach(self.labels[h], i%cols, int(i/cols), 1, 1)
|
eq_grid.attach(self.labels[h], i%cols, int(i/cols), 1, 1)
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user