From 2774ee82905eaee15c9d671f6a7f21653d572af8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 17 Nov 2025 18:04:19 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Misc=20patches=20from=20ProUI=20?= =?UTF-8?q?(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/config/M575.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Marlin/src/gcode/config/M575.cpp b/Marlin/src/gcode/config/M575.cpp index b88b372ddb..dd8f8addb5 100644 --- a/Marlin/src/gcode/config/M575.cpp +++ b/Marlin/src/gcode/config/M575.cpp @@ -51,25 +51,24 @@ void GcodeSuite::M575() { switch (baud) { case 2400: case 9600: case 19200: case 38400: case 57600: case 115200: case 250000: case 500000: case 1000000: { - const int8_t port = parser.intval('P', -99); - const bool set1 = (port == -99 || port == 0); - SERIAL_FLUSH(); + const int8_t port = parser.intval('P', -99); + const bool set1 = (port == -99 || port == 0); if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); } #if HAS_MULTI_SERIAL + const bool set2 = (port == -99 || port == 1); if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); } #ifdef SERIAL_PORT_3 + const bool set3 = (port == -99 || port == 2); if (set3) { MYSERIAL3.end(); MYSERIAL3.begin(baud); } #endif #endif if (set1) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(0), " baud rate set to ", baud); #if HAS_MULTI_SERIAL - const bool set2 = (port == -99 || port == 1); if (set2) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(1), " baud rate set to ", baud); #ifdef SERIAL_PORT_3 - const bool set3 = (port == -99 || port == 2); if (set3) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(2), " baud rate set to ", baud); #endif #endif