diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index b92d81072a..9881707896 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -51,22 +51,22 @@ #define MYSERIAL MSerial #endif -#define SERIAL_PROTOCOL(x) MYSERIAL.print(x); -#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y); -#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x)); -#define SERIAL_PROTOCOLLN(x) {MYSERIAL.print(x);MYSERIAL.write('\n');} -#define SERIAL_PROTOCOLLNPGM(x) {serialprintPGM(PSTR(x));MYSERIAL.write('\n');} +#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x)) +#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y)) +#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x))) +#define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n')) +#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n')) const char errormagic[] PROGMEM ="Error:"; const char echomagic[] PROGMEM ="echo:"; -#define SERIAL_ERROR_START serialprintPGM(errormagic); +#define SERIAL_ERROR_START (serialprintPGM(errormagic)) #define SERIAL_ERROR(x) SERIAL_PROTOCOL(x) #define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x) #define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x) -#define SERIAL_ECHO_START serialprintPGM(echomagic); +#define SERIAL_ECHO_START (serialprintPGM(echomagic)) #define SERIAL_ECHO(x) SERIAL_PROTOCOL(x) #define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index f5df7a1e72..c732716b1d 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -244,7 +244,7 @@ void PID_autotune(float temp, int extruder, int ncycles) Kp = 0.6*Ku; Ki = 2*Kp/Tu; Kd = Kp*Tu/8; - SERIAL_PROTOCOLLNPGM(" Clasic PID ") + SERIAL_PROTOCOLLNPGM(" Clasic PID "); SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp); SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki); SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);