From 19a237bbb0c40a8e9e1eead65e6ee1312c6dc1a4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Aug 2020 02:45:58 -0500 Subject: [PATCH] Fix up conditions, comments --- Marlin/src/inc/SanityCheck.h | 20 +++++++------------- Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 2 +- buildroot/share/vscode/avrdude.conf | 2 +- buildroot/share/vscode/avrdude_linux.conf | 2 +- buildroot/share/vscode/avrdude_macOS.conf | 2 +- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5aa614f116..01d07ea4da 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -39,26 +39,20 @@ #define TEST2 1 #define TEST3 0 #define TEST4 true -#if ENABLED(TEST0) +#if ENABLED(TEST0) || !ENABLED(TEST2) || ENABLED(TEST3) #error "ENABLED is borked!" #endif -#if DISABLED(TEST1) - #error "DISABLED is borked!" -#endif -#if !ENABLED(TEST2) - #error "ENABLED is borked!" +#if BOTH(TEST0, TEST1) + #error "BOTH is borked!" #endif -#if ENABLED(TEST3) - #error "ENABLED is borked!" -#endif -#if DISABLED(TEST4) +#if DISABLED(TEST1) || !DISABLED(TEST3) || DISABLED(TEST4) || DISABLED(TEST0, TEST1, TEST2, TEST4) || !DISABLED(TEST0, TEST3) #error "DISABLED is borked!" #endif #if !ANY(TEST1, TEST2, TEST3, TEST4) || ANY(TEST0, TEST3) #error "ANY is borked!" #endif -#if DISABLED(TEST0, TEST1, TEST2, TEST4) - #error "DISABLED is borked!" +#if NONE(TEST0, TEST1, TEST2, TEST4) || !NONE(TEST0, TEST3) + #error "NONE is borked!" #endif #undef TEST1 #undef TEST2 @@ -2202,7 +2196,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(IS_RRD_FG_SC)) \ + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \ + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ - + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ + + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \ + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \ diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index 9af4a3e05c..bdd53abbc0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -74,7 +74,7 @@ #undef E0_CS_PIN #undef E1_CS_PIN -#if ENABLED(ULTRA_LCD, REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(NEWPANEL, PANEL_ONE) +#if ENABLED(ULTRA_LCD) && NONE(REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(NEWPANEL, PANEL_ONE) #if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) #undef LCD_PINS_RS #define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 9558015584..a44baf26e4 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -174,7 +174,7 @@ #define LCD_PINS_D6 32 #define LCD_PINS_D7 30 -#elif ENABLED(BOARD_REV_1_5, ULTRA_LCD) +#elif BOTH(BOARD_REV_1_5, ULTRA_LCD) #define BEEPER_PIN 18 diff --git a/buildroot/share/vscode/avrdude.conf b/buildroot/share/vscode/avrdude.conf index 9f85aa0d26..991d255750 100644 --- a/buildroot/share/vscode/avrdude.conf +++ b/buildroot/share/vscode/avrdude.conf @@ -151,7 +151,7 @@ # # INSTRUCTION FORMATS # -# Instruction formats are specified as a comma seperated list of +# Instruction formats are specified as a comma separated list of # string values containing information (bit specifiers) about each # of the 32 bits of the instruction. Bit specifiers may be one of # the following formats: diff --git a/buildroot/share/vscode/avrdude_linux.conf b/buildroot/share/vscode/avrdude_linux.conf index 64d3b677d5..ff429a028c 100644 --- a/buildroot/share/vscode/avrdude_linux.conf +++ b/buildroot/share/vscode/avrdude_linux.conf @@ -151,7 +151,7 @@ # # INSTRUCTION FORMATS # -# Instruction formats are specified as a comma seperated list of +# Instruction formats are specified as a comma separated list of # string values containing information (bit specifiers) about each # of the 32 bits of the instruction. Bit specifiers may be one of # the following formats: diff --git a/buildroot/share/vscode/avrdude_macOS.conf b/buildroot/share/vscode/avrdude_macOS.conf index 814e87e35e..6147a2259a 100644 --- a/buildroot/share/vscode/avrdude_macOS.conf +++ b/buildroot/share/vscode/avrdude_macOS.conf @@ -151,7 +151,7 @@ # # INSTRUCTION FORMATS # -# Instruction formats are specified as a comma seperated list of +# Instruction formats are specified as a comma separated list of # string values containing information (bit specifiers) about each # of the 32 bits of the instruction. Bit specifiers may be one of # the following formats: