Fix BAUD_RATE_GCODE, etc. (#17135)

This commit is contained in:
Jason Smith 2020-03-12 17:26:09 -07:00 committed by GitHub
parent 4e96a014a8
commit 9c759e5f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View file

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

View file

@ -411,10 +411,10 @@ void GcodeSuite::M422() {
if (!parser.seen_any()) {
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
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);
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);
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS)
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);
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);
#endif
return;
}

View file

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

View file

@ -100,10 +100,6 @@
#define HAS_LEDS_OFF_FLAG 1
#endif
#if !NUM_SERIAL
#undef BAUD_RATE_GCODE
#endif
// Multiple Z steppers
#ifndef NUM_Z_STEPPER_DRIVERS
#define NUM_Z_STEPPER_DRIVERS 1

View file

@ -2200,3 +2200,7 @@
#define INIT_SDCARD_ON_BOOT
#endif
#endif
#if !NUM_SERIAL
#undef BAUD_RATE_GCODE
#endif