瀏覽代碼

Extend SERIAL_CHAR to take multiple arguments

Scott Lahteine 5 年之前
父節點
當前提交
95046c9047

+ 2
- 4
Marlin/src/HAL/HAL_AVR/pinsDebug.h 查看文件

234
 void com_print(uint8_t N, uint8_t Z) {
234
 void com_print(uint8_t N, uint8_t Z) {
235
   const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
235
   const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
236
   SERIAL_ECHOPGM("    COM");
236
   SERIAL_ECHOPGM("    COM");
237
-  SERIAL_CHAR('0' + N);
238
-  SERIAL_CHAR('A' + Z);
237
+  SERIAL_CHAR('0' + N, 'A' + Z);
239
   SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
238
   SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
240
 }
239
 }
241
 
240
 
247
   if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
246
   if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
248
 
247
 
249
   SERIAL_ECHOPGM("    TIMER");
248
   SERIAL_ECHOPGM("    TIMER");
250
-  SERIAL_CHAR(T + '0');
251
-  SERIAL_CHAR(L);
249
+  SERIAL_CHAR(T + '0', L);
252
   SERIAL_ECHO_SP(3);
250
   SERIAL_ECHO_SP(3);
253
 
251
 
254
   if (N == 3) {
252
   if (N == 3) {

+ 1
- 1
Marlin/src/HAL/shared/backtrace/backtrace.cpp 查看文件

35
 
35
 
36
   (*p)++;
36
   (*p)++;
37
 
37
 
38
-  SERIAL_CHAR('#'); SERIAL_PRINT(*p,DEC); SERIAL_ECHOPGM(" : ");
38
+  SERIAL_CHAR('#'); SERIAL_PRINT(*p, DEC); SERIAL_ECHOPGM(" : ");
39
   SERIAL_ECHOPGM(bte->name ? bte->name : "unknown"); SERIAL_ECHOPGM("@0x"); SERIAL_PRINT(bte->function, HEX);
39
   SERIAL_ECHOPGM(bte->name ? bte->name : "unknown"); SERIAL_ECHOPGM("@0x"); SERIAL_PRINT(bte->function, HEX);
40
   SERIAL_CHAR('+'); SERIAL_PRINT(bte->address - bte->function,DEC);
40
   SERIAL_CHAR('+'); SERIAL_PRINT(bte->address - bte->function,DEC);
41
   SERIAL_ECHOPGM(" PC:"); SERIAL_PRINT(bte->address,HEX); SERIAL_CHAR('\n');
41
   SERIAL_ECHOPGM(" PC:"); SERIAL_PRINT(bte->address,HEX); SERIAL_CHAR('\n');

+ 16
- 1
Marlin/src/core/serial.h 查看文件

66
 #define PORT_REDIRECT(p)        _PORT_REDIRECT(1,p)
66
 #define PORT_REDIRECT(p)        _PORT_REDIRECT(1,p)
67
 #define PORT_RESTORE()          _PORT_RESTORE(1)
67
 #define PORT_RESTORE()          _PORT_RESTORE(1)
68
 
68
 
69
-#define SERIAL_CHAR(x)          SERIAL_OUT(write, x)
70
 #define SERIAL_ECHO(x)          SERIAL_OUT(print, x)
69
 #define SERIAL_ECHO(x)          SERIAL_OUT(print, x)
71
 #define SERIAL_ECHO_F(V...)     SERIAL_OUT(print, V)
70
 #define SERIAL_ECHO_F(V...)     SERIAL_OUT(print, V)
72
 #define SERIAL_ECHOLN(x)        SERIAL_OUT(println, x)
71
 #define SERIAL_ECHOLN(x)        SERIAL_OUT(println, x)
83
   #define SERIAL_FLUSHTX()
82
   #define SERIAL_FLUSHTX()
84
 #endif
83
 #endif
85
 
84
 
85
+// Print up to 10 chars from a list
86
+#define __CHAR_N(N,V...)  _CHAR_##N(V)
87
+#define _CHAR_N(N,V...)   __CHAR_N(N,V)
88
+#define _CHAR_1(c)        SERIAL_OUT(write, c)
89
+#define _CHAR_2(a,b)      do{ _CHAR_1(a); _CHAR_1(b); }while(0)
90
+#define _CHAR_3(a,V...)   do{ _CHAR_1(a); _CHAR_2(V); }while(0)
91
+#define _CHAR_4(a,V...)   do{ _CHAR_1(a); _CHAR_3(V); }while(0)
92
+#define _CHAR_5(a,V...)   do{ _CHAR_1(a); _CHAR_4(V); }while(0)
93
+#define _CHAR_6(a,V...)   do{ _CHAR_1(a); _CHAR_5(V); }while(0)
94
+#define _CHAR_7(a,V...)   do{ _CHAR_1(a); _CHAR_6(V); }while(0)
95
+#define _CHAR_8(a,V...)   do{ _CHAR_1(a); _CHAR_7(V); }while(0)
96
+#define _CHAR_9(a,V...)   do{ _CHAR_1(a); _CHAR_8(V); }while(0)
97
+#define _CHAR_10(a,V...)  do{ _CHAR_1(a); _CHAR_9(V); }while(0)
98
+
99
+#define SERIAL_CHAR(V...) _CHAR_N(NUM_ARGS(V),V)
100
+
86
 // Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR().
101
 // Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR().
87
 #define __SEP_N(N,V...)   _SEP_##N(V)
102
 #define __SEP_N(N,V...)   _SEP_##N(V)
88
 #define _SEP_N(N,V...)    __SEP_N(N,V)
103
 #define _SEP_N(N,V...)    __SEP_N(N,V)

+ 1
- 2
Marlin/src/core/utility.cpp 查看文件

148
           SERIAL_ECHOPGM("ABL Adjustment X");
148
           SERIAL_ECHOPGM("ABL Adjustment X");
149
           LOOP_XYZ(a) {
149
           LOOP_XYZ(a) {
150
             float v = planner.get_axis_position_mm(AxisEnum(a)) - current_position[a];
150
             float v = planner.get_axis_position_mm(AxisEnum(a)) - current_position[a];
151
-            SERIAL_CHAR(' ');
152
-            SERIAL_CHAR('X' + char(a));
151
+            SERIAL_CHAR(' ', 'X' + char(a));
153
             if (v > 0) SERIAL_CHAR('+');
152
             if (v > 0) SERIAL_CHAR('+');
154
             SERIAL_ECHO(v);
153
             SERIAL_ECHO(v);
155
           }
154
           }

+ 1
- 2
Marlin/src/feature/bedlevel/bedlevel.cpp 查看文件

207
         #endif
207
         #endif
208
       }
208
       }
