Commit 7e1007ef authored by Guillaume Seguin's avatar Guillaume Seguin

Fix tempreading parsing in pronsole as well

parent 412aa61f
...@@ -415,17 +415,17 @@ class Status: ...@@ -415,17 +415,17 @@ class Status:
def update_tempreading(self, tempstr): def update_tempreading(self, tempstr):
temps = parse_temperature_report(tempstr) temps = parse_temperature_report(tempstr)
if "T0" in temps: hotend_temp = float(temps["T0"][0]) if "T0" in temps and temps["T0"][0]: hotend_temp = float(temps["T0"][0])
elif "T" in temps: hotend_temp = float(temps["T"][0]) elif "T" in temps and temps["T"][0]: hotend_temp = float(temps["T"][0])
else: hotend_temp = None else: hotend_temp = None
if "T0" in temps and temps["T0"][1] is not None: hotend_setpoint = float(temps["T0"][1]) if "T0" in temps and temps["T0"][1]: hotend_setpoint = float(temps["T0"][1])
elif "T" in temps and temps["T"][1] is not None: hotend_setpoint = float(temps["T"][1]) elif "T" in temps and temps["T"][1]: hotend_setpoint = float(temps["T"][1])
else: hotend_setpoint = None else: hotend_setpoint = None
if hotend_temp is not None: if hotend_temp is not None:
self.extruder_temp = hotend_temp self.extruder_temp = hotend_temp
if hotend_setpoint is not None: if hotend_setpoint is not None:
self.extruder_temp_target = hotend_setpoint self.extruder_temp_target = hotend_setpoint
bed_temp = float(temps["B"][0]) if "B" in temps else None bed_temp = float(temps["B"][0]) if "B" in temps and temps["B"][0] else None
if bed_temp is not None: if bed_temp is not None:
self.bed_temp = bed_temp self.bed_temp = bed_temp
setpoint = temps["B"][1] setpoint = temps["B"][1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment