Browse Source

Tweak to serial macros

Scott Lahteine 6 years ago
parent
commit
49c693c85b
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      Marlin/src/core/serial.h

+ 8
- 8
Marlin/src/core/serial.h View File

73
 #define SERIAL_PROTOCOLPGM(x)               (serialprintPGM(PSTR(x)))
73
 #define SERIAL_PROTOCOLPGM(x)               (serialprintPGM(PSTR(x)))
74
 #define SERIAL_PROTOCOLLN(x)                do{ MYSERIAL.print(x); SERIAL_EOL(); }while(0)
74
 #define SERIAL_PROTOCOLLN(x)                do{ MYSERIAL.print(x); SERIAL_EOL(); }while(0)
75
 #define SERIAL_PROTOCOLLNPGM(x)             (serialprintPGM(PSTR(x "\n")))
75
 #define SERIAL_PROTOCOLLNPGM(x)             (serialprintPGM(PSTR(x "\n")))
76
-#define SERIAL_PROTOCOLPAIR(name, value)    (serial_echopair_P(PSTR(name),(value)))
77
-#define SERIAL_PROTOCOLLNPAIR(name, value)  do{ SERIAL_PROTOCOLPAIR(name, value); SERIAL_EOL(); }while(0)
76
+#define SERIAL_PROTOCOLPAIR(pre, value)     (serial_echopair_P(PSTR(pre),(value)))
77
+#define SERIAL_PROTOCOLLNPAIR(pre, value)   do{ SERIAL_PROTOCOLPAIR(pre, value); SERIAL_EOL(); }while(0)
78
 
78
 
79
 #define SERIAL_ECHO_START()            (serialprintPGM(echomagic))
79
 #define SERIAL_ECHO_START()            (serialprintPGM(echomagic))
80
 #define SERIAL_ECHO(x)                 SERIAL_PROTOCOL(x)
80
 #define SERIAL_ECHO(x)                 SERIAL_PROTOCOL(x)
81
 #define SERIAL_ECHOPGM(x)              SERIAL_PROTOCOLPGM(x)
81
 #define SERIAL_ECHOPGM(x)              SERIAL_PROTOCOLPGM(x)
82
 #define SERIAL_ECHOLN(x)               SERIAL_PROTOCOLLN(x)
82
 #define SERIAL_ECHOLN(x)               SERIAL_PROTOCOLLN(x)
83
 #define SERIAL_ECHOLNPGM(x)            SERIAL_PROTOCOLLNPGM(x)
83
 #define SERIAL_ECHOLNPGM(x)            SERIAL_PROTOCOLLNPGM(x)
84
-#define SERIAL_ECHOPAIR(name,value)    SERIAL_PROTOCOLPAIR(name, value)
85
-#define SERIAL_ECHOLNPAIR(name, value) SERIAL_PROTOCOLLNPAIR(name, value)
84
+#define SERIAL_ECHOPAIR(pre,value)     SERIAL_PROTOCOLPAIR(pre, value)
85
+#define SERIAL_ECHOLNPAIR(pre, value)  SERIAL_PROTOCOLLNPAIR(pre, value)
86
 #define SERIAL_ECHO_F(x,y)             SERIAL_PROTOCOL_F(x,y)
86
 #define SERIAL_ECHO_F(x,y)             SERIAL_PROTOCOL_F(x,y)
87
 
87
 
88
 #define SERIAL_ERROR_START()           (serialprintPGM(errormagic))
88
 #define SERIAL_ERROR_START()           (serialprintPGM(errormagic))
92
 #define SERIAL_ERRORLNPGM(x)           SERIAL_PROTOCOLLNPGM(x)
92
 #define SERIAL_ERRORLNPGM(x)           SERIAL_PROTOCOLLNPGM(x)
93
 
93
 
94
 // These macros compensate for float imprecision
94
 // These macros compensate for float imprecision
95
-#define SERIAL_PROTOCOLPAIR_F(name, value)    SERIAL_PROTOCOLPAIR(name, FIXFLOAT(value))
96
-#define SERIAL_PROTOCOLLNPAIR_F(name, value)  SERIAL_PROTOCOLLNPAIR(name, FIXFLOAT(value))
97
-#define SERIAL_ECHOPAIR_F(name,value)         SERIAL_ECHOPAIR(name, FIXFLOAT(value))
98
-#define SERIAL_ECHOLNPAIR_F(name, value)      SERIAL_ECHOLNPAIR(name, FIXFLOAT(value))
95
+#define SERIAL_PROTOCOLPAIR_F(pre, value)   SERIAL_PROTOCOLPAIR(pre, FIXFLOAT(value))
96
+#define SERIAL_PROTOCOLLNPAIR_F(pre, value) SERIAL_PROTOCOLLNPAIR(pre, FIXFLOAT(value))
97
+#define SERIAL_ECHOPAIR_F(pre,value)        SERIAL_ECHOPAIR(pre, FIXFLOAT(value))
98
+#define SERIAL_ECHOLNPAIR_F(pre, value)     SERIAL_ECHOLNPAIR(pre, FIXFLOAT(value))
99
 
99
 
100
 void serial_echopair_P(const char* s_P, const char *v);
100
 void serial_echopair_P(const char* s_P, const char *v);
101
 void serial_echopair_P(const char* s_P, char v);
101
 void serial_echopair_P(const char* s_P, char v);

Loading…
Cancel
Save