From dc9813b916c198dbce477f1a7799233eba0e9f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Garc=C3=ADa?= Date: Sat, 26 May 2018 01:56:57 +0200 Subject: [PATCH 1/2] Fix for detecting Malyan M200 and Monoprice Mini --- plugins/USBPrinting/AutoDetectBaudJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/AutoDetectBaudJob.py b/plugins/USBPrinting/AutoDetectBaudJob.py index 50bb831ba8..6d30615eb4 100644 --- a/plugins/USBPrinting/AutoDetectBaudJob.py +++ b/plugins/USBPrinting/AutoDetectBaudJob.py @@ -58,7 +58,7 @@ class AutoDetectBaudJob(Job): while timeout_time > time(): line = serial.readline() - if b"ok T:" in line: + if b"ok " in line and b"T:" in line: successful_responses += 1 if successful_responses >= 3: self.setResult(baud_rate) From 4bd87e2164489209e242c127e68f446dcbe10589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Garc=C3=ADa?= Date: Sat, 26 May 2018 13:15:36 +0200 Subject: [PATCH 2/2] Fix for showing temperatures for Malyan M200 and Monoprice Mini --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 00eb2f0b25..fe6a12623b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -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 = []