39
39
// #define MINIMAL_CAP_LINES // Don't even mention the disabled capabilities
40
40
41
41
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
42
- #if ENABLED(MINIMAL_CAP_LINES)
43
- #define cap_line (S,C ) if (C) _cap_line(S)
44
- static void _cap_line (FSTR_P const name) {
45
- SERIAL_ECHOPGM (" Cap:" );
46
- SERIAL_ECHOF (name);
47
- SERIAL_ECHOLNPGM (" :1" );
48
- }
49
- #else
50
- #define cap_line (V... ) _cap_line(V)
51
- static void _cap_line (FSTR_P const name, bool ena=false ) {
52
- SERIAL_ECHOPGM (" Cap:" );
53
- SERIAL_ECHOF (name);
42
+ inline void cap_line (FSTR_P const name, const bool ena=true ) {
43
+ #if ENABLED(MINIMAL_CAP_LINES)
44
+ if (ena) SERIAL_ECHOLNPGM (" Cap:" , name, " :1" );
45
+ #else
46
+ SERIAL_ECHOPGM (" Cap:" , name);
54
47
SERIAL_CHAR (' :' , ' 0' + ena);
55
48
SERIAL_EOL ();
56
- }
57
- # endif
49
+ # endif
50
+ }
58
51
#endif
59
52
60
53
/* *
@@ -100,10 +93,10 @@ void GcodeSuite::M115() {
100
93
serial_index_t port = queue.ring_buffer .command_port ();
101
94
102
95
// PAREN_COMMENTS
103
- TERN_ (PAREN_COMMENTS, cap_line (F (" PAREN_COMMENTS" ), true ));
96
+ TERN_ (PAREN_COMMENTS, cap_line (F (" PAREN_COMMENTS" )));
104
97
105
98
// QUOTED_STRINGS
106
- TERN_ (GCODE_QUOTED_STRINGS, cap_line (F (" QUOTED_STRINGS" ), true ));
99
+ TERN_ (GCODE_QUOTED_STRINGS, cap_line (F (" QUOTED_STRINGS" )));
107
100
108
101
// SERIAL_XON_XOFF
109
102
cap_line (F (" SERIAL_XON_XOFF" ), ENABLED (SERIAL_XON_XOFF));
@@ -124,10 +117,10 @@ void GcodeSuite::M115() {
124
117
cap_line (F (" AUTOREPORT_TEMP" ), ENABLED (AUTO_REPORT_TEMPERATURES));
125
118
126
119
// PROGRESS (M530 S L, M531 <file>, M532 X L)
127
- cap_line (F (" PROGRESS" ));
120
+ cap_line (F (" PROGRESS" ), false );
128
121
129
122
// Print Job timer M75, M76, M77
130
- cap_line (F (" PRINT_JOB" ), true );
123
+ cap_line (F (" PRINT_JOB" ));
131
124
132
125
// AUTOLEVEL (G29)
133
126
cap_line (F (" AUTOLEVEL" ), ENABLED (HAS_AUTOLEVEL));
@@ -153,9 +146,9 @@ void GcodeSuite::M115() {
153
146
154
147
// SPINDLE AND LASER CONTROL (M3, M4, M5)
155
148
#if ENABLED(SPINDLE_FEATURE)
156
- cap_line (F (" SPINDLE" ), true );
149
+ cap_line (F (" SPINDLE" ));
157
150
#elif ENABLED(LASER_FEATURE)
158
- cap_line (F (" LASER" ), true );
151
+ cap_line (F (" LASER" ));
159
152
#endif
160
153
161
154
// EMERGENCY_PARSER (M108, M112, M410, M876)
0 commit comments