Fix for showing temperatures for Malyan M200 and Monoprice Mini

This commit is contained in:
Jorge García 2018-05-26 13:15:36 +02:00 committed by GitHub
parent dc9813b916
commit 4bd87e2164
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -305,7 +305,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
if self._firmware_name is None:
self.sendCommand("M115")
if b"ok T:" in line or line.startswith(b"T:") or b"ok B:" in line or line.startswith(b"B:"): # Temperature message. 'T:' for extruder and 'B:' for bed
if (b"ok " in line and b"T:" in line) or b"ok T:" in line or line.startswith(b"T:") or b"ok B:" in line or line.startswith(b"B:"): # Temperature message. 'T:' for extruder and 'B:' for bed
extruder_temperature_matches = re.findall(b"T(\d*): ?([\d\.]+) ?\/?([\d\.]+)?", line)
# Update all temperature values
matched_extruder_nrs = []