209
       #ifdef SCAD_MESH_OUTPUT
209
       #ifdef SCAD_MESH_OUTPUT
210
-        SERIAL_CHAR(' ');
211
-        SERIAL_CHAR(']');                     // close sub-array
210
+        SERIAL_CHAR(' ', ']');                    // close sub-array
212
         if (y < sy - 1) SERIAL_CHAR(',');
211
         if (y < sy - 1) SERIAL_CHAR(',');
213
       #endif
212
       #endif
214
       SERIAL_EOL();
213
       SERIAL_EOL();

+ 1
- 1
Marlin/src/feature/runout.h 查看文件

213
           if (change) {
213
           if (change) {
214
             SERIAL_ECHOPGM("Motion detected:");
214
             SERIAL_ECHOPGM("Motion detected:");
215
             for (uint8_t e = 0; e < NUM_RUNOUT_SENSORS; e++)
215
             for (uint8_t e = 0; e < NUM_RUNOUT_SENSORS; e++)
216
-              if (TEST(change, e)) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + e); }
216
+              if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e);
217
             SERIAL_EOL();
217
             SERIAL_EOL();
218
           }
218
           }
219
         #endif
219
         #endif

+ 3
- 3
Marlin/src/gcode/calibrate/M100.cpp 查看文件

238
     SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
238
     SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
239
 
239
 
240
   if (block_cnt == 0)       // Make sure the special case of no free blocks shows up as an
240
   if (block_cnt == 0)       // Make sure the special case of no free blocks shows up as an
241
-    block_cnt = -1;         // error to the calling code!
241
+    block_cnt = -1;         //  error to the calling code!
242
 
