Minor serial code cleanup
This commit is contained in:
@ -53,14 +53,10 @@ void GcodeSuite::M118() {
|
||||
}
|
||||
|
||||
#if HAS_MULTI_SERIAL
|
||||
const int8_t old_serial = multiSerial.portMask;
|
||||
if (WITHIN(port, 0, NUM_SERIAL))
|
||||
multiSerial.portMask = port ? _BV(port - 1) : SERIAL_ALL;
|
||||
PORT_REDIRECT(WITHIN(port, 0, NUM_SERIAL) ? (port ? _BV(port - 1) : SERIAL_ALL) : multiSerial.portMask);
|
||||
#endif
|
||||
|
||||
if (hasE) SERIAL_ECHO_START();
|
||||
if (hasA) SERIAL_ECHOPGM("//");
|
||||
SERIAL_ECHOLN(p);
|
||||
|
||||
TERN_(HAS_MULTI_SERIAL, multiSerial.portMask = old_serial);
|
||||
}
|
||||
|
Reference in New Issue
Block a user