Browse Source

Fix BAUD_RATE_GCODE, etc. (#17135)

Jason Smith 4 years ago
parent
commit
9c759e5f74
No account linked to committer's email address

+ 1
- 1
Marlin/src/core/macros.h View File

@@ -189,7 +189,7 @@
189 189
 #define ENABLED(V...)       DO(ENA,&&,V)
190 190
 #define DISABLED(V...)      DO(DIS,&&,V)
191 191
 
192
-#define TERN(O,A,B)         _TERN(_ENA_1(O),B,A)    // OPTION converted to to '0' or '1'
192
+#define TERN(O,A,B)         _TERN(_ENA_1(O),B,A)    // OPTION converted to '0' or '1'
193 193
 #define _TERN(E,V...)       __TERN(_CAT(T_,E),V)    // Prepend 'T_' to get 'T_0' or 'T_1'
194 194
 #define __TERN(T,V...)      ___TERN(_CAT(_NO,T),V)  // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
195 195
 #define ___TERN(P,V...)     THIRD(P,V)              // If first argument has a comma, A. Else B.

+ 2
- 2
Marlin/src/gcode/calibrate/G34_M422.cpp View File

@@ -411,10 +411,10 @@ void GcodeSuite::M422() {
411 411
 
412 412
   if (!parser.seen_any()) {
413 413
     LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
414
-      SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), i + '1', SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y);
414
+      SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), int(i + 1), SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y);
415 415
     #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
416 416
       LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
417
-        SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), i + '1', SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y);
417
+        SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), int(i + 1), SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y);
418 418
     #endif
419 419
     return;
420 420
   }

+ 1
- 1
Marlin/src/gcode/lcd/M0_M1.cpp View File

@@ -59,7 +59,7 @@ void GcodeSuite::M0_M1() {
59 59
   #if HAS_LEDS_OFF_FLAG
60 60
     const bool seenQ = parser.seen('Q');
61 61
     if (seenQ) printerEventLEDs.onPrintCompleted();      // Change LED color for Print Completed
62
-  #else
62
+  #elif HAS_LCD_MENU
63 63
     constexpr bool seenQ = false;
64 64
   #endif
65 65
 

+ 0
- 4
Marlin/src/inc/Conditionals_adv.h View File

@@ -100,10 +100,6 @@
100 100
   #define HAS_LEDS_OFF_FLAG 1
101 101
 #endif
102 102
 
103
-#if !NUM_SERIAL
104
-  #undef BAUD_RATE_GCODE
105
-#endif
106
-
107 103
 // Multiple Z steppers
108 104
 #ifndef NUM_Z_STEPPER_DRIVERS
109 105
   #define NUM_Z_STEPPER_DRIVERS 1

+ 4
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -2200,3 +2200,7 @@
2200 2200
     #define INIT_SDCARD_ON_BOOT
2201 2201
   #endif
2202 2202
 #endif
2203
+
2204
+#if !NUM_SERIAL
2205
+  #undef BAUD_RATE_GCODE
2206
+#endif

Loading…
Cancel
Save