242
 
243
   SERIAL_ECHOPGM(" return=");
243
   SERIAL_ECHOPGM(" return=");
244
   if (block_cnt == 1) {
244
   if (block_cnt == 1) {
245
-    SERIAL_CHAR('0');       // if the block_cnt is 1, nothing has broken up the free memory
246
-    SERIAL_EOL();             // area and it is appropriate to say 'no corruption'.
245
+    SERIAL_CHAR('0');       // If the block_cnt is 1, nothing has broken up the free memory
246
+    SERIAL_EOL();           //  area and it is appropriate to say 'no corruption'.
247
     return 0;
247
     return 0;
248
   }
248
   }
249
   SERIAL_ECHOLNPGM("true");
249
   SERIAL_ECHOLNPGM("true");

+ 2
- 4
Marlin/src/gcode/calibrate/M425.cpp 查看文件

75
     SERIAL_ECHOLNPAIR("  Correction Amount/Fade-out:     F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
75
     SERIAL_ECHOLNPAIR("  Correction Amount/Fade-out:     F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
76
     SERIAL_ECHOPGM("  Backlash Distance (mm):        ");
76
     SERIAL_ECHOPGM("  Backlash Distance (mm):        ");
77
     LOOP_XYZ(a) {
77
     LOOP_XYZ(a) {
78
-      SERIAL_CHAR(' ');
79
-      SERIAL_CHAR(axis_codes[a]);
78
+      SERIAL_CHAR(' ', axis_codes[a]);
80
       SERIAL_ECHO(backlash.distance_mm[a]);
79
       SERIAL_ECHO(backlash.distance_mm[a]);
81
       SERIAL_EOL();
80
       SERIAL_EOL();
82
     }
81
     }
89
       SERIAL_ECHOPGM("  Average measured backlash (mm):");
88
       SERIAL_ECHOPGM("  Average measured backlash (mm):");
90
       if (backlash.has_any_measurement()) {
89
       if (backlash.has_any_measurement()) {
91
         LOOP_XYZ(a) if (backlash.has_measurement(AxisEnum(a))) {
90
         LOOP_XYZ(a) if (backlash.has_measurement(AxisEnum(a))) {
92
-          SERIAL_CHAR(' ');
93
-          SERIAL_CHAR(axis_codes[a]);
91
+          SERIAL_CHAR(' ', axis_codes[a]);
94
           SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
92
           SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
95
         }
93
         }
96
       }
94
       }

+ 1
- 2
Marlin/src/gcode/config/M221.cpp 查看文件

39
   }
39
   }
