Remove superfluous check for 'ok T:'

This check is never hit because if there is 'ok T:' in the bytes array then it will have hit the first check for 'ok ' and 'T:'.
This commit is contained in:
Ghostkeeper 2018-09-03 10:50:07 +02:00
parent 9bcc8ffff6
commit 1136033f97
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -326,7 +326,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
if self._firmware_name is None:
self.sendCommand("M115")
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
if (b"ok " in line and b"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 = []