job_status and base_panel: safeguard against possible issues with temps
This commit is contained in:
parent
784253ca77
commit
d3cd4008a8
@ -230,7 +230,7 @@ class BasePanel(ScreenPanel):
|
||||
if devices is not None:
|
||||
for device in devices:
|
||||
temp = self._screen.printer.get_dev_stat(device, "temperature")
|
||||
if temp is not None:
|
||||
if temp is not None and device in self.labels:
|
||||
name = ""
|
||||
if not (device.startswith("extruder") or device.startswith("heater_bed")):
|
||||
if self.titlebar_name_type == "full":
|
||||
|
@ -932,7 +932,8 @@ class JobStatusPanel(ScreenPanel):
|
||||
self.labels['lcdmessage'].set_text(str(msg))
|
||||
|
||||
def update_temp(self, x, temp, target):
|
||||
if target > 0:
|
||||
self.labels[x].set_label("%3d/%3d°" % (temp, target))
|
||||
else:
|
||||
self.labels[x].set_label("%3d°" % temp)
|
||||
if x in self.labels and temp is not None:
|
||||
if target is not None and target > 0:
|
||||
self.labels[x].set_label("%3d/%3d°" % (temp, target))
|
||||
else:
|
||||
self.labels[x].set_label("%3d°" % temp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user