40
   else {
40
   else {
41
     SERIAL_ECHO_START();
41
     SERIAL_ECHO_START();
42
-    SERIAL_CHAR('E');
43
-    SERIAL_CHAR('0' + target_extruder);
42
+    SERIAL_CHAR('E', '0' + target_extruder);
44
     SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
43
     SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
45
     SERIAL_CHAR('%');
44
     SERIAL_CHAR('%');
46
     SERIAL_EOL();
45
     SERIAL_EOL();

+ 3
- 9
Marlin/src/gcode/host/M114.cpp 查看文件

39
   void report_xyze(const xyze_pos_t &pos, const uint8_t n=4, const uint8_t precision=3) {
39
   void report_xyze(const xyze_pos_t &pos, const uint8_t n=4, const uint8_t precision=3) {
40
     char str[12];
40
     char str[12];
41
     for (uint8_t a = 0; a < n; a++) {
41
     for (uint8_t a = 0; a < n; a++) {
42
-      SERIAL_CHAR(' ');
43
-      SERIAL_CHAR(axis_codes[a]);
44
-      SERIAL_CHAR(':');
42
+      SERIAL_CHAR(' ', axis_codes[a], ':');
45
       SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
43
       SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
46
     }
44
     }
47
     SERIAL_EOL();
45
     SERIAL_EOL();
50
   void report_xyz(const xyz_pos_t &pos, const uint8_t precision=3) {
48
   void report_xyz(const xyz_pos_t &pos, const uint8_t precision=3) {
51
     char str[12];
49
     char str[12];
52
     for (uint8_t a = X_AXIS; a <= Z_AXIS; a++) {
50
     for (uint8_t a = X_AXIS; a <= Z_AXIS; a++) {
53
-      SERIAL_CHAR(' ');
54
-      SERIAL_CHAR(axis_codes[a]);
55
-      SERIAL_CHAR(':');
51
+      SERIAL_CHAR(' ', axis_codes[a], ':');
56
       SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
52
       SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
57
     }
53
     }
58
     SERIAL_EOL();
54
     SERIAL_EOL();
150
 
146
 
151
     SERIAL_ECHOPGM("Stepper:");
147
     SERIAL_ECHOPGM("Stepper:");
152
     LOOP_XYZE(i) {
148
     LOOP_XYZE(i) {
153
-      SERIAL_CHAR(' ');
154
-      SERIAL_CHAR(axis_codes[i]);
155
-      SERIAL_CHAR(':');
149
+      SERIAL_CHAR(' ', axis_codes[i], ':');
156
       SERIAL_ECHO(stepper.position((AxisEnum)i));
150
       SERIAL_ECHO(stepper.position((AxisEnum)i));
157
     }
151
     }
158
     SERIAL_EOL();
152
     SERIAL_EOL();

+ 1
- 1
Marlin/src/gcode/parser.cpp 查看文件

346
     SERIAL_ECHOLNPGM(")");
346
     SERIAL_ECHOLNPGM(")");
347
     #if ENABLED(FASTER_GCODE_PARSER)
347
     #if ENABLED(FASTER_GCODE_PARSER)
348
       SERIAL_ECHOPGM(" args: { ");
348
       SERIAL_ECHOPGM(" args: { ");
349
-      for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
349
+      for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' ');
350
       SERIAL_CHAR('}');
350
       SERIAL_CHAR('}');
351
     #else
351
     #else
352
       SERIAL_ECHOPAIR(" args: { ", command_args, " }");
352
       SERIAL_ECHOPAIR(" args: { ", command_args, " }");

+ 1
- 4
Marlin/src/libs/L6470/L6470_Marlin.cpp 查看文件

539
 
539
 
540
 void L6470_Marlin::say_axis(const uint8_t axis, const bool label/*=true*/) {
540
 void L6470_Marlin::say_axis(const uint8_t axis, const bool label/*=true*/) {
541
   if (label) SERIAL_ECHOPGM("AXIS:");
541
   if (label) SERIAL_ECHOPGM("AXIS:");
542
-  SERIAL_CHAR(' ');
543
-  SERIAL_CHAR(index_to_axis[axis][0]);
544
-  SERIAL_CHAR(index_to_axis[axis][1]);
545
-  SERIAL_CHAR(' ');
542
+  SERIAL_CHAR(' ', index_to_axis[axis][0], index_to_axis[axis][1], ' ');
546
 }
543
 }
547
 
544
 
548
 void L6470_Marlin::error_status_decode(const uint16_t status, const uint8_t axis) {  // assumes status bits have been inverted
545
 void L6470_Marlin::error_status_decode(const uint16_t status, const uint8_t axis) {  // assumes status bits have been inverted

+ 1
- 1
Marlin/src/module/endstops.cpp 查看文件

471
           #endif
471
           #endif
472
         }
472
         }
473
         SERIAL_ECHOPGM(MSG_FILAMENT_RUNOUT_SENSOR);
473
         SERIAL_ECHOPGM(MSG_FILAMENT_RUNOUT_SENSOR);
474
-        if (i > 1) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + i); }
474
+        if (i > 1) SERIAL_CHAR(' ', '0' + i);
475
         print_es_state(extDigitalRead(pin) != FIL_RUNOUT_INVERTING);
475
         print_es_state(extDigitalRead(pin) != FIL_RUNOUT_INVERTING);
476
       }
476
       }
477
     #endif
477
     #endif

+ 47
- 46
Marlin/src/module/stepper.cpp 查看文件

2932
   }
2932
   }
2933
 
2933
 
2934
   void Stepper::microstep_readings() {
2934
   void Stepper::microstep_readings() {
2935
-    SERIAL_ECHOPGM("MS1,MS2,MS3 Pins\nX: ");
2935
+    SERIAL_ECHOLNPGM("MS1|MS2|MS3 Pins");
2936
     #if HAS_X_MICROSTEPS
2936
     #if HAS_X_MICROSTEPS
2937
-      SERIAL_CHAR('0' + READ(X_MS1_PIN));
2938
-      SERIAL_CHAR('0' + READ(X_MS2_PIN));
2939
-      #if PIN_EXISTS(X_MS3)
2940
-        SERIAL_ECHOLN((int)READ(X_MS3_PIN));
2941
-      #endif
2937
+      SERIAL_ECHOPGM("X: ");
2938
+      SERIAL_CHAR('0' + READ(X_MS1_PIN), '0' + READ(X_MS2_PIN)
2939
+        #if PIN_EXISTS(X_MS3)
2940
+          , '0' + READ(X_MS3_PIN)
2941
+        #endif
2942
+      );
2942
     #endif
2943
     #endif
2943
     #if HAS_Y_MICROSTEPS
2944
     #if HAS_Y_MICROSTEPS
2944
       SERIAL_ECHOPGM("Y: ");
2945
       SERIAL_ECHOPGM("Y: ");
2945
-      SERIAL_CHAR('0' + READ(Y_MS1_PIN));
2946
-      SERIAL_CHAR('0' + READ(Y_MS2_PIN));
2947
-      #if PIN_EXISTS(Y_MS3)
2948
-        SERIAL_ECHOLN((int)READ(Y_MS3_PIN));
2949
-      #endif
2946
+      SERIAL_CHAR('0' + READ(Y_MS1_PIN), '0' + READ(Y_MS2_PIN)
2947
+        #if PIN_EXISTS(Y_MS3)
2948
+          , '0' + READ(Y_MS3_PIN)
2949
+        #endif
2950
+      );
2950
     #endif
2951
     #endif
2951
     #if HAS_Z_MICROSTEPS
2952
     #if HAS_Z_MICROSTEPS
2952
       SERIAL_ECHOPGM("Z: ");
2953
       SERIAL_ECHOPGM("Z: ");
2953
-      SERIAL_CHAR('0' + READ(Z_MS1_PIN));
2954
-      SERIAL_CHAR('0' + READ(Z_MS2_PIN));
2955
-      #if PIN_EXISTS(Z_MS3)
2956
-        SERIAL_ECHOLN((int)READ(Z_MS3_PIN));
2957
-      #endif
2954
+      SERIAL_CHAR('0' + READ(Z_MS1_PIN), '0' + READ(Z_MS2_PIN)
2955
+        #if PIN_EXISTS(Z_MS3)
2956
+          , '0' + READ(Z_MS3_PIN)
2957
+        #endif
2958
+      );
2958
     #endif
2959
     #endif
2959
     #if HAS_E0_MICROSTEPS
2960
     #if HAS_E0_MICROSTEPS
2960
       SERIAL_ECHOPGM("E0: ");
2961
       SERIAL_ECHOPGM("E0: ");
2961
-      SERIAL_CHAR('0' + READ(E0_MS1_PIN));
2962
-      SERIAL_CHAR('0' + READ(E0_MS2_PIN));
2963
-      #if PIN_EXISTS(E0_MS3)
2964
-        SERIAL_ECHOLN((int)READ(E0_MS3_PIN));
2965
-      #endif
2962
+      SERIAL_CHAR('0' + READ(E0_MS1_PIN), '0' + READ(E0_MS2_PIN)
2963
+        #if PIN_EXISTS(E0_MS3)
2964
+          , '0' + READ(E0_MS3_PIN)
2965
+        #endif
2966
+      );
2966
     #endif
2967
     #endif
2967
     #if HAS_E1_MICROSTEPS
2968
     #if HAS_E1_MICROSTEPS
2968
       SERIAL_ECHOPGM("E1: ");
2969
       SERIAL_ECHOPGM("E1: ");
2969
-      SERIAL_CHAR('0' + READ(E1_MS1_PIN));
2970
-      SERIAL_CHAR('0' + READ(E1_MS2_PIN));
2971
-      #if PIN_EXISTS(E1_MS3)
2972
-        SERIAL_ECHOLN((int)READ(E1_MS3_PIN));
2973
-      #endif
2970
+      SERIAL_CHAR('0' + READ(E1_MS1_PIN), '0' + READ(E1_MS2_PIN)
2971
+        #if PIN_EXISTS(E1_MS3)
2972
+          , '0' + READ(E1_MS3_PIN)
2973
+        #endif
2974
+      );
2974
     #endif
2975
     #endif
2975
     #if HAS_E2_MICROSTEPS
2976
     #if HAS_E2_MICROSTEPS
2976
       SERIAL_ECHOPGM("E2: ");
2977
       SERIAL_ECHOPGM("E2: ");
2977
-      SERIAL_CHAR('0' + READ(E2_MS1_PIN));
2978
-      SERIAL_CHAR('0' + READ(E2_MS2_PIN));
2979
-      #if PIN_EXISTS(E2_MS3)
2980
-        SERIAL_ECHOLN((int)READ(E2_MS3_PIN));
2981
-      #endif
2978
+      SERIAL_CHAR('0' + READ(E2_MS1_PIN), '0' + READ(E2_MS2_PIN)
2979
+        #if PIN_EXISTS(E2_MS3)
2980
+          , '0' + READ(E2_MS3_PIN)
2981
+        #endif
2982
+      );
2982
     #endif
2983
     #endif
2983
     #if HAS_E3_MICROSTEPS
2984
     #if HAS_E3_MICROSTEPS
2984
       SERIAL_ECHOPGM("E3: ");
2985
       SERIAL_ECHOPGM("E3: ");
2985
-      SERIAL_CHAR('0' + READ(E3_MS1_PIN));
2986
-      SERIAL_CHAR('0' + READ(E3_MS2_PIN));
2987
-      #if PIN_EXISTS(E3_MS3)
2988
-        SERIAL_ECHOLN((int)READ(E3_MS3_PIN));
2989
-      #endif
2986
+      SERIAL_CHAR('0' + READ(E3_MS1_PIN), '0' + READ(E3_MS2_PIN)
2987
+        #if PIN_EXISTS(E3_MS3)
2988
+          , '0' + READ(E3_MS3_PIN)
2989
+        #endif
2990
+      );
2990
     #endif
2991
     #endif
2991
     #if HAS_E4_MICROSTEPS
2992
     #if HAS_E4_MICROSTEPS
2992
       SERIAL_ECHOPGM("E4: ");
2993
       SERIAL_ECHOPGM("E4: ");
2993
-      SERIAL_CHAR('0' + READ(E4_MS1_PIN));
2994
-      SERIAL_CHAR('0' + READ(E4_MS2_PIN));
2995
-      #if PIN_EXISTS(E4_MS3)
2996
-        SERIAL_ECHOLN((int)READ(E4_MS3_PIN));
2997
-      #endif
2994
+      SERIAL_CHAR('0' + READ(E4_MS1_PIN), '0' + READ(E4_MS2_PIN)
2995
+        #if PIN_EXISTS(E4_MS3)
2996
+          , '0' + READ(E4_MS3_PIN)
2997
+        #endif
2998
+      );
2998
     #endif
2999
     #endif
2999
     #if HAS_E5_MICROSTEPS
3000
     #if HAS_E5_MICROSTEPS
3000
       SERIAL_ECHOPGM("E5: ");
3001
       SERIAL_ECHOPGM("E5: ");
3001
-      SERIAL_CHAR('0' + READ(E5_MS1_PIN));
3002
-      SERIAL_ECHOLN((int)READ(E5_MS2_PIN));
3003
-      #if PIN_EXISTS(E5_MS3)
3004
-        SERIAL_ECHOLN((int)READ(E5_MS3_PIN));
3005
-      #endif
3002
+      SERIAL_CHAR('0' + READ(E5_MS1_PIN), '0' + READ(E5_MS2_PIN)
3003
+        #if PIN_EXISTS(E5_MS3)
3004
+          , '0' + READ(E5_MS3_PIN)
3005
+        #endif
3006
+      );
3006
     #endif
3007
     #endif
3007
   }
3008
   }
3008
 
3009
 

Loading…
取消
儲存