From 49cf92dc36424cf828436f32e72263eca39a1cc3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 Mar 2019 23:43:06 -0500 Subject: [PATCH] Extended condition macros (#13419) Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add: - Alias `ANY(...)` for `!DISABLED(...)` - Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...` - Alias `EITHER(A,B)` for `ANY(...)` - Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)` - `NONE(...)` for `DISABLED(...)` --- Marlin/Configuration.h | 14 ++-- Marlin/Configuration_adv.h | 6 +- Marlin/src/HAL/HAL_AVR/HAL.h | 2 +- Marlin/src/HAL/HAL_AVR/fastio_AVR.h | 2 +- .../HAL/HAL_AVR/persistent_store_eeprom.cpp | 2 +- Marlin/src/HAL/HAL_ESP32/HAL.h | 2 +- Marlin/src/HAL/HAL_LINUX/spi_pins.h | 2 +- Marlin/src/HAL/HAL_LPC1768/main.cpp | 2 +- .../HAL/HAL_STM32/persistent_store_impl.cpp | 6 +- .../HAL_STM32F1/persistent_store_flash.cpp | 2 +- .../src/HAL/shared/persistent_store_api.cpp | 2 +- Marlin/src/Marlin.cpp | 10 +-- Marlin/src/core/drivers.h | 2 +- Marlin/src/core/macros.h | 67 +++++++++++---- Marlin/src/core/minmax.h | 4 +- Marlin/src/core/utility.cpp | 4 +- Marlin/src/core/utility.h | 6 +- Marlin/src/feature/bedlevel/bedlevel.cpp | 6 +- Marlin/src/feature/bedlevel/bedlevel.h | 4 +- .../src/feature/digipot/digipot_mcp4018.cpp | 2 +- Marlin/src/feature/leds/leds.cpp | 8 +- Marlin/src/feature/leds/leds.h | 4 +- Marlin/src/feature/power.cpp | 2 +- Marlin/src/feature/solenoid.cpp | 4 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 10 +-- Marlin/src/gcode/calibrate/G28.cpp | 2 +- Marlin/src/gcode/calibrate/G425.cpp | 4 +- Marlin/src/gcode/control/M17_M18_M84.cpp | 2 +- Marlin/src/gcode/control/M380_M381.cpp | 2 +- .../src/gcode/feature/digipot/M907-M910.cpp | 4 +- Marlin/src/gcode/gcode.cpp | 10 +-- Marlin/src/gcode/gcode.h | 8 +- Marlin/src/gcode/host/M115.cpp | 2 +- Marlin/src/gcode/lcd/M73.cpp | 4 +- Marlin/src/gcode/motion/G0_G1.cpp | 4 +- Marlin/src/gcode/queue.h | 2 +- Marlin/src/gcode/sdcard/M34.cpp | 2 +- Marlin/src/gcode/temperature/M104_M109.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 60 ++++++-------- Marlin/src/inc/Conditionals_post.h | 68 +++++++-------- Marlin/src/inc/SanityCheck.h | 82 +++++++++---------- Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp | 6 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 2 +- .../lcd/dogm/status_screen_lite_ST7920.cpp | 2 +- Marlin/src/lcd/dogm/ultralcd_DOGM.cpp | 4 +- Marlin/src/lcd/extensible_ui/ui_api.cpp | 4 +- Marlin/src/lcd/menu/menu.cpp | 6 +- Marlin/src/lcd/menu/menu.h | 6 +- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 4 +- Marlin/src/lcd/menu/menu_configuration.cpp | 2 +- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- Marlin/src/lcd/menu/menu_led.cpp | 2 +- Marlin/src/lcd/menu/menu_main.cpp | 4 +- Marlin/src/lcd/menu/menu_motion.cpp | 4 +- Marlin/src/lcd/menu/menu_tune.cpp | 2 +- Marlin/src/lcd/ultralcd.cpp | 16 ++-- Marlin/src/lcd/ultralcd.h | 23 ++---- Marlin/src/libs/hex_print_routines.cpp | 2 +- Marlin/src/libs/least_squares_fit.cpp | 2 +- Marlin/src/libs/nozzle.cpp | 2 +- Marlin/src/module/configuration_store.cpp | 22 ++--- Marlin/src/module/endstops.cpp | 4 +- Marlin/src/module/motion.cpp | 6 +- Marlin/src/module/planner.cpp | 14 ++-- Marlin/src/module/planner.h | 6 +- Marlin/src/module/printcounter.h | 4 +- Marlin/src/module/probe.cpp | 6 +- Marlin/src/module/stepper.cpp | 18 ++-- Marlin/src/module/stepper.h | 4 +- Marlin/src/module/stepper_indirection.h | 2 +- Marlin/src/module/temperature.cpp | 22 ++--- Marlin/src/module/temperature.h | 6 +- Marlin/src/module/tool_change.cpp | 4 +- Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/pins_3DRAG.h | 4 +- Marlin/src/pins/pins_ANET_10.h | 2 +- Marlin/src/pins/pins_AZTEEG_X3.h | 4 +- Marlin/src/pins/pins_AZTEEG_X3_PRO.h | 6 +- Marlin/src/pins/pins_AZTEEG_X5_GT.h | 2 +- Marlin/src/pins/pins_AZTEEG_X5_MINI_WIFI.h | 2 +- Marlin/src/pins/pins_BEAST.h | 4 +- Marlin/src/pins/pins_CHITU3D.h | 4 +- Marlin/src/pins/pins_FELIX2.h | 2 +- Marlin/src/pins/pins_FORMBOT_RAPTOR2.h | 4 +- Marlin/src/pins/pins_MEGATRONICS.h | 2 +- Marlin/src/pins/pins_MIGHTYBOARD_REVE.h | 4 +- Marlin/src/pins/pins_MKS_GEN_13.h | 2 +- Marlin/src/pins/pins_MKS_SBASE.h | 2 +- Marlin/src/pins/pins_PRINTRBOARD.h | 4 +- Marlin/src/pins/pins_PRINTRBOARD_REVF.h | 2 +- Marlin/src/pins/pins_RAMBO.h | 2 +- Marlin/src/pins/pins_RAMPS.h | 22 +++-- Marlin/src/pins/pins_RAMPS_DUO.h | 2 +- Marlin/src/pins/pins_RAMPS_FD_V1.h | 2 +- Marlin/src/pins/pins_RAMPS_LINUX.h | 12 ++- Marlin/src/pins/pins_RAMPS_PLUS.h | 2 +- Marlin/src/pins/pins_RAMPS_RE_ARM.h | 12 +-- Marlin/src/pins/pins_RUMBA.h | 2 +- Marlin/src/pins/pins_RURAMPS4D_11.h | 2 +- Marlin/src/pins/pins_RURAMPS4D_13.h | 2 +- Marlin/src/pins/pins_SANGUINOLOLU_11.h | 4 +- Marlin/src/pins/pins_SAV_MKI.h | 2 +- Marlin/src/pins/pins_SCOOVO_X9H.h | 2 +- Marlin/src/pins/pins_SMOOTHIEBOARD.h | 2 +- Marlin/src/pins/pins_STM32F1R.h | 4 +- Marlin/src/pins/pins_STM3R_MINI.h | 4 +- Marlin/src/pins/pins_TEENSYLU.h | 2 +- Marlin/src/pins/pins_TRIGORILLA_14.h | 4 +- Marlin/src/pins/pins_ULTIMAKER_OLD.h | 5 +- Marlin/src/pins/sensitive_pins.h | 2 +- Marlin/src/sd/cardreader.cpp | 8 +- Marlin/src/sd/cardreader.h | 4 +- .../sd/usb_flashdrive/Sd2Card_FlashDrive.cpp | 4 +- config/default/Configuration.h | 14 ++-- config/default/Configuration_adv.h | 6 +- .../examples/3DFabXYZ/Migbot/Configuration.h | 14 ++-- .../3DFabXYZ/Migbot/Configuration_adv.h | 6 +- .../AlephObjects/TAZ4/Configuration.h | 14 ++-- .../AlephObjects/TAZ4/Configuration_adv.h | 6 +- .../AliExpress/CL-260/Configuration.h | 14 ++-- .../AliExpress/UM2pExt/Configuration.h | 14 ++-- .../AliExpress/UM2pExt/Configuration_adv.h | 6 +- config/examples/Anet/A2/Configuration.h | 14 ++-- config/examples/Anet/A2/Configuration_adv.h | 6 +- config/examples/Anet/A2plus/Configuration.h | 14 ++-- .../examples/Anet/A2plus/Configuration_adv.h | 6 +- config/examples/Anet/A6/Configuration.h | 14 ++-- config/examples/Anet/A6/Configuration_adv.h | 6 +- config/examples/Anet/A8/Configuration.h | 14 ++-- config/examples/Anet/A8/Configuration_adv.h | 6 +- config/examples/AnyCubic/i3/Configuration.h | 14 ++-- .../examples/AnyCubic/i3/Configuration_adv.h | 6 +- config/examples/ArmEd/Configuration.h | 14 ++-- config/examples/ArmEd/Configuration_adv.h | 6 +- config/examples/Azteeg/X5GT/Configuration.h | 14 ++-- .../BIBO/TouchX/cyclops/Configuration.h | 14 ++-- .../BIBO/TouchX/cyclops/Configuration_adv.h | 6 +- .../BIBO/TouchX/default/Configuration.h | 14 ++-- .../BIBO/TouchX/default/Configuration_adv.h | 6 +- config/examples/BQ/Hephestos/Configuration.h | 14 ++-- .../examples/BQ/Hephestos/Configuration_adv.h | 6 +- .../examples/BQ/Hephestos_2/Configuration.h | 14 ++-- .../BQ/Hephestos_2/Configuration_adv.h | 6 +- config/examples/BQ/WITBOX/Configuration.h | 14 ++-- config/examples/BQ/WITBOX/Configuration_adv.h | 6 +- config/examples/Cartesio/Configuration.h | 14 ++-- config/examples/Cartesio/Configuration_adv.h | 6 +- .../examples/Creality/CR-10/Configuration.h | 14 ++-- .../Creality/CR-10/Configuration_adv.h | 6 +- .../examples/Creality/CR-10S/Configuration.h | 14 ++-- .../Creality/CR-10S/Configuration_adv.h | 6 +- .../Creality/CR-10_5S/Configuration.h | 14 ++-- .../Creality/CR-10_5S/Configuration_adv.h | 6 +- .../Creality/CR-10mini/Configuration.h | 14 ++-- .../Creality/CR-10mini/Configuration_adv.h | 6 +- config/examples/Creality/CR-8/Configuration.h | 14 ++-- .../Creality/CR-8/Configuration_adv.h | 6 +- .../examples/Creality/Ender-2/Configuration.h | 14 ++-- .../Creality/Ender-2/Configuration_adv.h | 6 +- .../examples/Creality/Ender-3/Configuration.h | 14 ++-- .../Creality/Ender-3/Configuration_adv.h | 6 +- .../examples/Creality/Ender-4/Configuration.h | 14 ++-- .../Creality/Ender-4/Configuration_adv.h | 6 +- config/examples/Einstart-S/Configuration.h | 14 ++-- .../examples/Einstart-S/Configuration_adv.h | 6 +- config/examples/Felix/Configuration.h | 14 ++-- config/examples/Felix/Configuration_adv.h | 6 +- config/examples/Felix/DUAL/Configuration.h | 14 ++-- .../FlashForge/CreatorPro/Configuration.h | 14 ++-- .../FlashForge/CreatorPro/Configuration_adv.h | 6 +- .../FolgerTech/i3-2020/Configuration.h | 14 ++-- .../FolgerTech/i3-2020/Configuration_adv.h | 6 +- .../examples/Formbot/Raptor/Configuration.h | 14 ++-- .../Formbot/Raptor/Configuration_adv.h | 6 +- .../examples/Formbot/T_Rex_2+/Configuration.h | 14 ++-- .../Formbot/T_Rex_2+/Configuration_adv.h | 6 +- .../examples/Formbot/T_Rex_3/Configuration.h | 14 ++-- .../Formbot/T_Rex_3/Configuration_adv.h | 6 +- config/examples/Geeetech/A10M/Configuration.h | 14 ++-- .../Geeetech/A10M/Configuration_adv.h | 6 +- config/examples/Geeetech/A20M/Configuration.h | 14 ++-- .../Geeetech/A20M/Configuration_adv.h | 6 +- .../examples/Geeetech/GT2560/Configuration.h | 16 ++-- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 14 ++-- .../Geeetech/MeCreator2/Configuration.h | 14 ++-- .../Geeetech/MeCreator2/Configuration_adv.h | 6 +- .../Prusa i3 Pro B/bltouch/Configuration.h | 14 ++-- .../Prusa i3 Pro B/noprobe/Configuration.h | 14 ++-- .../Geeetech/Prusa i3 Pro C/Configuration.h | 14 ++-- .../Prusa i3 Pro C/Configuration_adv.h | 6 +- .../Geeetech/Prusa i3 Pro W/Configuration.h | 14 ++-- .../Prusa i3 Pro W/Configuration_adv.h | 6 +- .../examples/Infitary/i3-M508/Configuration.h | 14 ++-- .../Infitary/i3-M508/Configuration_adv.h | 6 +- config/examples/JGAurora/A5/Configuration.h | 14 ++-- .../examples/JGAurora/A5/Configuration_adv.h | 6 +- config/examples/MakerParts/Configuration.h | 14 ++-- .../examples/MakerParts/Configuration_adv.h | 6 +- config/examples/Malyan/M150/Configuration.h | 14 ++-- .../examples/Malyan/M150/Configuration_adv.h | 6 +- config/examples/Malyan/M200/Configuration.h | 14 ++-- .../examples/Malyan/M200/Configuration_adv.h | 6 +- .../Micromake/C1/basic/Configuration.h | 14 ++-- .../Micromake/C1/enhanced/Configuration.h | 14 ++-- .../Micromake/C1/enhanced/Configuration_adv.h | 6 +- config/examples/Mks/Robin/Configuration.h | 14 ++-- config/examples/Mks/Robin/Configuration_adv.h | 6 +- config/examples/Mks/Sbase/Configuration.h | 14 ++-- config/examples/Mks/Sbase/Configuration_adv.h | 6 +- .../Printrbot/PrintrboardG2/Configuration.h | 14 ++-- .../examples/RapideLite/RL200/Configuration.h | 14 ++-- .../RapideLite/RL200/Configuration_adv.h | 6 +- .../examples/RepRapPro/Huxley/Configuration.h | 14 ++-- .../RepRapWorld/Megatronics/Configuration.h | 14 ++-- config/examples/RigidBot/Configuration.h | 14 ++-- config/examples/RigidBot/Configuration_adv.h | 6 +- config/examples/SCARA/Configuration.h | 16 ++-- config/examples/SCARA/Configuration_adv.h | 6 +- config/examples/STM32F10/Configuration.h | 14 ++-- config/examples/STM32F4/Configuration.h | 14 ++-- config/examples/Sanguinololu/Configuration.h | 14 ++-- .../examples/Sanguinololu/Configuration_adv.h | 6 +- config/examples/TheBorg/Configuration.h | 14 ++-- config/examples/TheBorg/Configuration_adv.h | 6 +- config/examples/TinyBoy2/Configuration.h | 14 ++-- config/examples/TinyBoy2/Configuration_adv.h | 6 +- config/examples/Tronxy/X1/Configuration.h | 14 ++-- config/examples/Tronxy/X3A/Configuration.h | 14 ++-- .../examples/Tronxy/X3A/Configuration_adv.h | 6 +- config/examples/Tronxy/X5S-2E/Configuration.h | 14 ++-- .../Tronxy/X5S-2E/Configuration_adv.h | 6 +- config/examples/Tronxy/X5S/Configuration.h | 14 ++-- config/examples/Tronxy/XY100/Configuration.h | 14 ++-- .../UltiMachine/Archim1/Configuration.h | 14 ++-- .../UltiMachine/Archim1/Configuration_adv.h | 6 +- .../UltiMachine/Archim2/Configuration.h | 14 ++-- .../UltiMachine/Archim2/Configuration_adv.h | 6 +- config/examples/VORONDesign/Configuration.h | 14 ++-- .../examples/VORONDesign/Configuration_adv.h | 6 +- .../examples/Velleman/K8200/Configuration.h | 14 ++-- .../Velleman/K8200/Configuration_adv.h | 6 +- .../examples/Velleman/K8400/Configuration.h | 14 ++-- .../Velleman/K8400/Configuration_adv.h | 6 +- .../Velleman/K8400/Dual-head/Configuration.h | 14 ++-- .../examples/WASP/PowerWASP/Configuration.h | 14 ++-- .../WASP/PowerWASP/Configuration_adv.h | 6 +- .../Wanhao/Duplicator 6/Configuration.h | 14 ++-- .../Wanhao/Duplicator 6/Configuration_adv.h | 6 +- .../examples/adafruit/ST7565/Configuration.h | 14 ++-- .../delta/Anycubic/Kossel/Configuration.h | 16 ++-- .../delta/Anycubic/Kossel/Configuration_adv.h | 6 +- .../FLSUN/auto_calibrate/Configuration.h | 16 ++-- .../FLSUN/auto_calibrate/Configuration_adv.h | 6 +- .../delta/FLSUN/kossel/Configuration.h | 16 ++-- .../delta/FLSUN/kossel/Configuration_adv.h | 6 +- .../delta/FLSUN/kossel_mini/Configuration.h | 16 ++-- .../FLSUN/kossel_mini/Configuration_adv.h | 6 +- .../Geeetech/Rostock 301/Configuration.h | 16 ++-- .../Geeetech/Rostock 301/Configuration_adv.h | 6 +- .../delta/Hatchbox_Alpha/Configuration.h | 16 ++-- .../examples/delta/MKS/SBASE/Configuration.h | 16 ++-- .../delta/MKS/SBASE/Configuration_adv.h | 6 +- .../delta/Tevo Little Monster/Configuration.h | 16 ++-- .../Tevo Little Monster/Configuration_adv.h | 6 +- config/examples/delta/generic/Configuration.h | 16 ++-- .../delta/generic/Configuration_adv.h | 6 +- .../delta/kossel_mini/Configuration.h | 16 ++-- .../delta/kossel_mini/Configuration_adv.h | 6 +- .../examples/delta/kossel_pro/Configuration.h | 16 ++-- .../examples/delta/kossel_xl/Configuration.h | 16 ++-- .../delta/kossel_xl/Configuration_adv.h | 6 +- .../examples/gCreate/gMax1.5+/Configuration.h | 14 ++-- .../gCreate/gMax1.5+/Configuration_adv.h | 6 +- config/examples/makibox/Configuration.h | 14 ++-- config/examples/makibox/Configuration_adv.h | 6 +- config/examples/stm32f103ret6/Configuration.h | 14 ++-- config/examples/tvrrug/Round2/Configuration.h | 14 ++-- .../tvrrug/Round2/Configuration_adv.h | 6 +- config/examples/wt150/Configuration.h | 14 ++-- config/examples/wt150/Configuration_adv.h | 6 +- 281 files changed, 1300 insertions(+), 1289 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index bd6793935..950b85cb2 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 442cd948f..497f283fd 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/Marlin/src/HAL/HAL_AVR/HAL.h b/Marlin/src/HAL/HAL_AVR/HAL.h index fae5235be..378f3b961 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL.h +++ b/Marlin/src/HAL/HAL_AVR/HAL.h @@ -182,7 +182,7 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t freque #define TIMER_OCR_0 OCR0A #define TIMER_COUNTER_0 TCNT0 -#define _CAT(a, ...) a ## __VA_ARGS__ +#define _CAT(a,V...) a##V #define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare) #define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer) #define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer) diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h index 4ebf7b7da..864edf8af 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h @@ -286,7 +286,7 @@ enum ClockSource2 : char { #define PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN) #endif -#if PIN_EXISTS(FAN) || PIN_EXISTS(FAN1) || PIN_EXISTS(FAN2) +#if ANY_PIN(FAN, FAN1, FAN2) #if PIN_EXISTS(FAN2) #define PWM_CHK_FAN_A(P) (P == FAN_PIN || P == FAN1_PIN || P == FAN2_PIN) #elif PIN_EXISTS(FAN1) diff --git a/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp index 25feab312..4c2f9ea4f 100644 --- a/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp +++ b/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) +#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) #include "../shared/persistent_store_api.h" diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.h b/Marlin/src/HAL/HAL_ESP32/HAL.h index 8bbfdc956..821844730 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL.h +++ b/Marlin/src/HAL/HAL_ESP32/HAL.h @@ -36,7 +36,7 @@ #include #undef DISABLED -#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b)) +#define DISABLED(V...) DO(DIS,&&,V) #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/HAL_LINUX/spi_pins.h b/Marlin/src/HAL/HAL_LINUX/spi_pins.h index b24968b2e..fe510ddcf 100644 --- a/Marlin/src/HAL/HAL_LINUX/spi_pins.h +++ b/Marlin/src/HAL/HAL_LINUX/spi_pins.h @@ -23,7 +23,7 @@ #include "src/core/macros.h" -#if ENABLED(SDSUPPORT) && ENABLED(DOGLCD) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN) +#if BOTH(SDSUPPORT, DOGLCD) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN) #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode requred for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/HAL_LPC1768/main.cpp b/Marlin/src/HAL/HAL_LPC1768/main.cpp index c56b029d1..609c0c7e6 100644 --- a/Marlin/src/HAL/HAL_LPC1768/main.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/main.cpp @@ -98,7 +98,7 @@ void HAL_init() { // HAL idle task void HAL_idletask(void) { - #if ENABLED(SDSUPPORT) && ENABLED(SHARED_SD_CARD) + #if BOTH(SDSUPPORT, SHARED_SD_CARD) // If Marlin is using the SD card we need to lock it to prevent access from // a PC via USB. // Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but diff --git a/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp index 34df9bf59..dc6f02a17 100644 --- a/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp +++ b/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp @@ -55,7 +55,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui uint8_t v = *value; // Save to either external EEPROM, program flash or Backup SRAM - #if ENABLED(SPI_EEPROM) || ENABLED(I2C_EEPROM) + #if EITHER(SPI_EEPROM, I2C_EEPROM) // EEPROM has only ~100,000 write cycles, // so only write bytes that have changed! uint8_t * const p = (uint8_t * const)pos; @@ -87,7 +87,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t do { // Read from either external EEPROM, program flash or Backup SRAM const uint8_t c = ( - #if ENABLED(SPI_EEPROM) || ENABLED(I2C_EEPROM) + #if EITHER(SPI_EEPROM, I2C_EEPROM) eeprom_read_byte((uint8_t*)pos) #elif DISABLED(EEPROM_EMULATED_WITH_SRAM) eeprom_buffered_read_byte(pos) @@ -105,7 +105,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t } size_t PersistentStore::capacity() { - #if ENABLED(SPI_EEPROM) || ENABLED(I2C_EEPROM) + #if EITHER(SPI_EEPROM, I2C_EEPROM) return E2END + 1; #elif DISABLED(EEPROM_EMULATED_WITH_SRAM) return E2END + 1; diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp index 133402bb8..43c3fbca0 100644 --- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp @@ -32,7 +32,7 @@ #include "../../inc/MarlinConfig.h" // This is for EEPROM emulation in flash -#if ENABLED(EEPROM_SETTINGS) && ENABLED(FLASH_EEPROM_EMULATION) +#if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION) #include "../shared/persistent_store_api.h" diff --git a/Marlin/src/HAL/shared/persistent_store_api.cpp b/Marlin/src/HAL/shared/persistent_store_api.cpp index 5d7a6b7b5..e7bd107cb 100644 --- a/Marlin/src/HAL/shared/persistent_store_api.cpp +++ b/Marlin/src/HAL/shared/persistent_store_api.cpp @@ -22,7 +22,7 @@ */ #include "../../inc/MarlinConfigPre.h" -#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) +#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) #include "persistent_store_api.h" PersistentStore persistentStore; diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 5e02abb9e..5166df1f5 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -128,7 +128,7 @@ #include "feature/bedlevel/bedlevel.h" #endif -#if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT) +#if BOTH(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_NO_STEPPER_TIMEOUT) #include "feature/pause.h" #endif @@ -152,7 +152,7 @@ #include "feature/fanmux.h" #endif -#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if DO_SWITCH_EXTRUDER || ANY(SWITCHING_NOZZLE, PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #include "module/tool_change.h" #endif @@ -328,7 +328,7 @@ void disable_all_steppers() { ExtUI::onFilamentRunout(ExtUI::getActiveTool()); #endif - #if ENABLED(HOST_PROMPT_SUPPORT) || ENABLED(HOST_ACTION_COMMANDS) + #if EITHER(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS) const char tool = '0' #if NUM_RUNOUT_SENSORS > 1 + active_extruder @@ -443,7 +443,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) { } // Prevent steppers timing-out in the middle of M600 - #if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT) + #if BOTH(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_NO_STEPPER_TIMEOUT) #define MOVE_AWAY_TEST !did_pause_print #else #define MOVE_AWAY_TEST true @@ -1000,7 +1000,7 @@ void setup() { dac_init(); #endif - #if (ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) && HAS_SOLENOID_1 + #if EITHER(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1 OUT_WRITE(SOL1_PIN, LOW); // OFF #endif diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index 25fe2245f..a405bd314 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -52,7 +52,7 @@ #define AXIS_DRIVER_TYPE_X(T) _AXIS_DRIVER_TYPE(X,T) #define AXIS_DRIVER_TYPE_Y(T) _AXIS_DRIVER_TYPE(Y,T) #define AXIS_DRIVER_TYPE_Z(T) _AXIS_DRIVER_TYPE(Z,T) -#define AXIS_DRIVER_TYPE_X2(T) ((ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && _AXIS_DRIVER_TYPE(X2,T)) +#define AXIS_DRIVER_TYPE_X2(T) (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T)) #define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T)) #define AXIS_DRIVER_TYPE_Z2(T) (Z_MULTI_STEPPER_DRIVERS && _AXIS_DRIVER_TYPE(Z2,T)) #define AXIS_DRIVER_TYPE_Z3(T) (ENABLED(Z_TRIPLE_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Z3,T)) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 961589dd3..3805c216f 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -133,8 +133,25 @@ #endif +// Macros to chain up to 12 conditions +#define _DO_1(W,C,A) (_##W##_1(A)) +#define _DO_2(W,C,A,B) (_##W##_1(A) C _##W##_1(B)) +#define _DO_3(W,C,A,V...) (_##W##_1(A) C _DO_2(W,C,V)) +#define _DO_4(W,C,A,V...) (_##W##_1(A) C _DO_3(W,C,V)) +#define _DO_5(W,C,A,V...) (_##W##_1(A) C _DO_4(W,C,V)) +#define _DO_6(W,C,A,V...) (_##W##_1(A) C _DO_5(W,C,V)) +#define _DO_7(W,C,A,V...) (_##W##_1(A) C _DO_6(W,C,V)) +#define _DO_8(W,C,A,V...) (_##W##_1(A) C _DO_7(W,C,V)) +#define _DO_9(W,C,A,V...) (_##W##_1(A) C _DO_8(W,C,V)) +#define _DO_10(W,C,A,V...) (_##W##_1(A) C _DO_9(W,C,V)) +#define _DO_11(W,C,A,V...) (_##W##_1(A) C _DO_10(W,C,V)) +#define _DO_12(W,C,A,V...) (_##W##_1(A) C _DO_11(W,C,V)) +#define __DO_N(W,C,N,V...) _DO_##N(W,C,V) +#define _DO_N(W,C,N,V...) __DO_N(W,C,N,V) +#define DO(W,C,V...) _DO_N(W,C,NUM_ARGS(V),V) + // Macros to support option testing -#define _CAT(a, ...) a ## __VA_ARGS__ +#define _CAT(a,V...) a##V #define SWITCH_ENABLED_false 0 #define SWITCH_ENABLED_true 1 #define SWITCH_ENABLED_0 0 @@ -142,16 +159,33 @@ #define SWITCH_ENABLED_0x0 0 #define SWITCH_ENABLED_0x1 1 #define SWITCH_ENABLED_ 1 -#define ENABLED(b) _CAT(SWITCH_ENABLED_, b) -#define DISABLED(b) !ENABLED(b) - -#define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H)) -#define NUMERIC(a) WITHIN(a, '0', '9') -#define DECIMAL(a) (NUMERIC(a) || a == '.') -#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-' || (a) == '+') -#define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+') -#define COUNT(a) (sizeof(a)/sizeof(*a)) -#define ZERO(a) memset(a,0,sizeof(a)) +#define _ENA_1(O) _CAT(SWITCH_ENABLED_, O) +#define _DIS_1(O) !_ENA_1(O) +#define ENABLED(V...) DO(ENA,&&,V) +#define DISABLED(V...) DO(DIS,&&,V) + +#define ANY(V...) !DISABLED(V) +#define NONE(V...) DISABLED(V) +#define ALL(V...) ENABLED(V) +#define BOTH(V1,V2) ALL(V1,V2) +#define EITHER(V1,V2) ANY(V1,V2) + +// Macros to support pins/buttons exist testing +#define _PINEX_1(PN) (defined(PN##_PIN) && PN##_PIN >= 0) +#define PIN_EXISTS(V...) DO(PINEX,&&,V) +#define ANY_PIN(V...) DO(PINEX,||,V) + +#define _BTNEX_1(BN) (defined(BTN_##BN) && BTN_##BN >= 0) +#define BUTTON_EXISTS(V...) DO(BTNEX,&&,V) +#define ANY_BUTTON(V...) DO(BTNEX,||,V) + +#define WITHIN(N,L,H) ((N) >= (L) && (N) <= (H)) +#define NUMERIC(a) WITHIN(a, '0', '9') +#define DECIMAL(a) (NUMERIC(a) || a == '.') +#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-' || (a) == '+') +#define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+') +#define COUNT(a) (sizeof(a)/sizeof(*a)) +#define ZERO(a) memset(a,0,sizeof(a)) #define COPY(a,b) do{ \ static_assert(sizeof(a[0]) == sizeof(b[0]), "COPY: '" STRINGIFY(a) "' and '" STRINGIFY(b) "' types (sizes) don't match!"); \ memcpy(&a[0],&b[0],MIN(sizeof(a),sizeof(b))); \ @@ -165,8 +199,8 @@ #define ARRAY_2(v1, v2, ...) { v1, v2 } #define ARRAY_1(v1, ...) { v1 } -#define _ARRAY_N(N, ...) ARRAY_ ##N(__VA_ARGS__) -#define ARRAY_N(N, ...) _ARRAY_N(N, __VA_ARGS__) +#define _ARRAY_N(N,V...) ARRAY_##N(V) +#define ARRAY_N(N,V...) _ARRAY_N(N,V) // Macros for adding #define INC_0 1 @@ -178,7 +212,7 @@ #define INC_6 7 #define INC_7 8 #define INC_8 9 -#define INCREMENT_(n) INC_ ##n +#define INCREMENT_(n) INC_##n #define INCREMENT(n) INCREMENT_(n) // Macros for subtracting @@ -191,12 +225,9 @@ #define DEC_7 6 #define DEC_8 7 #define DEC_9 8 -#define DECREMENT_(n) DEC_ ##n +#define DECREMENT_(n) DEC_##n #define DECREMENT(n) DECREMENT_(n) -#define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0) -#define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0) - #define MMM_TO_MMS(MM_M) ((MM_M)/60.0f) #define MMS_TO_MMM(MM_S) ((MM_S)*60.0f) diff --git a/Marlin/src/core/minmax.h b/Marlin/src/core/minmax.h index 37eccebcb..0f29443ad 100644 --- a/Marlin/src/core/minmax.h +++ b/Marlin/src/core/minmax.h @@ -23,9 +23,9 @@ #undef MIN #undef MAX -// Pass NUM_ARGS(__VA_ARGS__) to use the number of arguments +// Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments #define _NUM_ARGS(_0,_24_,_23,_22,_21,_20,_19,_18,_17,_16,_15,_14,_13,_12,_11,_10,_9,_8,_7,_6,_5,_4,_3,_2,_1,N,...) N -#define NUM_ARGS(...) _NUM_ARGS(0, __VA_ARGS__ ,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) +#define NUM_ARGS(V...) _NUM_ARGS(0,V,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) #ifdef __cplusplus diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index f7f32df00..33aa8d45e 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -35,7 +35,7 @@ void safe_delay(millis_t ms) { thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made } -#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) +#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) void crc16(uint16_t *crc, const void * const data, uint16_t cnt) { uint8_t *ptr = (uint8_t *)data; @@ -48,7 +48,7 @@ void safe_delay(millis_t ms) { #endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE -#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(EXTENSIBLE_UI) +#if ANY(ULTRA_LCD, DEBUG_LEVELING_FEATURE, EXTENSIBLE_UI) char conv[8] = { 0 }; diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h index 5e11a5f9f..402ed5cd6 100644 --- a/Marlin/src/core/utility.h +++ b/Marlin/src/core/utility.h @@ -37,11 +37,11 @@ inline void serial_delay(const millis_t ms) { #endif } -#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) +#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) void crc16(uint16_t *crc, const void * const data, uint16_t cnt); #endif -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION) +#if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) /** * These support functions allow the use of large bit arrays of flags that take very * little RAM. Currently they are limited to being 16x16 in size. Changing the declaration @@ -53,7 +53,7 @@ inline void serial_delay(const millis_t ms) { FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); } #endif -#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(EXTENSIBLE_UI) +#if ANY(ULTRA_LCD, DEBUG_LEVELING_FEATURE, EXTENSIBLE_UI) // Convert uint8_t to string with 123 format char* ui8tostr3(const uint8_t x); diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index e31f85d4c..e7f2fcbdc 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -27,7 +27,7 @@ #include "bedlevel.h" #include "../../module/planner.h" -#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) +#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) #include "../../module/motion.h" #endif @@ -146,7 +146,7 @@ void reset_bed_level() { #endif } -#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING) +#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) /** * Enable to produce output in JSON format suitable @@ -215,7 +215,7 @@ void reset_bed_level() { #endif // AUTO_BED_LEVELING_BILINEAR || MESH_BED_LEVELING -#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) +#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) void _manual_goto_xy(const float &rx, const float &ry) { diff --git a/Marlin/src/feature/bedlevel/bedlevel.h b/Marlin/src/feature/bedlevel/bedlevel.h index 9801bc913..94437a8b2 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.h +++ b/Marlin/src/feature/bedlevel/bedlevel.h @@ -48,7 +48,7 @@ void reset_bed_level(); void set_z_fade_height(const float zfh, const bool do_report=true); #endif -#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING) +#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) #include @@ -61,7 +61,7 @@ void reset_bed_level(); #endif -#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) +#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) void _manual_goto_xy(const float &x, const float &y); #endif diff --git a/Marlin/src/feature/digipot/digipot_mcp4018.cpp b/Marlin/src/feature/digipot/digipot_mcp4018.cpp index b601fbc3d..917a7df99 100644 --- a/Marlin/src/feature/digipot/digipot_mcp4018.cpp +++ b/Marlin/src/feature/digipot/digipot_mcp4018.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018) +#if BOTH(DIGIPOT_I2C, DIGIPOT_MCP4018) #include "../../core/enum.h" #include "Stream.h" diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp index c8570b345..d490b86e6 100644 --- a/Marlin/src/feature/leds/leds.cpp +++ b/Marlin/src/feature/leds/leds.cpp @@ -52,7 +52,7 @@ ); #endif -#if ENABLED(LED_CONTROL_MENU) || ENABLED(PRINTER_EVENT_LEDS) +#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) LEDColor LEDLights::color; bool LEDLights::lights_on; #endif @@ -60,7 +60,7 @@ LEDLights leds; void LEDLights::setup() { - #if ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #if EITHER(RGB_LED, RGBW_LED) if (PWM_PIN(RGB_LED_R_PIN)) SET_PWM(RGB_LED_R_PIN); else SET_OUTPUT(RGB_LED_R_PIN); if (PWM_PIN(RGB_LED_G_PIN)) SET_PWM(RGB_LED_G_PIN); else SET_OUTPUT(RGB_LED_G_PIN); if (PWM_PIN(RGB_LED_B_PIN)) SET_PWM(RGB_LED_B_PIN); else SET_OUTPUT(RGB_LED_B_PIN); @@ -108,7 +108,7 @@ void LEDLights::set_color(const LEDColor &incol #endif - #if ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #if EITHER(RGB_LED, RGBW_LED) // This variant uses 3-4 separate pins for the RGB(W) components. // If the pins can do PWM then their intensity will be set. @@ -131,7 +131,7 @@ void LEDLights::set_color(const LEDColor &incol RGBsetColor(incol.r, incol.g, incol.b, true); #endif - #if ENABLED(LED_CONTROL_MENU) || ENABLED(PRINTER_EVENT_LEDS) + #if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) // Don't update the color when OFF lights_on = !incol.is_off(); if (lights_on) color = incol; diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h index 5a136cdd2..bbd609c29 100644 --- a/Marlin/src/feature/leds/leds.h +++ b/Marlin/src/feature/leds/leds.h @@ -33,7 +33,7 @@ #include "neopixel.h" #endif -#define HAS_WHITE_LED (ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)) +#define HAS_WHITE_LED EITHER(RGBW_LED, NEOPIXEL_LED) /** * LEDcolor type for use with leds.set_color @@ -183,7 +183,7 @@ public: static inline LEDColor get_color() { return lights_on ? color : LEDColorOff(); } #endif - #if ENABLED(LED_CONTROL_MENU) || ENABLED(PRINTER_EVENT_LEDS) + #if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) static LEDColor color; // last non-off color static bool lights_on; // the last set color was "on" #endif diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index f1cef4994..eed52634f 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -46,7 +46,7 @@ bool Power::is_power_needed() { HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; #endif - #if ENABLED(AUTO_POWER_CONTROLLERFAN) && HAS_CONTROLLER_FAN && ENABLED(USE_CONTROLLER_FAN) + #if ENABLED(AUTO_POWER_CONTROLLERFAN, USE_CONTROLLER_FAN) && HAS_CONTROLLER_FAN if (controllerfan_speed) return true; #endif diff --git a/Marlin/src/feature/solenoid.cpp b/Marlin/src/feature/solenoid.cpp index 547a3b0df..36430c551 100644 --- a/Marlin/src/feature/solenoid.cpp +++ b/Marlin/src/feature/solenoid.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(EXT_SOLENOID) || ENABLED(MANUAL_SOLENOID_CONTROL) +#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) #include "solenoid.h" @@ -95,4 +95,4 @@ void disable_all_solenoids() { #endif } -#endif // EXT_SOLENOID +#endif // EXT_SOLENOID || MANUAL_SOLENOID_CONTROL diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index bcfe84e06..675cd2b88 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -36,7 +36,7 @@ #include "../../../module/probe.h" #include "../../queue.h" -#if ENABLED(LCD_BED_LEVELING) && ENABLED(PROBE_MANUALLY) +#if BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) #include "../../../lcd/ultralcd.h" #endif @@ -151,7 +151,7 @@ */ G29_TYPE GcodeSuite::G29() { - #if ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(PROBE_MANUALLY) + #if EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) const bool seenQ = parser.seen('Q'); #else constexpr bool seenQ = false; @@ -205,7 +205,7 @@ G29_TYPE GcodeSuite::G29() { ABL_VAR float xProbe, yProbe, measured_z; ABL_VAR bool dryrun, abl_should_enable; - #if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR) + #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) ABL_VAR int abl_probe_index; #endif @@ -280,7 +280,7 @@ G29_TYPE GcodeSuite::G29() { if (active_extruder != 0) tool_change(0); #endif - #if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR) + #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) abl_probe_index = -1; #endif @@ -522,7 +522,7 @@ G29_TYPE GcodeSuite::G29() { } else { - #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT) + #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) const uint16_t index = abl_probe_index - 1; #endif diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 6b2c0f951..3cb4b9f9d 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -400,7 +400,7 @@ void GcodeSuite::G28(const bool always_home_all) { endstops.not_homing(); - #if ENABLED(DELTA) && ENABLED(DELTA_HOME_TO_SAFE_ZONE) + #if BOTH(DELTA, DELTA_HOME_TO_SAFE_ZONE) // move to a height where we can use the full xy-area do_blocking_move_to_z(delta_clip_start_height); #endif diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index 7758d72ec..59d202d45 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -52,8 +52,8 @@ #define CALIBRATION_MEASUREMENT_CERTAIN 0.5 // mm #endif -#define HAS_X_CENTER (ENABLED(CALIBRATION_MEASURE_LEFT) && ENABLED(CALIBRATION_MEASURE_RIGHT)) -#define HAS_Y_CENTER (ENABLED(CALIBRATION_MEASURE_FRONT) && ENABLED(CALIBRATION_MEASURE_BACK)) +#define HAS_X_CENTER BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT) +#define HAS_Y_CENTER BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK) #if ENABLED(BACKLASH_GCODE) extern float backlash_distance_mm[], backlash_correction, backlash_smoothing_mm; diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp index c6f039a8e..1aea99550 100644 --- a/Marlin/src/gcode/control/M17_M18_M84.cpp +++ b/Marlin/src/gcode/control/M17_M18_M84.cpp @@ -25,7 +25,7 @@ #include "../../lcd/ultralcd.h" #include "../../module/stepper.h" -#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTRA_LCD) +#if BOTH(AUTO_BED_LEVELING_UBL, ULTRA_LCD) #include "../../feature/bedlevel/bedlevel.h" #endif diff --git a/Marlin/src/gcode/control/M380_M381.cpp b/Marlin/src/gcode/control/M380_M381.cpp index 0cc00ecc5..c23d7e572 100644 --- a/Marlin/src/gcode/control/M380_M381.cpp +++ b/Marlin/src/gcode/control/M380_M381.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(EXT_SOLENOID) || ENABLED(MANUAL_SOLENOID_CONTROL) +#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) #include "../gcode.h" #include "../../feature/solenoid.h" diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index e7cad7775..107c77f41 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT) +#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || EITHER(DIGIPOT_I2C, DAC_STEPPER_CURRENT) #include "../../gcode.h" @@ -50,7 +50,7 @@ void GcodeSuite::M907() { #elif HAS_MOTOR_CURRENT_PWM - #if PIN_EXISTS(MOTOR_CURRENT_PWM_X) || PIN_EXISTS(MOTOR_CURRENT_PWM_Y) || PIN_EXISTS(MOTOR_CURRENT_PWM_XY) + #if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY) if (parser.seenval('X') || parser.seenval('Y')) stepper.digipot_current(0, parser.value_int()); #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 3e2a3f5f3..dc40a4a88 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -117,7 +117,7 @@ void GcodeSuite::get_destination_from_command() { #endif // Get ABCDHI mixing factors - #if ENABLED(MIXING_EXTRUDER) && ENABLED(DIRECT_MIXING_IN_G1) + #if BOTH(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1) M165(); #endif } @@ -330,7 +330,7 @@ void GcodeSuite::process_parsed_command( case 33: M33(); break; // M33: Get the long full path to a file or folder #endif - #if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE) + #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) case 34: M34(); break; // M34: Set SD card sorting options #endif @@ -494,7 +494,7 @@ void GcodeSuite::process_parsed_command( case 665: M665(); break; // M665: Set delta configurations #endif - #if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS) + #if ANY(DELTA, X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS, Z_DUAL_ENDSTOPS) case 666: M666(); break; // M666: Set delta or dual endstop adjustment #endif @@ -576,7 +576,7 @@ void GcodeSuite::process_parsed_command( case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta) #endif - #if ENABLED(EXT_SOLENOID) || ENABLED(MANUAL_SOLENOID_CONTROL) + #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) case 380: M380(); break; // M380: Activate solenoid on active (or specified) extruder case 381: M381(); break; // M381: Disable all solenoids or, if MANUAL_SOLENOID_CONTROL, active (or specified) solenoid #endif @@ -673,7 +673,7 @@ void GcodeSuite::process_parsed_command( case 900: M900(); break; // M900: Set advance K factor. #endif - #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT) + #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || EITHER(DIGIPOT_I2C, DAC_STEPPER_CURRENT) case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes. #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT) case 908: M908(); break; // M908: Control digital trimpot directly. diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index e178b479a..dcd015c2b 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -144,7 +144,7 @@ * M140 - Set bed target temp. S * M145 - Set heatup values for materials on the LCD. H B F for S (0=PLA, 1=ABS) * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT) - * M150 - Set Status LED Color as R U B P. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, or PCA9632). + * M150 - Set Status LED Color as R U B P. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632). * M155 - Auto-report temperatures with interval of S. (Requires AUTO_REPORT_TEMPERATURES) * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER) * M164 - Commit the mix and save to a virtual tool (current, or as specified by 'S'). (Requires MIXING_EXTRUDER) @@ -480,7 +480,7 @@ private: #if ENABLED(LONG_FILENAME_HOST_SUPPORT) static void M33(); #endif - #if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE) + #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) static void M34(); #endif #endif @@ -706,7 +706,7 @@ private: static bool M364(); #endif - #if ENABLED(EXT_SOLENOID) || ENABLED(MANUAL_SOLENOID_CONTROL) + #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) static void M380(); static void M381(); #endif @@ -845,7 +845,7 @@ private: static void M918(); #endif - #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT) + #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || EITHER(DIGIPOT_I2C, DAC_STEPPER_CURRENT) static void M907(); #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT) static void M908(); diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index e16069f86..c3702ab48 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -152,7 +152,7 @@ void GcodeSuite::M115() { // THERMAL_PROTECTION cap_line(PSTR("THERMAL_PROTECTION") - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(THERMAL_PROTECTION_BED) + #if BOTH(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED) , true #endif ); diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index 58a0a5c3d..e2f17c438 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(LCD_SET_PROGRESS_MANUALLY) && (ENABLED(EXTENSIBLE_UI) || ENABLED(ULTRA_LCD)) +#if ENABLED(LCD_SET_PROGRESS_MANUALLY) && EITHER(EXTENSIBLE_UI, ULTRA_LCD) #include "../gcode.h" #include "../../lcd/ultralcd.h" @@ -42,4 +42,4 @@ void GcodeSuite::M73() { ui.set_progress(parser.value_byte()); } -#endif // LCD_SET_PROGRESS_MANUALLY && (ENABLED(EXTENSIBLE_UI) || ENABLED(ULTRA_LCD)) +#endif // LCD_SET_PROGRESS_MANUALLY && (EXTENSIBLE_UI || ULTRA_LCD) diff --git a/Marlin/src/gcode/motion/G0_G1.cpp b/Marlin/src/gcode/motion/G0_G1.cpp index cbec67b27..7e0e9f7b9 100644 --- a/Marlin/src/gcode/motion/G0_G1.cpp +++ b/Marlin/src/gcode/motion/G0_G1.cpp @@ -25,7 +25,7 @@ #include "../../Marlin.h" -#if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT) +#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) #include "../../feature/fwretract.h" #endif @@ -79,7 +79,7 @@ void GcodeSuite::G0_G1( } #endif - #if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT) + #if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) if (MIN_AUTORETRACT <= MAX_AUTORETRACT) { // When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 2e232484a..ac519bc77 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -95,7 +95,7 @@ void enqueue_and_echo_commands_P(PGM_P const pgcode); */ bool enqueue_and_echo_command(const char* cmd); -#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (HAS_LCD_MENU && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)))) +#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (HAS_LCD_MENU && ANY(AUTO_BED_LEVELING_UBL, PID_AUTOTUNE_MENU, ADVANCED_PAUSE_FEATURE))) #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW) #if HAS_QUEUE_NOW diff --git a/Marlin/src/gcode/sdcard/M34.cpp b/Marlin/src/gcode/sdcard/M34.cpp index 9e785519d..979ed88a1 100644 --- a/Marlin/src/gcode/sdcard/M34.cpp +++ b/Marlin/src/gcode/sdcard/M34.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE) +#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) #include "../gcode.h" #include "../../sd/cardreader.h" diff --git a/Marlin/src/gcode/temperature/M104_M109.cpp b/Marlin/src/gcode/temperature/M104_M109.cpp index 8c8ed1586..1b8fb2ab7 100644 --- a/Marlin/src/gcode/temperature/M104_M109.cpp +++ b/Marlin/src/gcode/temperature/M104_M109.cpp @@ -125,7 +125,7 @@ void GcodeSuite::M109() { print_job_timer.start(); #endif - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) if (thermalManager.isHeatingHotend(target_extruder) || !no_wait_for_cooling) thermalManager.set_heating_message(target_extruder); #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 070e06be3..7b173cd48 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -64,7 +64,7 @@ #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864) +#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864) #define ULTRA_LCD #define DOGLCD @@ -141,7 +141,7 @@ #endif -#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) +#if EITHER(MAKRPANEL, MINIPANEL) #define DOGLCD #define ULTIPANEL #define DEFAULT_LCD_CONTRAST 17 @@ -159,13 +159,13 @@ #endif // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106 -#define HAS_SSD1306_OLED_I2C (ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SSD1309) || ENABLED(U8GLIB_SH1106)) +#define HAS_SSD1306_OLED_I2C ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106) #if HAS_SSD1306_OLED_I2C #define ULTRA_LCD #define DOGLCD #endif -#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) +#if EITHER(PANEL_ONE, U8GLIB_SH1106) #define ULTIMAKERCONTROLLER @@ -177,17 +177,13 @@ #endif -#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER) +#if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER) #define DOGLCD #define U8GLIB_ST7920 #define REPRAP_DISCOUNT_SMART_CONTROLLER #endif -#if ENABLED(ULTIMAKERCONTROLLER) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ - || ENABLED(G3D_PANEL) \ - || ENABLED(RIGIDBOT_PANEL) \ - || ENABLED(ULTI_CONTROLLER) +#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, ULTI_CONTROLLER) #define ULTIPANEL #endif @@ -223,7 +219,7 @@ * I2C PANELS */ -#if ENABLED(LCD_SAINSMART_I2C_1602) || ENABLED(LCD_SAINSMART_I2C_2004) +#if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) #define LCD_I2C_TYPE_PCF8575 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander @@ -267,15 +263,11 @@ #define STD_ENCODER_PULSES_PER_STEP 2 #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 -#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \ - || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - || ENABLED(AZSMZ_12864) \ - || ENABLED(OLED_PANEL_TINYBOY2) \ - || ENABLED(BQ_LCD_SMART_CONTROLLER) \ - || ENABLED(LCD_I2C_PANELOLU2) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) +#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2, REPRAP_DISCOUNT_SMART_CONTROLLER) + #define STD_ENCODER_PULSES_PER_STEP 4 #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 + #endif #ifndef STD_ENCODER_PULSES_PER_STEP @@ -400,16 +392,16 @@ #endif // No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE -#if ENABLED(MK2_MULTIPLEXER) || ENABLED(SWITCHING_NOZZLE) +#if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE) #undef DISABLE_INACTIVE_EXTRUDER #endif // Prusa MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE -#if ENABLED(MK2_MULTIPLEXER) || ENABLED(PRUSA_MMU2) +#if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2) #define SINGLENOZZLE #endif -#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset +#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset #undef HOTENDS #define HOTENDS 1 #undef TEMP_SENSOR_1_AS_REDUNDANT @@ -435,7 +427,7 @@ #define SWITCHING_NOZZLE_TWO_SERVOS defined(SWITCHING_NOZZLE_E1_SERVO_NR) #define HAS_HOTEND_OFFSET (HOTENDS > 1) -#define HAS_DUPLICATION_MODE (ENABLED(DUAL_X_CARRIAGE) || ENABLED(MULTI_NOZZLE_DUPLICATION)) +#define HAS_DUPLICATION_MODE EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION) /** * DISTINCT_E_FACTORS affects how some E factors are accessed @@ -506,8 +498,8 @@ /** * Set flags for enabled probes */ -#define HAS_BED_PROBE (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE) || ENABLED(SENSORLESS_PROBING) || ENABLED(RACK_AND_PINION_PROBE)) -#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING)) +#define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE)) +#define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)) #if HAS_BED_PROBE #define USES_Z_MIN_PROBE_ENDSTOP DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) @@ -528,19 +520,19 @@ #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) #endif -#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) -#define HAS_RESUME_CONTINUE (ENABLED(EXTENSIBLE_UI) || ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) -#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533) || ENABLED(NEOPIXEL_LED)) -#define HAS_LEDS_OFF_FLAG (ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) && HAS_RESUME_CONTINUE) -#define HAS_PRINT_PROGRESS (ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)) +#define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) +#define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER) +#define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) +#define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE) +#define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) #define HAS_SERVICE_INTERVALS (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0) -#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR) +#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR) -#define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) -#define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS)) -#define HAS_EXTRA_ENDSTOPS (ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS) +#define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS) +#define Z_MULTI_ENDSTOPS EITHER(Z_DUAL_ENDSTOPS, Z_TRIPLE_ENDSTOPS) +#define HAS_EXTRA_ENDSTOPS (EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS) -#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) +#define IS_SCARA EITHER(MORGAN_SCARA, MAKERARM_SCARA) #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) #define IS_CARTESIAN !IS_KINEMATIC diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 204c141d8..d82f23809 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -106,9 +106,9 @@ /** * CoreXY, CoreXZ, and CoreYZ - and their reverse */ -#define CORE_IS_XY (ENABLED(COREXY) || ENABLED(COREYX)) -#define CORE_IS_XZ (ENABLED(COREXZ) || ENABLED(COREZX)) -#define CORE_IS_YZ (ENABLED(COREYZ) || ENABLED(COREZY)) +#define CORE_IS_XY EITHER(COREXY, COREYX) +#define CORE_IS_XZ EITHER(COREXZ, COREZX) +#define CORE_IS_YZ EITHER(COREYZ, COREZY) #define IS_CORE (CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ) #if IS_CORE #if CORE_IS_XY @@ -124,7 +124,7 @@ #define CORE_AXIS_1 B_AXIS #define CORE_AXIS_2 C_AXIS #endif - #if ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY) + #if ANY(COREYX, COREZX, COREZY) #define CORESIGN(n) (-(n)) #else #define CORESIGN(n) (n) @@ -426,7 +426,7 @@ #define HEATER_CHAMBER_USES_THERMISTOR #endif -#define HOTEND_USES_THERMISTOR (ENABLED(HEATER_0_USES_THERMISTOR) || ENABLED(HEATER_1_USES_THERMISTOR) || ENABLED(HEATER_2_USES_THERMISTOR) || ENABLED(HEATER_3_USES_THERMISTOR) || ENABLED(HEATER_4_USES_THERMISTOR)) +#define HOTEND_USES_THERMISTOR ANY(HEATER_0_USES_THERMISTOR, HEATER_1_USES_THERMISTOR, HEATER_2_USES_THERMISTOR, HEATER_3_USES_THERMISTOR, HEATER_4_USES_THERMISTOR) /** * Default hotend offsets, if not defined @@ -877,8 +877,8 @@ #define AXIS_HAS_STALLGUARD(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160)) #define AXIS_HAS_STEALTHCHOP(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2208) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160)) - #define STEALTHCHOP_ENABLED (ENABLED(STEALTHCHOP_XY) || ENABLED(STEALTHCHOP_Z) || ENABLED(STEALTHCHOP_E)) - #define USE_SENSORLESS (ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING)) + #define STEALTHCHOP_ENABLED ANY(STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_E) + #define USE_SENSORLESS EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // Disable Z axis sensorless homing if a probe is used to home the Z axis #if HOMING_Z_WITH_PROBE #undef Z_STALL_SENSITIVITY @@ -940,8 +940,8 @@ #if !HAS_HEATED_BED #undef PIDTEMPBED #endif -#define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)) -#define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED)) +#define HAS_PID_HEATING EITHER(PIDTEMP, PIDTEMPBED) +#define HAS_PID_FOR_BOTH BOTH(PIDTEMP, PIDTEMPBED) // Thermal protection #define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED)) @@ -976,9 +976,9 @@ #define Z_PROBE_SERVO_NR -1 #endif -#define HAS_SERVO_ANGLES (ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) || (HAS_Z_SERVO_PROBE && defined(Z_PROBE_SERVO_NR))) +#define HAS_SERVO_ANGLES (EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) || (HAS_Z_SERVO_PROBE && defined(Z_PROBE_SERVO_NR))) -#if !HAS_SERVO_ANGLES +#if !HAS_SERVO_ANGLES || ENABLED(BLTOUCH) #undef EDITABLE_SERVO_ANGLES #endif @@ -986,17 +986,17 @@ #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH)) // User Interface -#define HAS_HOME (PIN_EXISTS(HOME)) -#define HAS_KILL (PIN_EXISTS(KILL)) -#define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) -#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) -#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) -#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) +#define HAS_HOME (PIN_EXISTS(HOME)) +#define HAS_KILL (PIN_EXISTS(KILL)) +#define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) +#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) +#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) +#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) // Digital control -#define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) -#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) -#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_X) || PIN_EXISTS(MOTOR_CURRENT_PWM_Y) || PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) +#define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) +#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) +#define HAS_MOTOR_CURRENT_PWM ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_E) #define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS || HAS_Z3_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS || HAS_E5_MICROSTEPS) @@ -1055,7 +1055,7 @@ #undef AUTO_REPORT_TEMPERATURES #endif -#define HAS_AUTO_REPORTING (ENABLED(AUTO_REPORT_TEMPERATURES) || ENABLED(AUTO_REPORT_SD_STATUS)) +#define HAS_AUTO_REPORTING EITHER(AUTO_REPORT_TEMPERATURES, AUTO_REPORT_SD_STATUS) /** * This setting is also used by M109 when trying to calculate @@ -1272,14 +1272,14 @@ /** * Set granular options based on the specific type of leveling */ -#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA))) -#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) -#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) +#define UBL_SEGMENTED BOTH(AUTO_BED_LEVELING_UBL, DELTA) +#define ABL_PLANAR EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) +#define ABL_GRID EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) #define HAS_ABL_NOT_UBL (ABL_PLANAR || ABL_GRID) #define HAS_ABL_OR_UBL (HAS_ABL_NOT_UBL || ENABLED(AUTO_BED_LEVELING_UBL)) #define HAS_LEVELING (HAS_ABL_OR_UBL || ENABLED(MESH_BED_LEVELING)) #define HAS_AUTOLEVEL (HAS_ABL_OR_UBL && DISABLED(PROBE_MANUALLY)) -#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) +#define HAS_MESH ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING) #define PLANNER_LEVELING (HAS_LEVELING && DISABLED(AUTO_BED_LEVELING_UBL)) #define HAS_PROBING_PROCEDURE (HAS_ABL_OR_UBL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) #define HAS_POSITION_MODIFIERS (ENABLED(FWRETRACT) || HAS_LEVELING || ENABLED(SKEW_CORRECTION)) @@ -1297,8 +1297,8 @@ #undef NO_FAN_SLOWING_IN_PID_TUNING #endif -#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)) -#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF)) +#define QUIET_PROBING (HAS_BED_PROBE && (EITHER(PROBING_HEATERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)) +#define HEATER_IDLE_HANDLER EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) #if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH) #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 @@ -1400,7 +1400,7 @@ /** * Default mesh area is an area with an inset margin on the print area. */ -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) #if IS_KINEMATIC // Probing points may be verified at compile time within the radius // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") @@ -1440,7 +1440,7 @@ #endif // MESH_BED_LEVELING || AUTO_BED_LEVELING_UBL -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT) +#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT) #if IS_KINEMATIC #define SIN0 0.0 #define SIN120 0.866025 @@ -1488,7 +1488,7 @@ #endif #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) #ifndef LEFT_PROBE_BED_POSITION #define LEFT_PROBE_BED_POSITION MIN_PROBE_X #endif @@ -1582,7 +1582,7 @@ #endif // Add commands that need sub-codes to this list -#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS) || ENABLED(POWER_LOSS_RECOVERY) +#define USE_GCODE_SUBCODES ANY(G38_PROBE_TARGET, CNC_COORDINATE_SYSTEMS, POWER_LOSS_RECOVERY) // Parking Extruder #if ENABLED(PARKING_EXTRUDER) @@ -1624,8 +1624,8 @@ #endif #endif -// Nozzle park -#if ENABLED(NOZZLE_PARK_FEATURE) && ENABLED(DELTA) +// Nozzle park for Delta +#if BOTH(NOZZLE_PARK_FEATURE, DELTA) #undef NOZZLE_PARK_Z_FEEDRATE #define NOZZLE_PARK_Z_FEEDRATE NOZZLE_PARK_XY_FEEDRATE #endif @@ -1666,7 +1666,7 @@ // If platform requires early initialization of watchdog to properly boot #define EARLY_WATCHDOG (ENABLED(USE_WATCHDOG) && defined(ARDUINO_ARCH_SAM)) -#define USE_EXECUTE_COMMANDS_IMMEDIATE (ENABLED(G29_RETRY_AND_RECOVER) || ENABLED(GCODE_MACROS) || ENABLED(POWER_LOSS_RECOVERY) || HAS_DRIVER(L6470)) +#define USE_EXECUTE_COMMANDS_IMMEDIATE (ANY(G29_RETRY_AND_RECOVER, GCODE_MACROS, POWER_LOSS_RECOVERY) || HAS_DRIVER(L6470)) #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) #define Z_STEPPER_COUNT 3 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f6a3070f5..2263b87c6 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -395,7 +395,7 @@ #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) #error "TX_BUFFER_SIZE must be 0 or a power of 2 between 1 and 256." #endif -#elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX) +#elif ANY(SERIAL_XON_XOFF, SERIAL_STATS_MAX_RX_QUEUED, SERIAL_STATS_DROPPED_RX) #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices." #endif @@ -410,7 +410,7 @@ /** * Dual / Triple Stepper Drivers */ -#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE) +#if BOTH(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS." #elif ENABLED(X_DUAL_STEPPER_DRIVERS) && !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR) #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)." @@ -462,21 +462,21 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "PULLDOWN pin mode is not available on the selected board." #endif -#if ENABLED(ENDSTOPPULLUPS) && ENABLED(ENDSTOPPULLDOWNS) +#if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS) #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS." -#elif ENABLED(FIL_RUNOUT_PULLUP) && ENABLED(FIL_RUNOUT_PULLDOWN) +#elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN) #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN." -#elif ENABLED(ENDSTOPPULLUP_XMAX) && ENABLED(ENDSTOPPULLDOWN_XMAX) +#elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX) #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX." -#elif ENABLED(ENDSTOPPULLUP_YMAX) && ENABLED(ENDSTOPPULLDOWN_YMAX) +#elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX) #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX." -#elif ENABLED(ENDSTOPPULLUP_ZMAX) && ENABLED(ENDSTOPPULLDOWN_ZMAX) +#elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX) #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX." -#elif ENABLED(ENDSTOPPULLUP_XMIN) && ENABLED(ENDSTOPPULLDOWN_XMIN) +#elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN) #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN." -#elif ENABLED(ENDSTOPPULLUP_YMIN) && ENABLED(ENDSTOPPULLDOWN_YMIN) +#elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN) #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN." -#elif ENABLED(ENDSTOPPULLUP_ZMIN) && ENABLED(ENDSTOPPULLDOWN_ZMIN) +#elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN) #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN." #endif @@ -513,7 +513,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Custom Boot and Status screens */ -#if DISABLED(DOGLCD) && (ENABLED(SHOW_CUSTOM_BOOTSCREEN) || ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)) +#if DISABLED(DOGLCD) && EITHER(SHOW_CUSTOM_BOOTSCREEN, CUSTOM_STATUS_SCREEN_IMAGE) #error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE." #endif @@ -568,9 +568,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #if ENABLED(BABYSTEPPING) #if ENABLED(SCARA) #error "BABYSTEPPING is not implemented for SCARA yet." - #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY) + #elif BOTH(DELTA, BABYSTEP_XY) #error "BABYSTEPPING only implemented for Z axis on deltabots." - #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING) + #elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING) #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination" #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." @@ -580,7 +580,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET." #elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS." - #elif ENABLED(BABYSTEP_ALWAYS_AVAILABLE) && ENABLED(MOVE_Z_WHEN_IDLE) + #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE) #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible." #endif #endif @@ -641,7 +641,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Individual axis homing is useless for DELTAS */ -#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA) +#if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA) #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics." #endif @@ -810,7 +810,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "Enable only one of PARKING_EXTRUDER and MAGNETIC_PARKING_EXTRUDER." #elif EXTRUDERS != 2 #error "PARKING_EXTRUDER requires exactly 2 EXTRUDERS." - #elif !PIN_EXISTS(SOL0) || !PIN_EXISTS(SOL1) + #elif !PIN_EXISTS(SOL0, SOL1) #error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN." #elif !defined(PARKING_EXTRUDER_PARKING_X) #error "PARKING_EXTRUDER requires PARKING_EXTRUDER_PARKING_X." @@ -907,7 +907,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Bed Heating Options - PID vs Limit Switching */ -#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING) +#if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING) #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." #endif @@ -974,7 +974,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Z_PROBE_SLED is incompatible with DELTA */ - #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA) + #if BOTH(Z_PROBE_SLED, DELTA) #error "You cannot use Z_PROBE_SLED with DELTA." #endif @@ -1087,7 +1087,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS * Bed Leveling Requirements */ -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT) +#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT) static_assert(WITHIN(PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_1_X is outside the probe region."); static_assert(WITHIN(PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_2_X is outside the probe region."); static_assert(WITHIN(PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_3_X is outside the probe region."); @@ -1221,8 +1221,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Make sure DISABLE_[XYZ] compatible with selected homing options */ -#if ENABLED(DISABLE_X) || ENABLED(DISABLE_Y) || ENABLED(DISABLE_Z) - #if ENABLED(HOME_AFTER_DEACTIVATE) || ENABLED(Z_SAFE_HOMING) +#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z) + #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." #endif #endif @@ -1255,7 +1255,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #if ENABLED(SAV_3DGLCD) #if DISABLED(U8GLIB_SSD1306) && DISABLED(U8GLIB_SH1106) #error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." - #elif ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106) + #elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106) #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." #endif #endif @@ -1334,11 +1334,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS */ #if !HAS_HEATER_0 #error "HEATER_0_PIN not defined for this board." -#elif !PIN_EXISTS(TEMP_0) && !PIN_EXISTS(MAX6675_SS) +#elif !ANY_PIN(TEMP_0, MAX6675_SS) #error "TEMP_0_PIN not defined for this board." -#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR))) +#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PIN_EXISTS(E0_STEP, E0_DIR)) #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." -#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !HAS_E0_ENABLE)) +#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." #elif TEMP_SENSOR_0 == 0 #error "TEMP_SENSOR_0 is required." @@ -1356,7 +1356,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board." #elif TEMP_SENSOR_1 == 0 #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." - #elif !PIN_EXISTS(TEMP_1) && !PIN_EXISTS(MAX6675_SS2) + #elif !ANY_PIN(TEMP_1, MAX6675_SS2) #error "TEMP_1_PIN not defined for this board." #endif #if HOTENDS > 2 @@ -1434,7 +1434,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Temperature status LEDs */ -#if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE) +#if ENABLED(TEMP_STAT_LEDS) && !ANY_PIN(STAT_LED_RED, STAT_LED_BLUE) #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both." #endif @@ -1442,7 +1442,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS * LED Control Menu */ #if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS - #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9632, or NEOPIXEL_LED." + #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED." #endif /** @@ -1467,27 +1467,27 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS */ #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only #if E_STEPPERS - #if !(PIN_EXISTS(E0_STEP) && PIN_EXISTS(E0_DIR) && HAS_E0_ENABLE) + #if !(PIN_EXISTS(E0_STEP, E0_DIR) && HAS_E0_ENABLE) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." #endif #if E_STEPPERS > 1 - #if !(PIN_EXISTS(E1_STEP) && PIN_EXISTS(E1_DIR) && HAS_E1_ENABLE) + #if !(PIN_EXISTS(E1_STEP, E1_DIR) && HAS_E1_ENABLE) #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board." #endif #if E_STEPPERS > 2 - #if !(PIN_EXISTS(E2_STEP) && PIN_EXISTS(E2_DIR) && HAS_E2_ENABLE) + #if !(PIN_EXISTS(E2_STEP, E2_DIR) && HAS_E2_ENABLE) #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board." #endif #if E_STEPPERS > 3 - #if !(PIN_EXISTS(E3_STEP) && PIN_EXISTS(E3_DIR) && HAS_E3_ENABLE) + #if !(PIN_EXISTS(E3_STEP, E3_DIR) && HAS_E3_ENABLE) #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board." #endif #if E_STEPPERS > 4 - #if !(PIN_EXISTS(E4_STEP) && PIN_EXISTS(E4_DIR) && HAS_E4_ENABLE) + #if !(PIN_EXISTS(E4_STEP, E4_DIR) && HAS_E4_ENABLE) #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board." #endif #if E_STEPPERS > 5 - #if !(PIN_EXISTS(E5_STEP) && PIN_EXISTS(E5_DIR) && HAS_E5_ENABLE) + #if !(PIN_EXISTS(E5_STEP, E5_DIR) && HAS_E5_ENABLE) #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board." #endif #endif // E_STEPPERS > 5 @@ -1675,9 +1675,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * RGB_LED Requirements */ -#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B)) +#define _RGB_TEST (PIN_EXISTS(RGB_LED_R, RGB_LED_G, RGB_LED_B)) #if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS - #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED." + #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9533, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED." #elif ENABLED(RGB_LED) #if !_RGB_TEST #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN." @@ -1813,7 +1813,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Check existing RX/TX pins against enable TMC UART drivers. */ -#define INVALID_TMC2208(ST) (AXIS_DRIVER_TYPE(ST, TMC2208) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX) && PIN_EXISTS(ST##_SERIAL_TX)))) +#define INVALID_TMC2208(ST) (AXIS_DRIVER_TYPE(ST, TMC2208) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX, ST##_SERIAL_TX)))) #if INVALID_TMC2208(X) #error "TMC2208 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN." #elif INVALID_TMC2208(X2) @@ -1887,7 +1887,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS // is necessary in order to reset the stallGuard indication between the initial movement of all three // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of // clearing the stallGuard activated status is found. - #if ENABLED(DELTA) && !(ENABLED(STEALTHCHOP_XY) && ENABLED(STEALTHCHOP_Z)) + #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z) #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z." #elif X_SENSORLESS && X_HOME_DIR == -1 && (!X_MIN_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_XMIN)) #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN." @@ -1909,7 +1909,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS // Sensorless homing/probing requirements #if ENABLED(SENSORLESS_HOMING) && !(X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS) #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes." -#elif ENABLED(SENSORLESS_PROBING) && ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS) +#elif BOTH(SENSORLESS_PROBING, DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS) #error "SENSORLESS_PROBING for DELTA requires TMC stepper drivers with StallGuard on X, Y, and Z axes." #elif ENABLED(SENSORLESS_PROBING) && !Z_SENSORLESS #error "SENSORLESS_PROBING requires a TMC stepper driver with StallGuard on Z." @@ -1981,7 +1981,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #undef _ARR_TEST -#if ENABLED(CNC_COORDINATE_SYSTEMS) && ENABLED(NO_WORKSPACE_OFFSETS) +#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS." #endif @@ -2036,7 +2036,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration." #endif -#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !(PIN_EXISTS(USB_CS) && PIN_EXISTS(USB_INTR)) +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PIN_EXISTS(USB_CS, USB_INTR) #error "USB_CS_PIN and USB_INTR_PIN are required for USB_FLASH_DRIVE_SUPPORT." #endif diff --git a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp index 217d99e09..5ae69c722 100644 --- a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp @@ -40,7 +40,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -57,7 +57,7 @@ LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_I2C_PIN_EN, LCD_I2C_PIN_RW, LCD_I2C_PIN_RS, LCD_I2C_PIN_D4, LCD_I2C_PIN_D5, LCD_I2C_PIN_D6, LCD_I2C_PIN_D7); -#elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008) +#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) LCD_CLASS lcd(LCD_I2C_ADDRESS #ifdef DETECT_DEVICE @@ -628,7 +628,7 @@ void MarlinUI::draw_status_message(const bool blink) { if (progress > 2) return draw_progress_bar(progress); } - #elif ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + #elif BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index aabc1c843..828c26322 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -572,7 +572,7 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(STATUS_BASELINE - INFO_FONT_ASCENT, STATUS_BASELINE + INFO_FONT_DESCENT)) { lcd_moveto(0, STATUS_BASELINE); - #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { lcd_put_u8str_P(PSTR(LCD_STR_FILAM_DIA)); diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 7a388b60c..769fb3606 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -862,7 +862,7 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { } void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) { - #if ENABLED(LCD_SET_PROGRESS_MANUALLY) || ENABLED(SDSUPPORT) + #if EITHER(LCD_SET_PROGRESS_MANUALLY, SDSUPPORT) // Since the progress bar involves writing // quite a few bytes to GDRAM, only do this diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp index d8d202944..60a74dba2 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp @@ -189,7 +189,7 @@ void MarlinUI::init_lcd() { OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH); #endif - #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) + #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) SET_OUTPUT(LCD_PINS_DC); #if !defined(LCD_RESET_PIN) #define LCD_RESET_PIN LCD_PINS_RS @@ -497,7 +497,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #endif // AUTO_BED_LEVELING_UBL - #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY) + #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) const unsigned char cw_bmp[] PROGMEM = { B00000011,B11111000,B00000000, diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 02e718c65..c10a6ca30 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -59,7 +59,7 @@ #include "../../core/utility.h" #endif -#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) +#if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER) #include "../../module/tool_change.h" #endif @@ -297,7 +297,7 @@ namespace ExtUI { void setActiveTool(const extruder_t extruder, bool no_move) { #if EXTRUDERS > 1 const uint8_t e = extruder - E0; - #if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) + #if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER) if (e != active_extruder) tool_change(e, 0, no_move); #endif diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index b1083bd54..7f0d1a370 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -45,7 +45,7 @@ #include "../../module/probe.h" #endif -#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(ENABLE_LEVELING_FADE_HEIGHT, AUTO_BED_LEVELING_UBL) #include "../../feature/bedlevel/bedlevel.h" #endif @@ -205,7 +205,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint32_t encoder/*=0*/) { lcd_z_fade_height = planner.z_fade_height; #endif - #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) && ENABLED(BABYSTEPPING) + #if BOTH(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING) static millis_t doubleclick_expire_ms = 0; // Going to menu_main from status screen? Remember first click time. // Going back to status screen within a very short time? Go to Z babystepping. @@ -405,7 +405,7 @@ void MarlinUI::completion_feedback(const bool good/*=true*/) { #endif // BABYSTEP_ZPROBE_OFFSET -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE) +#if ANY(AUTO_BED_LEVELING_UBL, PID_AUTOTUNE_MENU, ADVANCED_PAUSE_FEATURE) void lcd_enqueue_command(const char * const cmd) { no_reentry = true; diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 63ab83038..307896f9d 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -82,7 +82,7 @@ FORCE_INLINE void draw_menu_item_edit_P(const bool sel, const uint8_t row, PGM_P FORCE_INLINE void draw_menu_item_sdfolder(const bool sel, const uint8_t row, PGM_P const pstr, CardReader &theCard) { draw_sd_menu_item(sel, row, pstr, theCard, true); } #endif -#if HAS_GRAPHICAL_LCD && (ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)) +#if HAS_GRAPHICAL_LCD && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) void _lcd_zoffset_overlay_gfx(const float zvalue); #endif @@ -340,13 +340,13 @@ void menu_move(); void lcd_move_z(); void _lcd_draw_homing(); -#define HAS_LINE_TO_Z (ENABLED(DELTA) || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) || ENABLED(LEVEL_BED_CORNERS)) +#define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LEVEL_BED_CORNERS) #if HAS_LINE_TO_Z void line_to_z(const float &z); #endif -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE) +#if ANY(AUTO_BED_LEVELING_UBL, PID_AUTOTUNE_MENU, ADVANCED_PAUSE_FEATURE) void lcd_enqueue_command(const char * const cmd); void lcd_enqueue_commands_P(PGM_P const cmd); #endif diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 50462e357..9078f5078 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -321,7 +321,7 @@ void menu_tmc(); #endif // PID_PARAMS_PER_HOTEND #endif // HOTENDS -#define SHOW_MENU_ADVANCED_TEMPERATURE ((ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(PID_EDIT_MENU)) +#define SHOW_MENU_ADVANCED_TEMPERATURE ((ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND) || EITHER(PID_AUTOTUNE_MENU, PID_EDIT_MENU)) // // Advanced Settings > Temperature diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index d3d04d45a..177cae19a 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -36,7 +36,7 @@ #include "../../module/probe.h" #endif -#if ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) +#if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) #include "../../module/motion.h" #include "../../gcode/queue.h" @@ -244,7 +244,7 @@ void menu_bed_leveling() { #endif // Level Bed - #if ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) + #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) // Manual leveling uses a guided procedure MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); #else diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index b17300863..cb8c7f751 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -275,7 +275,7 @@ void menu_configuration() { // // Delta Calibration // - #if ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION) + #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, menu_delta_calibrate); #endif diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 086bb9981..e82f8570b 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_LCD_MENU && (ENABLED(DELTA_CALIBRATION_MENU) || ENABLED(DELTA_AUTO_CALIBRATION)) +#if HAS_LCD_MENU && EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) #include "menu.h" #include "../../module/delta.h" diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 4ba6a05e6..ef693ccc4 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -58,7 +58,7 @@ void menu_led_custom() { MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true); MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true); MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_B, &leds.color.b, 0, 255, leds.update, true); - #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + #if EITHER(RGBW_LED, NEOPIXEL_LED) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_W, &leds.color.w, 0, 255, leds.update, true); #if ENABLED(NEOPIXEL_LED) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 799d85b9e..c3f5c2850 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -46,8 +46,8 @@ #include "../../feature/host_actions.h" #endif -#define MACHINE_CAN_STOP (ENABLED(SDSUPPORT) || ENABLED(HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL)) -#define MACHINE_CAN_PAUSE (ENABLED(SDSUPPORT) || ENABLED(HOST_PROMPT_SUPPORT) || ENABLED(PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE)) +#define MACHINE_CAN_STOP (EITHER(SDSUPPORT, HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL)) +#define MACHINE_CAN_PAUSE (ANY(SDSUPPORT, HOST_PROMPT_SUPPORT, PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE)) #if MACHINE_CAN_PAUSE diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index dbc4b5c03..8f8a89e4f 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -335,7 +335,7 @@ void menu_move() { else MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) + #if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) #if EXTRUDERS == 6 switch (active_extruder) { @@ -376,7 +376,7 @@ void menu_move() { #endif - #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) + #if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) // Only the current... MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_get_e_amount); diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index 7e612ce99..2d7de185c 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -107,7 +107,7 @@ void menu_tune() { // // Manual bed leveling, Bed Z: // - #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING) + #if BOTH(MESH_BED_LEVELING, LCD_BED_LEVELING) MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); #endif diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 3a2bc3d3c..44ba8df0a 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -23,7 +23,7 @@ #include "../inc/MarlinConfigPre.h" // These displays all share the MarlinUI class -#if HAS_SPI_LCD || ENABLED(MALYAN_LCD) || ENABLED(EXTENSIBLE_UI) +#if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI) #include "ultralcd.h" MarlinUI ui; #include "../sd/cardreader.h" @@ -106,7 +106,7 @@ uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed -#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) +#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) millis_t MarlinUI::next_filament_display; // = 0 #endif @@ -181,7 +181,7 @@ millis_t next_button_update_ms; return click; } - #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION) + #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) bool MarlinUI::external_control; // = false @@ -449,7 +449,7 @@ void MarlinUI::status_screen() { #if HAS_LCD_MENU if (use_click()) { - #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) next_filament_display = millis() + 5000UL; // Show status message for 5s #endif goto_screen(menu_main); @@ -638,7 +638,7 @@ LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; bool MarlinUI::detected() { return - #if (ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)) && defined(DETECT_DEVICE) + #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE) lcd.LcdDetected() == 1 #else true @@ -1008,7 +1008,7 @@ void MarlinUI::update() { #if HAS_DIGITAL_BUTTONS - #if BUTTON_EXISTS(EN1) || BUTTON_EXISTS(EN2) || BUTTON_EXISTS(ENC) || BUTTON_EXISTS(BACK) + #if ANY_BUTTON(EN1, EN2, ENC, BACK) uint8_t newbutton = 0; @@ -1034,7 +1034,7 @@ void MarlinUI::update() { // // Directional buttons // - #if BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT) + #if ANY_BUTTON(UP, DWN, LFT, RT) const int8_t pulses = (ENCODER_PULSES_PER_STEP) * encoderDirection; @@ -1175,7 +1175,7 @@ void MarlinUI::update() { #endif #endif - #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) next_filament_display = millis() + 5000UL; // Show status message for 5s #endif diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index d830c9687..4847b33b0 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -27,18 +27,13 @@ #include "../libs/buzzer.h" #endif -#define HAS_DIGITAL_BUTTONS (!HAS_ADC_BUTTONS && ENABLED(NEWPANEL) \ - || (BUTTON_EXISTS(EN1) && BUTTON_EXISTS(EN2)) \ - || BUTTON_EXISTS(ENC) || BUTTON_EXISTS(BACK) \ - || BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) \ - || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) - +#define HAS_DIGITAL_BUTTONS (!HAS_ADC_BUTTONS && ENABLED(NEWPANEL) || BUTTON_EXISTS(EN1, EN2) || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)) #define HAS_SHIFT_ENCODER (!HAS_ADC_BUTTONS && (ENABLED(REPRAPWORLD_KEYPAD) || (HAS_SPI_LCD && DISABLED(NEWPANEL)))) -#define HAS_ENCODER_WHEEL ((!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || (BUTTON_EXISTS(EN1) && BUTTON_EXISTS(EN2)) ) +#define HAS_ENCODER_WHEEL ((!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTON_EXISTS(EN1, EN2)) #define HAS_ENCODER_ACTION (HAS_LCD_MENU || ENABLED(ULTIPANEL_FEEDMULTIPLY)) // I2C buttons must be read in the main thread -#define HAS_SLOW_BUTTONS (ENABLED(LCD_I2C_VIKI) || ENABLED(LCD_I2C_PANELOLU2)) +#define HAS_SLOW_BUTTONS EITHER(LCD_I2C_VIKI, LCD_I2C_PANELOLU2) #if HAS_SPI_LCD @@ -188,7 +183,7 @@ #else #undef BUTTON_EXISTS - #define BUTTON_EXISTS(BN) false + #define BUTTON_EXISTS(...) false // Shift register bits correspond to buttons: #define BL_LE 7 // Left @@ -267,7 +262,7 @@ public: static void clear_lcd(); static void init_lcd(); - #if HAS_SPI_LCD || ENABLED(MALYAN_LCD) || ENABLED(EXTENSIBLE_UI) + #if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI) static void init(); static void update(); static void set_alert_status_P(PGM_P message); @@ -343,7 +338,7 @@ public: static inline void refresh_contrast() { set_contrast(contrast); } #endif - #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) static millis_t next_filament_display; #endif @@ -466,13 +461,13 @@ public: #endif - #if ENABLED(LCD_BED_LEVELING) && (ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING)) + #if ENABLED(LCD_BED_LEVELING) && EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) static bool wait_for_bl_move; #else static constexpr bool wait_for_bl_move = false; #endif - #if HAS_LCD_MENU && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)) + #if HAS_LCD_MENU && EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) static bool external_control; FORCE_INLINE static void capture() { external_control = true; } FORCE_INLINE static void release() { external_control = false; } @@ -493,7 +488,7 @@ public: #endif static void update_buttons(); static inline bool button_pressed() { return BUTTON_CLICK(); } - #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION) + #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) static void wait_for_release(); #endif diff --git a/Marlin/src/libs/hex_print_routines.cpp b/Marlin/src/libs/hex_print_routines.cpp index ad5fa3302..a3f7492e1 100644 --- a/Marlin/src/libs/hex_print_routines.cpp +++ b/Marlin/src/libs/hex_print_routines.cpp @@ -23,7 +23,7 @@ #include "../inc/MarlinConfig.h" #include "../gcode/parser.h" -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER) || ENABLED(TMC_DEBUG) +#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG) #include "hex_print_routines.h" diff --git a/Marlin/src/libs/least_squares_fit.cpp b/Marlin/src/libs/least_squares_fit.cpp index d67133370..0f52db193 100644 --- a/Marlin/src/libs/least_squares_fit.cpp +++ b/Marlin/src/libs/least_squares_fit.cpp @@ -34,7 +34,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_LINEAR) +#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_LINEAR) #include "least_squares_fit.h" diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index 69f2535fd..7038b2f2c 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) +#if EITHER(NOZZLE_CLEAN_FEATURE, NOZZLE_PARK_FEATURE) #include "nozzle.h" diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 46cb4c831..0239d2825 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -56,7 +56,7 @@ #include "../gcode/gcode.h" #include "../Marlin.h" -#if ENABLED(EEPROM_SETTINGS) || ENABLED(SD_FIRMWARE_UPDATE) +#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) #include "../HAL/shared/persistent_store_api.h" #endif @@ -194,7 +194,7 @@ typedef struct SettingsDataStruct { delta_segments_per_second, // M665 S delta_calibration_radius, // M665 B delta_tower_angle_trim[ABC]; // M665 XYZ - #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS + #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS float x2_endstop_adj, // M666 X y2_endstop_adj, // M666 Y z2_endstop_adj, // M666 Z (S2) @@ -340,7 +340,7 @@ void MarlinSettings::postprocess() { fwretract.refresh_autoretract(); #endif - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) planner.recalculate_max_e_jerk(); #endif @@ -448,7 +448,7 @@ void MarlinSettings::postprocess() { #if HAS_CLASSIC_JERK EEPROM_WRITE(planner.max_jerk); - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) dummy = float(DEFAULT_EJERK); EEPROM_WRITE(dummy); #endif @@ -624,7 +624,7 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(delta_calibration_radius); // 1 float EEPROM_WRITE(delta_tower_angle_trim); // 3 floats - #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS + #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS _FIELD_TEST(x2_endstop_adj); @@ -757,7 +757,7 @@ void MarlinSettings::postprocess() { const fwretract_settings_t autoretract_defaults = { 3, 45, 0, 0, 0, 13, 0, 8 }; EEPROM_WRITE(autoretract_defaults); #endif - #if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT) + #if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) EEPROM_WRITE(fwretract.autoretract_enabled); #else const bool autoretract_enabled = false; @@ -1167,7 +1167,7 @@ void MarlinSettings::postprocess() { #if HAS_CLASSIC_JERK EEPROM_READ(planner.max_jerk); - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) EEPROM_READ(dummy); #endif #else @@ -1340,7 +1340,7 @@ void MarlinSettings::postprocess() { EEPROM_READ(delta_calibration_radius); // 1 float EEPROM_READ(delta_tower_angle_trim); // 3 floats - #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS + #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS _FIELD_TEST(x2_endstop_adj); @@ -1472,7 +1472,7 @@ void MarlinSettings::postprocess() { fwretract_settings_t fwretract_settings; EEPROM_READ(fwretract_settings); #endif - #if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT) + #if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) EEPROM_READ(fwretract.autoretract_enabled); #else bool autoretract_enabled; @@ -2066,7 +2066,7 @@ void MarlinSettings::reset() { delta_calibration_radius = DELTA_CALIBRATION_RADIUS; COPY(delta_tower_angle_trim, dta); - #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS + #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if ENABLED(X_DUAL_ENDSTOPS) endstops.x2_endstop_adj = ( @@ -2623,7 +2623,7 @@ void MarlinSettings::reset() { , " Z", LINEAR_UNIT(delta_tower_angle_trim[C_AXIS]) ); - #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS + #elif EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS CONFIG_ECHO_HEADING("Endstop adjustment:"); CONFIG_ECHO_START(); diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index c5185f183..e077045ef 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -36,7 +36,7 @@ #include HAL_PATH(../HAL, endstop_interrupts.h) #endif -#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT) +#if BOTH(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED, SDSUPPORT) #include "printcounter.h" // for print_job_timer #endif @@ -361,7 +361,7 @@ void Endstops::event_handler() { ui.status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP); #endif - #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT) + #if BOTH(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED, SDSUPPORT) if (planner.abort_on_endstop_hit) { card.stopSDPrint(); quickstop_stepper(); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index ce780b153..4eb675ddb 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -47,7 +47,7 @@ #include "../feature/bedlevel/bedlevel.h" #endif -#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) +#if EITHER(ULTRA_LCD, EXTENSIBLE_UI) #include "../lcd/ultralcd.h" #endif @@ -964,7 +964,7 @@ void clean_up_after_endstop_or_probe_move() { void prepare_move_to_destination() { apply_motion_limits(destination); - #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE) + #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) if (!DEBUGGING(DRYRUN)) { if (destination[E_AXIS] != current_position[E_AXIS]) { @@ -1025,7 +1025,7 @@ bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool if (zz) SERIAL_CHAR('Z'); SERIAL_ECHOLNPGM(" " MSG_FIRST); - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) ui.status_printf_P(0, PSTR(MSG_HOME " %s%s%s " MSG_FIRST), xx ? MSG_X : "", yy ? MSG_Y : "", zz ? MSG_Z : ""); #endif return true; diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index fbe6ca7e1..14c700245 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -128,7 +128,7 @@ float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step #endif #endif #if HAS_CLASSIC_JERK - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) float Planner::max_jerk[XYZ]; // (mm/s^2) M205 XYZ - The largest speed change requiring no acceleration. #else float Planner::max_jerk[XYZE]; // (mm/s^2) M205 XYZE - The largest speed change requiring no acceleration. @@ -1751,7 +1751,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, SERIAL_ECHOLNPGM(" steps)"); //*/ - #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE) + #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) if (de) { #if ENABLED(PREVENT_COLD_EXTRUSION) if (thermalManager.tooColdToExtrude(extruder)) { @@ -2104,7 +2104,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, const uint8_t moves_queued = nonbusy_movesplanned(); // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill - #if ENABLED(SLOWDOWN) || ENABLED(ULTRA_LCD) || defined(XY_FREQUENCY_LIMIT) + #if EITHER(SLOWDOWN, ULTRA_LCD) || defined(XY_FREQUENCY_LIMIT) // Segment time im micro seconds uint32_t segment_time_us = LROUND(1000000.0f / inverse_secs); #endif @@ -2172,7 +2172,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Calculate and limit speed in mm/sec for each axis float current_speed[NUM_AXIS], speed_factor = 1.0f; // factor <1 decreases speed LOOP_XYZE(i) { - #if ENABLED(MIXING_EXTRUDER) && ENABLED(RETRACT_SYNC_MIXING) + #if BOTH(MIXING_EXTRUDER, RETRACT_SYNC_MIXING) // In worst case, only one extruder running, no change is needed. // In best case, all extruders run the same amount, we can divide by MIXING_STEPPERS float delta_mm_i = 0; @@ -2485,7 +2485,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, float safe_speed = nominal_speed; uint8_t limited = 0; - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) LOOP_XYZ(i) #else LOOP_XYZE(i) @@ -2522,7 +2522,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Now limit the jerk in all axes. const float smaller_speed_factor = vmax_junction / previous_nominal_speed; - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) LOOP_XYZ(axis) #else LOOP_XYZE(axis) @@ -2893,7 +2893,7 @@ void Planner::reset_acceleration_rates() { if (AXIS_CONDITION) NOLESS(highest_rate, max_acceleration_steps_per_s2[i]); } cutoff_long = 4294967295UL / highest_rate; // 0xFFFFFFFFUL - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) recalculate_max_e_jerk(); #endif } diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 44be1413c..a95c3f260 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -159,7 +159,7 @@ typedef struct block_t { } block_t; -#define HAS_POSITION_FLOAT (ENABLED(LIN_ADVANCE) || ENABLED(SCARA_FEEDRATE_SCALING) || ENABLED(GRADIENT_MIX)) +#define HAS_POSITION_FLOAT ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX) #define BLOCK_MOD(n) ((n)&(BLOCK_BUFFER_SIZE-1)) @@ -253,7 +253,7 @@ class Planner { #if HAS_CLASSIC_JERK static float max_jerk[ - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) XYZ // (mm/s^2) M205 XYZ - The largest speed change requiring no acceleration. #else XYZE // (mm/s^2) M205 XYZE - The largest speed change requiring no acceleration. @@ -861,7 +861,7 @@ class Planner { static void autotemp_M104_M109(); #endif - #if ENABLED(JUNCTION_DEVIATION) && ENABLED(LIN_ADVANCE) + #if BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) FORCE_INLINE static void recalculate_max_e_jerk() { #define GET_MAX_E_JERK(N) SQRT(SQRT(0.5) * junction_deviation_mm * (N) * RECIPROCAL(1.0 - SQRT(0.5))) #if ENABLED(DISTINCT_E_FACTORS) diff --git a/Marlin/src/module/printcounter.h b/Marlin/src/module/printcounter.h index cd947f109..089c385e3 100644 --- a/Marlin/src/module/printcounter.h +++ b/Marlin/src/module/printcounter.h @@ -28,7 +28,7 @@ // Print debug messages with M111 S2 //#define DEBUG_PRINTCOUNTER -#if ENABLED(I2C_EEPROM) || ENABLED(SPI_EEPROM) +#if EITHER(I2C_EEPROM, SPI_EEPROM) // round up address to next page boundary (assuming 32 byte pages) #define STATS_EEPROM_ADDRESS 0x40 #else @@ -57,7 +57,7 @@ class PrintCounter: public Stopwatch { private: typedef Stopwatch super; - #if ENABLED(I2C_EEPROM) || ENABLED(SPI_EEPROM) || defined(CPU_32_BIT) + #if EITHER(I2C_EEPROM, SPI_EEPROM) || defined(CPU_32_BIT) typedef uint32_t eeprom_address_t; #else typedef uint16_t eeprom_address_t; diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d7078bdc0..37ee673a9 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -38,7 +38,7 @@ #include "../gcode/gcode.h" #include "../lcd/ultralcd.h" -#if ENABLED(BLTOUCH) || ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(PROBE_TRIGGERED_WHEN_STOWED_TEST) || (QUIET_PROBING && ENABLED(PROBING_STEPPERS_OFF)) +#if ANY(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY, PROBE_TRIGGERED_WHEN_STOWED_TEST) || (QUIET_PROBING && ENABLED(PROBING_STEPPERS_OFF)) #include "../Marlin.h" // for stop(), disable_e_steppers #endif @@ -416,7 +416,7 @@ bool set_probe_deployed(const bool deploy) { if (deploy_stow_condition && unknown_condition) do_probe_raise(MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE)); - #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY) + #if EITHER(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) #if ENABLED(Z_PROBE_SLED) #define _AUE_ARGS true, false, false #else @@ -553,7 +553,7 @@ static bool do_probe_move(const float z, const float fr_mm_s) { // Check to see if the probe was triggered const bool probe_triggered = - #if ENABLED(DELTA) && ENABLED(SENSORLESS_PROBING) + #if BOTH(DELTA, SENSORLESS_PROBING) endstops.trigger_state() & (_BV(X_MIN) | _BV(Y_MIN) | _BV(Z_MIN)) #else TEST(endstops.trigger_state(), diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index eb78cd4c1..ce3141c12 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -153,7 +153,7 @@ bool Stepper::abort_current_block; #if Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN) bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false; #endif -#if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) +#if ENABLED(Z_TRIPLE_ENDSTOPS) || BOTH(Z_STEPPER_AUTO_ALIGN, Z_TRIPLE_STEPPER_DRIVERS) bool Stepper::locked_Z3_motor = false; #endif @@ -1450,7 +1450,7 @@ void Stepper::stepper_pulse_phase_isr() { // Pulse Extruders // Tick the E axis, correct error term and update position - #if ENABLED(LIN_ADVANCE) || ENABLED(MIXING_EXTRUDER) + #if EITHER(LIN_ADVANCE, MIXING_EXTRUDER) delta_error[E_AXIS] += advance_dividend[E_AXIS]; if (delta_error[E_AXIS] >= 0) { count_position[E_AXIS] += count_direction[E_AXIS]; @@ -1679,7 +1679,7 @@ uint32_t Stepper::stepper_block_phase_isr() { * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below) * If DeltaA == DeltaB, the movement is only in the 1st axis (X) */ - #if ENABLED(COREXY) || ENABLED(COREXZ) + #if EITHER(COREXY, COREXZ) #define X_CMP == #else #define X_CMP != @@ -1697,7 +1697,7 @@ uint32_t Stepper::stepper_block_phase_isr() { * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y) * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z) */ - #if ENABLED(COREYX) || ENABLED(COREYZ) + #if EITHER(COREYX, COREYZ) #define Y_CMP == #else #define Y_CMP != @@ -1715,7 +1715,7 @@ uint32_t Stepper::stepper_block_phase_isr() { * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y, already handled above) * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z) */ - #if ENABLED(COREZX) || ENABLED(COREZY) + #if EITHER(COREZX, COREZY) #define Z_CMP == #else #define Z_CMP != @@ -2030,7 +2030,7 @@ void Stepper::init() { #if HAS_X_ENABLE X_ENABLE_INIT; if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH); - #if (ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)) && HAS_X2_ENABLE + #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) && HAS_X2_ENABLE X2_ENABLE_INIT; if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH); #endif @@ -2093,7 +2093,7 @@ void Stepper::init() { // Init Step Pins #if HAS_X_STEP - #if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE) + #if EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) X2_STEP_INIT; X2_STEP_WRITE(INVERT_X_STEP_PIN); #endif @@ -2467,13 +2467,13 @@ void Stepper::report_positions() { if (!initialized) return; LOOP_L_N(i, COUNT(motor_current_setting)) { switch (i) { - #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_X) || PIN_EXISTS(MOTOR_CURRENT_PWM_Y) + #if ANY_PIN(MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y) case 0: #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) case 1: #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) || PIN_EXISTS(MOTOR_CURRENT_PWM_E0) || PIN_EXISTS(MOTOR_CURRENT_PWM_E1) + #if ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_E0, MOTOR_CURRENT_PWM_E1) case 2: #endif digipot_current(i, motor_current_setting[i]); diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 38f17f498..46bc9d706 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -267,7 +267,7 @@ class Stepper { #if Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN) static bool locked_Z_motor, locked_Z2_motor; #endif - #if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) + #if ENABLED(Z_TRIPLE_ENDSTOPS) || BOTH(Z_STEPPER_AUTO_ALIGN, Z_TRIPLE_STEPPER_DRIVERS) static bool locked_Z3_motor; #endif @@ -423,7 +423,7 @@ class Stepper { FORCE_INLINE static void set_z_lock(const bool state) { locked_Z_motor = state; } FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; } #endif - #if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) + #if ENABLED(Z_TRIPLE_ENDSTOPS) || BOTH(Z_STEPPER_AUTO_ALIGN, Z_TRIPLE_STEPPER_DRIVERS) FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; } #endif diff --git a/Marlin/src/module/stepper_indirection.h b/Marlin/src/module/stepper_indirection.h index edff2bad3..147a060fc 100644 --- a/Marlin/src/module/stepper_indirection.h +++ b/Marlin/src/module/stepper_indirection.h @@ -618,7 +618,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( INVERT_E0_DIR); } else { E1_DIR_WRITE( INVERT_E1_DIR); } }while(0) #endif - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(MULTI_NOZZLE_DUPLICATION) + #if EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION) #define NDIR(N) _DUPE(DIR,!INVERT_E##N##_DIR) #define RDIR(N) _DUPE(DIR, INVERT_E##N##_DIR) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 9258ce328..166c585ba 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -33,13 +33,13 @@ #include "../core/language.h" #include "../HAL/shared/Delay.h" -#define MAX6675_SEPARATE_SPI (ENABLED(HEATER_0_USES_MAX6675) || ENABLED(HEATER_1_USES_MAX6675)) && PIN_EXISTS(MAX6675_SCK) && PIN_EXISTS(MAX6675_DO) +#define MAX6675_SEPARATE_SPI EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PIN_EXISTS(MAX6675_SCK, MAX6675_DO) #if MAX6675_SEPARATE_SPI #include "../libs/private_spi.h" #endif -#if ENABLED(BABYSTEPPING) || ENABLED(PID_EXTRUSION_SCALING) +#if EITHER(BABYSTEPPING, PID_EXTRUSION_SCALING) #include "stepper.h" #endif @@ -360,8 +360,8 @@ temp_range_t Temperature::temp_range[HOTENDS] = ARRAY_BY_HOTENDS(sensor_heater_0 #endif #if WATCH_BED || WATCH_HOTENDS - #define HAS_TP_BED (ENABLED(THERMAL_PROTECTION_BED) && ENABLED(PIDTEMPBED)) - #if HAS_TP_BED && ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(PIDTEMP) + #define HAS_TP_BED BOTH(THERMAL_PROTECTION_BED, PIDTEMPBED) + #if HAS_TP_BED && BOTH(THERMAL_PROTECTION_HOTENDS, PIDTEMP) #define GTV(B,H) (heater < 0 ? (B) : (H)) #elif HAS_TP_BED #define GTV(B,H) (B) @@ -913,7 +913,7 @@ void Temperature::manage_heater() { } #endif - #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) static bool last_pause_state; #endif @@ -1004,12 +1004,12 @@ void Temperature::manage_heater() { #if DISABLED(PIDTEMPBED) if (PENDING(ms, next_bed_check_ms) - #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) && paused == last_pause_state #endif ) return; next_bed_check_ms = ms + BED_CHECK_INTERVAL; - #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) last_pause_state = paused; #endif #endif @@ -1334,7 +1334,7 @@ void Temperature::init() { #endif #if MB(RUMBA) - #define _AD(N) (ENABLED(HEATER_##N##_USES_AD595) || ENABLED(HEATER_##N##_USES_AD8495)) + #define _AD(N) (ANY(HEATER_##N##_USES_AD595, HEATER_##N##_USES_AD8495)) #if _AD(0) || _AD(1) || _AD(2) || _AD(3) || _AD(4) || _AD(5) || _AD(BED) || _AD(CHAMBER) // Disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector MCUCR = _BV(JTD); @@ -1342,7 +1342,7 @@ void Temperature::init() { #endif #endif - #if ENABLED(PIDTEMP) && ENABLED(PID_EXTRUSION_SCALING) + #if BOTH(PIDTEMP, PID_EXTRUSION_SCALING) last_e_position = 0; #endif @@ -2743,7 +2743,7 @@ void Temperature::isr() { // #if ENABLED(BABYSTEPPING) - #if ENABLED(BABYSTEP_XY) || ENABLED(I2C_POSITION_ENCODERS) + #if EITHER(BABYSTEP_XY, I2C_POSITION_ENCODERS) LOOP_XYZ(axis) { const int16_t curTodo = babystepsTodo[axis]; // get rid of volatile for performance if (curTodo) { @@ -2942,7 +2942,7 @@ void Temperature::isr() { #endif // AUTO_REPORT_TEMPERATURES - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) void Temperature::set_heating_message(const uint8_t e) { const bool heating = isHeatingHotend(e); #if HOTENDS > 1 diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 8bd5a59ed..20a171850 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -739,7 +739,7 @@ class Temperature { #endif #endif - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) static void set_heating_message(const uint8_t e); #endif @@ -778,9 +778,9 @@ class Temperature { static void updateTemperaturesFromRawValues(); - #define HAS_MAX6675 (ENABLED(HEATER_0_USES_MAX6675) || ENABLED(HEATER_1_USES_MAX6675)) + #define HAS_MAX6675 EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) #if HAS_MAX6675 - #if ENABLED(HEATER_0_USES_MAX6675) && ENABLED(HEATER_1_USES_MAX6675) + #if BOTH(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) #define COUNT_6675 2 #else #define COUNT_6675 1 diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 77a092570..231f2c796 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -49,7 +49,7 @@ #include "../gcode/gcode.h" // for dwell() #endif -#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) || ENABLED(SWITCHING_TOOLHEAD) +#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD) #include "servo.h" #endif @@ -740,7 +740,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n singlenozzle_temp[active_extruder] = thermalManager.temp_hotend[0].target; if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) { thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0); - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) thermalManager.set_heating_message(0); #endif (void)thermalManager.wait_for_hotend(0, false); // Wait for heating or cooling diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index e6a3da33e..19afa1c55 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -874,7 +874,7 @@ #define _EPIN(p,q) __EPIN(p,q) // The X2 axis, if any, should be the next open extruder port -#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS) +#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) #ifndef X2_STEP_PIN #define X2_STEP_PIN _EPIN(E_STEPPERS, STEP) #define X2_DIR_PIN _EPIN(E_STEPPERS, DIR) diff --git a/Marlin/src/pins/pins_3DRAG.h b/Marlin/src/pins/pins_3DRAG.h index 1b2ac3c06..d84edb3c4 100644 --- a/Marlin/src/pins/pins_3DRAG.h +++ b/Marlin/src/pins/pins_3DRAG.h @@ -75,7 +75,7 @@ // // LCD / Controller // -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) +#if BOTH(ULTRA_LCD, NEWPANEL) #undef BEEPER_PIN #undef LCD_PINS_RS @@ -154,7 +154,7 @@ #define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM #define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup! #define SPINDLE_DIR_PIN 48 - #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use + #elif !BOTH(ULTRA_LCD, NEWPANEL) // use expansion header if no LCD in use #define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown! #define SPINDLE_DIR_PIN 17 #endif diff --git a/Marlin/src/pins/pins_ANET_10.h b/Marlin/src/pins/pins_ANET_10.h index fceba0e26..192373834 100644 --- a/Marlin/src/pins/pins_ANET_10.h +++ b/Marlin/src/pins/pins_ANET_10.h @@ -162,7 +162,7 @@ #define LCD_PINS_D6 16 #define LCD_PINS_D7 17 #define ADC_KEYPAD_PIN 1 - #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(ANET_FULL_GRAPHICS_LCD) + #elif EITHER(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD) // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748 diff --git a/Marlin/src/pins/pins_AZTEEG_X3.h b/Marlin/src/pins/pins_AZTEEG_X3.h index 95a0b826e..f86d7ecbc 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/pins_AZTEEG_X3.h @@ -53,7 +53,7 @@ #undef STAT_LED_RED_PIN #undef STAT_LED_BLUE_PIN -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) #undef DOGLCD_A0 #undef DOGLCD_CS @@ -75,7 +75,7 @@ // // Misc // -#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && PIN_EXISTS(STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN +#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT, STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN #undef STAT_LED_RED_PIN #endif diff --git a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h index f5256a72e..ea72af04d 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h @@ -139,7 +139,7 @@ #undef BEEPER_PIN #define BEEPER_PIN 33 -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) #undef SD_DETECT_PIN #define SD_DETECT_PIN 49 // For easy adapter board #undef BEEPER_PIN @@ -152,7 +152,7 @@ // // Misc. Functions // -#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN +#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN #undef DOGLCD_A0 // Steal pin 44 for the case light; if you have a Viki2 and have connected it #define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments // as the wiring diagram uses pin 44 for DOGLCD_A0 @@ -166,7 +166,7 @@ #undef SPINDLE_DIR_PIN #if ENABLED(SPINDLE_LASER_ENABLE) // EXP2 header - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #undef BTN_EN2 #define BTN_EN2 31 // need 7 for the spindle speed PWM #endif diff --git a/Marlin/src/pins/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/pins_AZTEEG_X5_GT.h index a4c7d8254..9de083cff 100755 --- a/Marlin/src/pins/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/pins_AZTEEG_X5_GT.h @@ -112,7 +112,7 @@ // Display // -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_06 #define DOGLCD_CS P0_16 diff --git a/Marlin/src/pins/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/pins_AZTEEG_X5_MINI_WIFI.h index 45b6c8166..b71cf0e53 100644 --- a/Marlin/src/pins/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/pins_AZTEEG_X5_MINI_WIFI.h @@ -143,7 +143,7 @@ //#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4 #endif - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) //#define LCD_SCREEN_ROT_180 #define BEEPER_PIN P1_30 // (37) may change if cable changes diff --git a/Marlin/src/pins/pins_BEAST.h b/Marlin/src/pins/pins_BEAST.h index f52c68fb8..5f9709a17 100644 --- a/Marlin/src/pins/pins_BEAST.h +++ b/Marlin/src/pins/pins_BEAST.h @@ -126,7 +126,7 @@ #define LCD_PINS_RS 49 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_ENABLE PD2 #define LCD_PINS_D4 PB12 @@ -193,7 +193,7 @@ #define LCD_SDSS 53 #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define BEEPER_PIN 33 diff --git a/Marlin/src/pins/pins_CHITU3D.h b/Marlin/src/pins/pins_CHITU3D.h index b80a0aa26..db094c76c 100644 --- a/Marlin/src/pins/pins_CHITU3D.h +++ b/Marlin/src/pins/pins_CHITU3D.h @@ -125,7 +125,7 @@ #define LCD_PINS_RS 49 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_ENABLE PD2 #define LCD_PINS_D4 PB12 @@ -192,7 +192,7 @@ #define LCD_SDSS 53 #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define BEEPER_PIN 33 diff --git a/Marlin/src/pins/pins_FELIX2.h b/Marlin/src/pins/pins_FELIX2.h index eecb64863..615629d9c 100644 --- a/Marlin/src/pins/pins_FELIX2.h +++ b/Marlin/src/pins/pins_FELIX2.h @@ -49,7 +49,7 @@ // // LCD / Controller // -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) +#if BOTH(ULTRA_LCD, NEWPANEL) #define SD_DETECT_PIN 6 diff --git a/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h index 00681b086..30de2e3ff 100644 --- a/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h @@ -35,9 +35,7 @@ #define FIL_RUNOUT_PIN 22 #endif -#define GREEDY_PANEL ( ENABLED(PANEL_ONE) || ENABLED(VIKI2) \ - || ENABLED(miniVIKI) || ENABLED(MINIPANEL) \ - || ENABLED(REPRAPWORLD_KEYPAD) ) +#define GREEDY_PANEL ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/pins_MEGATRONICS.h b/Marlin/src/pins/pins_MEGATRONICS.h index 8d18fa4c4..c5eea8dcc 100644 --- a/Marlin/src/pins/pins_MEGATRONICS.h +++ b/Marlin/src/pins/pins_MEGATRONICS.h @@ -104,7 +104,7 @@ // #define BEEPER_PIN 33 -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) +#if BOTH(ULTRA_LCD, NEWPANEL) #define LCD_PINS_RS 16 #define LCD_PINS_ENABLE 17 diff --git a/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h index 810d08c5a..115f86b1e 100644 --- a/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h @@ -175,9 +175,9 @@ #endif #ifndef FAN_PIN - #if ENABLED(IS_EFB) || ENABLED(IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN EX2_HEAT_PIN - #elif ENABLED(IS_EEF) || ENABLED(IS_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN HBP_PIN #else #define FAN_PIN EXTRA_FET_PIN diff --git a/Marlin/src/pins/pins_MKS_GEN_13.h b/Marlin/src/pins/pins_MKS_GEN_13.h index fb982e689..39ec95db5 100644 --- a/Marlin/src/pins/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/pins_MKS_GEN_13.h @@ -56,7 +56,7 @@ // // LCD / Controller // -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) /** * VIKI2 Has two groups of wires with... * diff --git a/Marlin/src/pins/pins_MKS_SBASE.h b/Marlin/src/pins/pins_MKS_SBASE.h index e8fce8188..19f9e5acf 100644 --- a/Marlin/src/pins/pins_MKS_SBASE.h +++ b/Marlin/src/pins/pins_MKS_SBASE.h @@ -245,7 +245,7 @@ #define LCD_SDSS P0_28 // EXP2.4 #define LCD_PINS_ENABLE P0_18 // EXP1.3 #define LCD_PINS_D4 P0_15 // EXP1.5 - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #define DOGLCD_SCK SCK_PIN #define DOGLCD_MOSI MOSI_PIN #endif diff --git a/Marlin/src/pins/pins_PRINTRBOARD.h b/Marlin/src/pins/pins_PRINTRBOARD.h index 5e6ba8442..1587c0fa3 100644 --- a/Marlin/src/pins/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/pins_PRINTRBOARD.h @@ -123,7 +123,7 @@ // // LCD / Controller // -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) +#if BOTH(ULTRA_LCD, NEWPANEL) #define LCD_PINS_RS 9 // E1 JP11-11 #define LCD_PINS_ENABLE 8 // E0 JP11-10 @@ -132,7 +132,7 @@ #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 diff --git a/Marlin/src/pins/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/pins_PRINTRBOARD_REVF.h index 33a199508..fb338e8d1 100644 --- a/Marlin/src/pins/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/pins_PRINTRBOARD_REVF.h @@ -208,7 +208,7 @@ #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 diff --git a/Marlin/src/pins/pins_RAMBO.h b/Marlin/src/pins/pins_RAMBO.h index ab72cee7e..95ce03393 100644 --- a/Marlin/src/pins/pins_RAMBO.h +++ b/Marlin/src/pins/pins_RAMBO.h @@ -175,7 +175,7 @@ #define LCD_PINS_D6 74 #define LCD_PINS_D7 75 - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 44 // NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the // beeper/buzzer is connected to pin 33; however, the pin used in the diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 1c9b183c7..48a82b438 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -199,13 +199,13 @@ #endif #ifndef FAN_PIN - #if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN RAMPS_D9_PIN - #elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN RAMPS_D8_PIN - #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define FAN_PIN 4 // IO pin. Buffer needed - #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") + #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed + #define FAN_PIN 4 // IO pin. Buffer needed + #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #define FAN_PIN RAMPS_D9_PIN #endif #endif @@ -232,8 +232,7 @@ #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN) #if NUM_SERVOS <= 1 // try to use servo connector first #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM - #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ - && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 + #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM #endif #endif @@ -246,8 +245,7 @@ #define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 5 - #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ - && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 + #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 65 @@ -347,7 +345,7 @@ #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 #define LCD_PINS_ENABLE 42 @@ -379,7 +377,7 @@ #else - #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) + #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC 25 // Set as output on init #define LCD_PINS_RS 27 // Pull low for 1s to init // DOGM SPI LCD Support @@ -463,7 +461,7 @@ #define LCD_SDSS SDSS #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define DOGLCD_CS 45 #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/pins_RAMPS_DUO.h b/Marlin/src/pins/pins_RAMPS_DUO.h index 987d8ba3e..7573ef404 100644 --- a/Marlin/src/pins/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/pins_RAMPS_DUO.h @@ -76,7 +76,7 @@ // #if ENABLED(ULTRA_LCD) - #if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #if BOTH(NEWPANEL, PANEL_ONE) #undef LCD_PINS_D4 #define LCD_PINS_D4 68 diff --git a/Marlin/src/pins/pins_RAMPS_FD_V1.h b/Marlin/src/pins/pins_RAMPS_FD_V1.h index e89720486..45ad8d165 100644 --- a/Marlin/src/pins/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/pins_RAMPS_FD_V1.h @@ -161,7 +161,7 @@ #define DOGLCD_A0 27 #endif - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #define DOGLCD_A0 16 #define KILL_PIN 51 #define STAT_LED_BLUE_PIN 29 diff --git a/Marlin/src/pins/pins_RAMPS_LINUX.h b/Marlin/src/pins/pins_RAMPS_LINUX.h index 495412c7c..695e640e3 100644 --- a/Marlin/src/pins/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/pins_RAMPS_LINUX.h @@ -220,8 +220,7 @@ #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN) #if NUM_SERVOS <= 1 // try to use servo connector first #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM - #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ - && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 + #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM #endif #endif @@ -234,8 +233,7 @@ #define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 5 - #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ - && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 + #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 65 @@ -335,7 +333,7 @@ #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 #define LCD_PINS_ENABLE 42 @@ -367,7 +365,7 @@ #else - #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) + #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC 25 // Set as output on init #define LCD_PINS_RS 27 // Pull low for 1s to init // DOGM SPI LCD Support @@ -451,7 +449,7 @@ #define LCD_SDSS SDSS #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define DOGLCD_CS 45 #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/pins_RAMPS_PLUS.h b/Marlin/src/pins/pins_RAMPS_PLUS.h index f8f109f1b..cadda16e1 100644 --- a/Marlin/src/pins/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/pins_RAMPS_PLUS.h @@ -73,7 +73,7 @@ #undef E0_CS_PIN #undef E1_CS_PIN -#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && (DISABLED(NEWPANEL) || DISABLED(PANEL_ONE)) && DISABLED(CR10_STOCKDISPLAY) +#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && !BOTH(NEWPANEL, PANEL_ONE) && DISABLED(CR10_STOCKDISPLAY) #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/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 85eb991a1..be39fab8c 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -173,13 +173,13 @@ #endif #ifndef FAN_PIN - #if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN RAMPS_D9_PIN - #elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN RAMPS_D8_PIN - #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define FAN_PIN P1_18 // (4) IO pin. Buffer needed - #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") + #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed + #define FAN_PIN P1_18 // (4) IO pin. Buffer needed + #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #define FAN_PIN RAMPS_D9_PIN #endif #endif @@ -293,7 +293,7 @@ //#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4 #endif - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) // #define LCD_SCREEN_ROT_180 #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 diff --git a/Marlin/src/pins/pins_RUMBA.h b/Marlin/src/pins/pins_RUMBA.h index dbba7f447..d7ce1c211 100644 --- a/Marlin/src/pins/pins_RUMBA.h +++ b/Marlin/src/pins/pins_RUMBA.h @@ -167,7 +167,7 @@ // // LCD / Controller // -#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) +#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC 38 // Set as output on init #define LCD_PINS_RS 41 // Pull low for 1s to init // DOGM SPI LCD Support diff --git a/Marlin/src/pins/pins_RURAMPS4D_11.h b/Marlin/src/pins/pins_RURAMPS4D_11.h index fd50e7ef1..1416704e7 100644 --- a/Marlin/src/pins/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/pins_RURAMPS4D_11.h @@ -202,7 +202,7 @@ // #if ENABLED(ULTRA_LCD) - #if ENABLED(RADDS_DISPLAY) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER) #define BEEPER_PIN 62 diff --git a/Marlin/src/pins/pins_RURAMPS4D_13.h b/Marlin/src/pins/pins_RURAMPS4D_13.h index 5f23846db..ec3d68622 100644 --- a/Marlin/src/pins/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/pins_RURAMPS4D_13.h @@ -188,7 +188,7 @@ // #if ENABLED(ULTRA_LCD) - #if ENABLED(RADDS_DISPLAY) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER) #define BEEPER_PIN 62 diff --git a/Marlin/src/pins/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/pins_SANGUINOLOLU_11.h index 60c29ffa9..fb80edc1f 100644 --- a/Marlin/src/pins/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/pins_SANGUINOLOLU_11.h @@ -137,7 +137,7 @@ #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #endif -#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header +#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available #endif @@ -277,7 +277,7 @@ // M3/M4/M5 - Spindle/Laser Control // #if ENABLED(SPINDLE_LASER_ENABLE) - #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header + #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header #define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM diff --git a/Marlin/src/pins/pins_SAV_MKI.h b/Marlin/src/pins/pins_SAV_MKI.h index dc57d7b9f..c4744c69b 100644 --- a/Marlin/src/pins/pins_SAV_MKI.h +++ b/Marlin/src/pins/pins_SAV_MKI.h @@ -161,7 +161,7 @@ #define SR_CLK_PIN EXT_AUX_SCL_D0 #endif -#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD) +#if EITHER(SAV_3DLCD, SAV_3DGLCD) #define BTN_EN1 EXT_AUX_A1_IO #define BTN_EN2 EXT_AUX_A0_IO diff --git a/Marlin/src/pins/pins_SCOOVO_X9H.h b/Marlin/src/pins/pins_SCOOVO_X9H.h index b99829b7a..95c1a5885 100644 --- a/Marlin/src/pins/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/pins_SCOOVO_X9H.h @@ -144,7 +144,7 @@ #define HOME_PIN BTN_HOME -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 44 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 70 diff --git a/Marlin/src/pins/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/pins_SMOOTHIEBOARD.h index ba632835b..d6c4a129e 100644 --- a/Marlin/src/pins/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/pins_SMOOTHIEBOARD.h @@ -95,7 +95,7 @@ // // LCD / Controller // -#if ENABLED(VIKI2) || ENABLED(miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_11 diff --git a/Marlin/src/pins/pins_STM32F1R.h b/Marlin/src/pins/pins_STM32F1R.h index 9a5ceb4b9..0e124f5c5 100644 --- a/Marlin/src/pins/pins_STM32F1R.h +++ b/Marlin/src/pins/pins_STM32F1R.h @@ -105,7 +105,7 @@ #define LCD_PINS_RS 49 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_ENABLE PD2 #define LCD_PINS_D4 PB12 @@ -172,7 +172,7 @@ #define LCD_SDSS 53 #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define BEEPER_PIN 33 diff --git a/Marlin/src/pins/pins_STM3R_MINI.h b/Marlin/src/pins/pins_STM3R_MINI.h index cd322a90d..2b5c6c3a4 100644 --- a/Marlin/src/pins/pins_STM3R_MINI.h +++ b/Marlin/src/pins/pins_STM3R_MINI.h @@ -120,7 +120,7 @@ #define LCD_PINS_RS 49 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #elif BOTH(NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_ENABLE PD2 #define LCD_PINS_D4 PB12 @@ -187,7 +187,7 @@ #define LCD_SDSS 53 #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define BEEPER_PIN 33 diff --git a/Marlin/src/pins/pins_TEENSYLU.h b/Marlin/src/pins/pins_TEENSYLU.h index 618ee60c2..d60233da5 100755 --- a/Marlin/src/pins/pins_TEENSYLU.h +++ b/Marlin/src/pins/pins_TEENSYLU.h @@ -140,7 +140,7 @@ // // LCD / Controller // -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) +#if BOTH(ULTRA_LCD, NEWPANEL) #define BEEPER_PIN -1 diff --git a/Marlin/src/pins/pins_TRIGORILLA_14.h b/Marlin/src/pins/pins_TRIGORILLA_14.h index 3d062816c..7d231b32d 100644 --- a/Marlin/src/pins/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/pins_TRIGORILLA_14.h @@ -74,14 +74,14 @@ #if 0 && ENABLED(ULTRA_LCD) // LCD Display output pins - #if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) + #if BOTH(NEWPANEL, PANEL_ONE) #undef LCD_PINS_D6 #define LCD_PINS_D6 57 #endif // LCD Display input pins #if ENABLED(NEWPANEL) - #if ENABLED(VIKI2) || ENABLED(miniVIKI) + #if ANY(VIKI2, miniVIKI) #undef DOGLCD_A0 #define DOGLCD_A0 23 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) diff --git a/Marlin/src/pins/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/pins_ULTIMAKER_OLD.h index c383d3308..44e14354d 100644 --- a/Marlin/src/pins/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/pins_ULTIMAKER_OLD.h @@ -144,14 +144,15 @@ // // LCD / Controller // -#if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3) +#if ANY(board_rev_1_0, board_rev_1_1_TO_1_3) #define LCD_PINS_RS 24 #define LCD_PINS_ENABLE 22 #define LCD_PINS_D4 36 #define LCD_PINS_D5 34 #define LCD_PINS_D6 32 #define LCD_PINS_D7 30 -#elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD) + +#elif ENABLED(board_rev_1_5, ULTRA_LCD) #define BEEPER_PIN 18 diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index e39f880c1..1ffc6f6db 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -367,7 +367,7 @@ // Chip Select and Digital Micro-stepping // -#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS) +#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) #if PIN_EXISTS(X2_CS) #define _X2_CS X2_CS_PIN, #else diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index fe05beedb..67b901f96 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -900,12 +900,10 @@ void CardReader::setroot() { } else { sort_order[0] = 0; - #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) + #if BOTH(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) #if ENABLED(SDSORT_DYNAMIC_RAM) sortnames = new char*[1]; - #if ENABLED(SDSORT_CACHE_NAMES) - sortshort = new char*[1]; - #endif + sortshort = new char*[1]; isDir = new uint8_t[1]; #endif getfilename(0); @@ -975,7 +973,7 @@ void CardReader::printingHasFinished() { presort(); #endif - #if (ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)) && ENABLED(LCD_SET_PROGRESS_MANUALLY) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) && ENABLED(LCD_SET_PROGRESS_MANUALLY) ui.progress_bar_percent = 0; #endif diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 44a698bd5..9faf05057 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -25,7 +25,7 @@ #if ENABLED(SDSUPPORT) -#define SD_RESORT ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_DYNAMIC_RAM) +#define SD_RESORT BOTH(SDCARD_SORT_ALPHA, SDSORT_DYNAMIC_RAM) #define MAX_DIR_DEPTH 10 // Maximum folder depth #define MAXDIRNAMELENGTH 8 // DOS folder name size @@ -173,7 +173,7 @@ private: static uint8_t sort_order[SDSORT_LIMIT]; #endif - #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) + #if BOTH(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) #define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1) #else #define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp index 9a98797f5..8de27cb31 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp @@ -31,7 +31,7 @@ #include "Sd2Card_FlashDrive.h" -#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) +#if EITHER(ULTRA_LCD, EXTENSIBLE_UI) #include "../../lcd/ultralcd.h" #endif @@ -63,7 +63,7 @@ void Sd2Card::idle() { SERIAL_ECHOPGM("Starting USB host..."); if (!usb.start()) { SERIAL_ECHOPGM(" Failed. Retrying in 2s."); - #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #if EITHER(ULTRA_LCD, EXTENSIBLE_UI) LCD_MESSAGEPGM("USB start failed"); #endif state = USB_HOST_DELAY_INIT; diff --git a/config/default/Configuration.h b/config/default/Configuration.h index bd6793935..950b85cb2 100644 --- a/config/default/Configuration.h +++ b/config/default/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h index 442cd948f..497f283fd 100644 --- a/config/default/Configuration_adv.h +++ b/config/default/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/3DFabXYZ/Migbot/Configuration.h b/config/examples/3DFabXYZ/Migbot/Configuration.h index a97d186a2..6d00fac1c 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1021,7 +1021,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1114,7 +1114,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1140,7 +1140,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1209,7 +1209,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2068,7 +2068,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 50 #define RGB_LED_G_PIN 51 #define RGB_LED_B_PIN 52 @@ -2097,7 +2097,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index 5c4f80b55..a03d79d7d 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/AlephObjects/TAZ4/Configuration.h b/config/examples/AlephObjects/TAZ4/Configuration.h index 99567bc80..7c3f9d875 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/config/examples/AlephObjects/TAZ4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1035,7 +1035,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1128,7 +1128,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1154,7 +1154,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1223,7 +1223,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2057,7 +2057,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2086,7 +2086,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 384626a7f..82215b5b2 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/AliExpress/CL-260/Configuration.h b/config/examples/AliExpress/CL-260/Configuration.h index 8611261b8..7de1f1576 100644 --- a/config/examples/AliExpress/CL-260/Configuration.h +++ b/config/examples/AliExpress/CL-260/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AliExpress/UM2pExt/Configuration.h b/config/examples/AliExpress/UM2pExt/Configuration.h index fcdcbe081..44f8abdda 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration.h +++ b/config/examples/AliExpress/UM2pExt/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1026,7 +1026,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1119,7 +1119,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1145,7 +1145,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1214,7 +1214,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2048,7 +2048,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2077,7 +2077,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h index f57222f5d..5f8ab1bda 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h +++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Anet/A2/Configuration.h b/config/examples/Anet/A2/Configuration.h index b0b327d63..4a2dd0469 100644 --- a/config/examples/Anet/A2/Configuration.h +++ b/config/examples/Anet/A2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2039,7 +2039,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2068,7 +2068,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h index f30d102d0..53db57d31 100644 --- a/config/examples/Anet/A2/Configuration_adv.h +++ b/config/examples/Anet/A2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Anet/A2plus/Configuration.h b/config/examples/Anet/A2plus/Configuration.h index 866ddcc48..04c05d15c 100644 --- a/config/examples/Anet/A2plus/Configuration.h +++ b/config/examples/Anet/A2plus/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2039,7 +2039,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2068,7 +2068,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h index f30d102d0..53db57d31 100644 --- a/config/examples/Anet/A2plus/Configuration_adv.h +++ b/config/examples/Anet/A2plus/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Anet/A6/Configuration.h b/config/examples/Anet/A6/Configuration.h index 1024d9b92..52a09783a 100644 --- a/config/examples/Anet/A6/Configuration.h +++ b/config/examples/Anet/A6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1129,7 +1129,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1222,7 +1222,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1248,7 +1248,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1341,7 +1341,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2191,7 +2191,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2220,7 +2220,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h index ba9fec0ca..191596379 100644 --- a/config/examples/Anet/A6/Configuration_adv.h +++ b/config/examples/Anet/A6/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Anet/A8/Configuration.h b/config/examples/Anet/A8/Configuration.h index 959e0652f..44fcf8f1a 100644 --- a/config/examples/Anet/A8/Configuration.h +++ b/config/examples/Anet/A8/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1028,7 +1028,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1121,7 +1121,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1147,7 +1147,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1216,7 +1216,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 20 #define PROBE_PT_1_Y 160 #define PROBE_PT_2_X 20 @@ -2052,7 +2052,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2081,7 +2081,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h index 349c1f6e5..19b6e99c9 100644 --- a/config/examples/Anet/A8/Configuration_adv.h +++ b/config/examples/Anet/A8/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/AnyCubic/i3/Configuration.h b/config/examples/AnyCubic/i3/Configuration.h index 2df15008f..6d8b983ce 100644 --- a/config/examples/AnyCubic/i3/Configuration.h +++ b/config/examples/AnyCubic/i3/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2047,7 +2047,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2076,7 +2076,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h index 26f9dca62..1957d0920 100644 --- a/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/config/examples/AnyCubic/i3/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/ArmEd/Configuration.h b/config/examples/ArmEd/Configuration.h index f3cd04677..7aa30de62 100644 --- a/config/examples/ArmEd/Configuration.h +++ b/config/examples/ArmEd/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1016,7 +1016,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1109,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1135,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1204,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2038,7 +2038,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2067,7 +2067,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h index e71935900..4a67dc441 100644 --- a/config/examples/ArmEd/Configuration_adv.h +++ b/config/examples/ArmEd/Configuration_adv.h @@ -82,7 +82,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1039,7 +1039,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1658,7 +1658,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Azteeg/X5GT/Configuration.h b/config/examples/Azteeg/X5GT/Configuration.h index df37346b3..8e5193706 100644 --- a/config/examples/Azteeg/X5GT/Configuration.h +++ b/config/examples/Azteeg/X5GT/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration.h b/config/examples/BIBO/TouchX/cyclops/Configuration.h index 08a1a83f1..80b9975cb 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 6c66eaf24..771da9e36 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/BIBO/TouchX/default/Configuration.h b/config/examples/BIBO/TouchX/default/Configuration.h index ab23313ab..744f5832d 100644 --- a/config/examples/BIBO/TouchX/default/Configuration.h +++ b/config/examples/BIBO/TouchX/default/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h index 91c46b8ba..fe95712cd 100644 --- a/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/BQ/Hephestos/Configuration.h b/config/examples/BQ/Hephestos/Configuration.h index cbe651775..7270c7b81 100644 --- a/config/examples/BQ/Hephestos/Configuration.h +++ b/config/examples/BQ/Hephestos/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1003,7 +1003,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1096,7 +1096,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1122,7 +1122,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1191,7 +1191,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2025,7 +2025,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2054,7 +2054,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h index 2667d8282..ea625f87f 100644 --- a/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/config/examples/BQ/Hephestos/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/BQ/Hephestos_2/Configuration.h b/config/examples/BQ/Hephestos_2/Configuration.h index 3fcfb44cc..bd670d5a1 100644 --- a/config/examples/BQ/Hephestos_2/Configuration.h +++ b/config/examples/BQ/Hephestos_2/Configuration.h @@ -226,7 +226,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1016,7 +1016,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h index 0d806ce29..fd4cf95b0 100644 --- a/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1043,7 +1043,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1662,7 +1662,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/BQ/WITBOX/Configuration.h b/config/examples/BQ/WITBOX/Configuration.h index a49f8b116..4c6746eeb 100644 --- a/config/examples/BQ/WITBOX/Configuration.h +++ b/config/examples/BQ/WITBOX/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1003,7 +1003,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1096,7 +1096,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1122,7 +1122,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1191,7 +1191,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2025,7 +2025,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2054,7 +2054,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h index 2667d8282..ea625f87f 100644 --- a/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/config/examples/BQ/WITBOX/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Cartesio/Configuration.h b/config/examples/Cartesio/Configuration.h index d40d312df..45e7bdebe 100644 --- a/config/examples/Cartesio/Configuration.h +++ b/config/examples/Cartesio/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1014,7 +1014,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1107,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1133,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1202,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2036,7 +2036,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2065,7 +2065,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h index dd9f656c3..5163666fe 100644 --- a/config/examples/Cartesio/Configuration_adv.h +++ b/config/examples/Cartesio/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/CR-10/Configuration.h b/config/examples/Creality/CR-10/Configuration.h index da13fee92..8a84b5907 100644 --- a/config/examples/Creality/CR-10/Configuration.h +++ b/config/examples/Creality/CR-10/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2047,7 +2047,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2076,7 +2076,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10/Configuration_adv.h b/config/examples/Creality/CR-10/Configuration_adv.h index e2b6bd732..9cfd93bf9 100644 --- a/config/examples/Creality/CR-10/Configuration_adv.h +++ b/config/examples/Creality/CR-10/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/CR-10S/Configuration.h b/config/examples/Creality/CR-10S/Configuration.h index 5da2cffb3..0fafda51e 100644 --- a/config/examples/Creality/CR-10S/Configuration.h +++ b/config/examples/Creality/CR-10S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1109,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1135,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1204,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2038,7 +2038,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2067,7 +2067,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10S/Configuration_adv.h b/config/examples/Creality/CR-10S/Configuration_adv.h index 79b138134..94b8bef2d 100644 --- a/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/CR-10_5S/Configuration.h b/config/examples/Creality/CR-10_5S/Configuration.h index 8d447a385..b5c01d2f3 100644 --- a/config/examples/Creality/CR-10_5S/Configuration.h +++ b/config/examples/Creality/CR-10_5S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1017,7 +1017,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1111,7 +1111,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1137,7 +1137,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1206,7 +1206,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2040,7 +2040,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2069,7 +2069,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10_5S/Configuration_adv.h b/config/examples/Creality/CR-10_5S/Configuration_adv.h index 6ce29b4b7..e041b782e 100644 --- a/config/examples/Creality/CR-10_5S/Configuration_adv.h +++ b/config/examples/Creality/CR-10_5S/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/CR-10mini/Configuration.h b/config/examples/Creality/CR-10mini/Configuration.h index aae4b8d17..120e9689a 100644 --- a/config/examples/Creality/CR-10mini/Configuration.h +++ b/config/examples/Creality/CR-10mini/Configuration.h @@ -227,7 +227,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1034,7 +1034,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1127,7 +1127,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1153,7 +1153,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1222,7 +1222,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2056,7 +2056,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2085,7 +2085,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10mini/Configuration_adv.h b/config/examples/Creality/CR-10mini/Configuration_adv.h index aede1f20a..cf4351d3c 100644 --- a/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/CR-8/Configuration.h b/config/examples/Creality/CR-8/Configuration.h index 0010f5a06..3596d0a34 100644 --- a/config/examples/Creality/CR-8/Configuration.h +++ b/config/examples/Creality/CR-8/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2047,7 +2047,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2076,7 +2076,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h index 821590c29..c82966e52 100644 --- a/config/examples/Creality/CR-8/Configuration_adv.h +++ b/config/examples/Creality/CR-8/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/Ender-2/Configuration.h b/config/examples/Creality/Ender-2/Configuration.h index 154c9ce8c..a9ac37fcf 100644 --- a/config/examples/Creality/Ender-2/Configuration.h +++ b/config/examples/Creality/Ender-2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h index 2f0f77dea..efffbdfef 100644 --- a/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/config/examples/Creality/Ender-2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/Ender-3/Configuration.h b/config/examples/Creality/Ender-3/Configuration.h index ead6464b8..85792f570 100644 --- a/config/examples/Creality/Ender-3/Configuration.h +++ b/config/examples/Creality/Ender-3/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-3/Configuration_adv.h b/config/examples/Creality/Ender-3/Configuration_adv.h index 68313a81d..ac7936a38 100644 --- a/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Creality/Ender-4/Configuration.h b/config/examples/Creality/Ender-4/Configuration.h index 3aef1a939..853783836 100644 --- a/config/examples/Creality/Ender-4/Configuration.h +++ b/config/examples/Creality/Ender-4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2047,7 +2047,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2076,7 +2076,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h index 5b5a0a16d..82e859393 100644 --- a/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/config/examples/Creality/Ender-4/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Einstart-S/Configuration.h b/config/examples/Einstart-S/Configuration.h index 7546bcbd6..d05e31c68 100644 --- a/config/examples/Einstart-S/Configuration.h +++ b/config/examples/Einstart-S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2043,7 +2043,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2072,7 +2072,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h index 3bdda0ee6..bb2bb279e 100644 --- a/config/examples/Einstart-S/Configuration_adv.h +++ b/config/examples/Einstart-S/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Felix/Configuration.h b/config/examples/Felix/Configuration.h index 6d819f1f1..0456360a0 100644 --- a/config/examples/Felix/Configuration.h +++ b/config/examples/Felix/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -997,7 +997,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1090,7 +1090,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1116,7 +1116,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1185,7 +1185,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2019,7 +2019,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2048,7 +2048,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Felix/Configuration_adv.h b/config/examples/Felix/Configuration_adv.h index 0f5542dff..13c73ddaf 100644 --- a/config/examples/Felix/Configuration_adv.h +++ b/config/examples/Felix/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Felix/DUAL/Configuration.h b/config/examples/Felix/DUAL/Configuration.h index 2a99cbc60..9f21a1e5e 100644 --- a/config/examples/Felix/DUAL/Configuration.h +++ b/config/examples/Felix/DUAL/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -997,7 +997,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1090,7 +1090,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1116,7 +1116,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1185,7 +1185,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2019,7 +2019,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2048,7 +2048,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FlashForge/CreatorPro/Configuration.h b/config/examples/FlashForge/CreatorPro/Configuration.h index 77f3db9b6..c945cddf4 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration.h +++ b/config/examples/FlashForge/CreatorPro/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1008,7 +1008,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1101,7 +1101,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1127,7 +1127,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1196,7 +1196,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2029,7 +2029,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2058,7 +2058,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h index 0698f4b9a..e31c0e338 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1034,7 +1034,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1653,7 +1653,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/FolgerTech/i3-2020/Configuration.h b/config/examples/FolgerTech/i3-2020/Configuration.h index 5af058965..1d6327714 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/config/examples/FolgerTech/i3-2020/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1021,7 +1021,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1114,7 +1114,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1140,7 +1140,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1209,7 +1209,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 45 #define PROBE_PT_1_Y 170 #define PROBE_PT_2_X 45 @@ -2043,7 +2043,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2072,7 +2072,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 90c32f88a..17bd12c63 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Formbot/Raptor/Configuration.h b/config/examples/Formbot/Raptor/Configuration.h index c0b5dd37c..fc882cc77 100644 --- a/config/examples/Formbot/Raptor/Configuration.h +++ b/config/examples/Formbot/Raptor/Configuration.h @@ -259,7 +259,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1110,7 +1110,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1210,7 +1210,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1236,7 +1236,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 6 @@ -1308,7 +1308,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 50 #define PROBE_PT_1_Y 350 #define PROBE_PT_2_X 50 @@ -2142,7 +2142,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2171,7 +2171,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h index cbfc2be6b..6a85b0631 100644 --- a/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/config/examples/Formbot/Raptor/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Formbot/T_Rex_2+/Configuration.h b/config/examples/Formbot/T_Rex_2+/Configuration.h index a3bc74103..818eba706 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration.h @@ -221,7 +221,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1045,7 +1045,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1138,7 +1138,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1164,7 +1164,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1238,7 +1238,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 35 #define PROBE_PT_1_Y 365 #define PROBE_PT_2_X 35 @@ -2072,7 +2072,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2101,7 +2101,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index 7068e6ef6..8eb75177d 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1039,7 +1039,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X 4 //#define MESH_MIN_Y MESH_INSET @@ -1658,7 +1658,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Formbot/T_Rex_3/Configuration.h b/config/examples/Formbot/T_Rex_3/Configuration.h index ed9465290..183553e8f 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration.h +++ b/config/examples/Formbot/T_Rex_3/Configuration.h @@ -222,7 +222,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1035,7 +1035,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1133,7 +1133,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1159,7 +1159,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1228,7 +1228,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 35 #define PROBE_PT_1_Y 365 #define PROBE_PT_2_X 35 @@ -2065,7 +2065,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2094,7 +2094,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h index f02a878fe..f7df09cf2 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1039,7 +1039,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X 4 //#define MESH_MIN_Y MESH_INSET @@ -1658,7 +1658,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Geeetech/A10M/Configuration.h b/config/examples/Geeetech/A10M/Configuration.h index d5faaf012..ffadf82dd 100644 --- a/config/examples/Geeetech/A10M/Configuration.h +++ b/config/examples/Geeetech/A10M/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -998,7 +998,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1093,7 +1093,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1119,7 +1119,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1188,7 +1188,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2022,7 +2022,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2051,7 +2051,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/A10M/Configuration_adv.h b/config/examples/Geeetech/A10M/Configuration_adv.h index 35566a281..3465f6706 100644 --- a/config/examples/Geeetech/A10M/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Geeetech/A20M/Configuration.h b/config/examples/Geeetech/A20M/Configuration.h index 6bb085ea5..a0abc9532 100644 --- a/config/examples/Geeetech/A20M/Configuration.h +++ b/config/examples/Geeetech/A20M/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -998,7 +998,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1093,7 +1093,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1119,7 +1119,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1188,7 +1188,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2026,7 +2026,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2055,7 +2055,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h index 85cb8f621..084356746 100644 --- a/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/config/examples/Geeetech/A20M/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Geeetech/GT2560/Configuration.h b/config/examples/Geeetech/GT2560/Configuration.h index 7937be6b8..33e0ba2c4 100644 --- a/config/examples/Geeetech/GT2560/Configuration.h +++ b/config/examples/Geeetech/GT2560/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1030,7 +1030,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1123,7 +1123,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1149,7 +1149,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1218,7 +1218,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2052,7 +2052,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2081,7 +2081,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif @@ -2110,7 +2110,7 @@ /** * Customize common displays for GT2560 */ -#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) +#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, MKS_MINI_12864) #define SDSUPPORT // Force SD Card support on for these displays #elif DISABLED(LIGHTWEIGHT_UI) #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20. diff --git a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 2dbef1d34..526cbc7e6 100644 --- a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/MeCreator2/Configuration.h b/config/examples/Geeetech/MeCreator2/Configuration.h index 90a01126d..a92998ca0 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration.h +++ b/config/examples/Geeetech/MeCreator2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1022,7 +1022,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1115,7 +1115,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1141,7 +1141,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1210,7 +1210,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2044,7 +2044,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2073,7 +2073,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h index d4259c53a..1021dde79 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 6896b383b..193057069 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1031,7 +1031,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1124,7 +1124,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1150,7 +1150,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1219,7 +1219,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2053,7 +2053,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2082,7 +2082,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index c4c8173e3..57d150f1c 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1030,7 +1030,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1123,7 +1123,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1149,7 +1149,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1218,7 +1218,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2052,7 +2052,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2081,7 +2081,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 9da7890f1..62e73582d 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 66ca52a3f..da002e808 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index dac3f2267..d9658c145 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 66ca52a3f..da002e808 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Infitary/i3-M508/Configuration.h b/config/examples/Infitary/i3-M508/Configuration.h index 81d77f4ad..c31779838 100644 --- a/config/examples/Infitary/i3-M508/Configuration.h +++ b/config/examples/Infitary/i3-M508/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h index 3993812a3..b0389b147 100644 --- a/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/JGAurora/A5/Configuration.h b/config/examples/JGAurora/A5/Configuration.h index 7f84802df..1b17d4a28 100644 --- a/config/examples/JGAurora/A5/Configuration.h +++ b/config/examples/JGAurora/A5/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1027,7 +1027,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1120,7 +1120,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1146,7 +1146,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1215,7 +1215,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2049,7 +2049,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2078,7 +2078,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h index 16cb99d10..f94812a27 100644 --- a/config/examples/JGAurora/A5/Configuration_adv.h +++ b/config/examples/JGAurora/A5/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/MakerParts/Configuration.h b/config/examples/MakerParts/Configuration.h index 2703b3f2e..81346aa0e 100644 --- a/config/examples/MakerParts/Configuration.h +++ b/config/examples/MakerParts/Configuration.h @@ -238,7 +238,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1035,7 +1035,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1128,7 +1128,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1154,7 +1154,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1223,7 +1223,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2057,7 +2057,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2086,7 +2086,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h index 8b111860c..93633a195 100644 --- a/config/examples/MakerParts/Configuration_adv.h +++ b/config/examples/MakerParts/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Malyan/M150/Configuration.h b/config/examples/Malyan/M150/Configuration.h index 8c9da0433..c97cd67af 100644 --- a/config/examples/Malyan/M150/Configuration.h +++ b/config/examples/Malyan/M150/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1039,7 +1039,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1136,7 +1136,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1162,7 +1162,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1231,7 +1231,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 50 #define PROBE_PT_1_Y 150 #define PROBE_PT_2_X 50 @@ -2065,7 +2065,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2094,7 +2094,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h index e8dd07fa1..9eb1d5877 100644 --- a/config/examples/Malyan/M150/Configuration_adv.h +++ b/config/examples/Malyan/M150/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Malyan/M200/Configuration.h b/config/examples/Malyan/M200/Configuration.h index 8795313ed..e502dc46d 100644 --- a/config/examples/Malyan/M200/Configuration.h +++ b/config/examples/Malyan/M200/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1014,7 +1014,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1107,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1133,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1202,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2036,7 +2036,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2065,7 +2065,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h index dc1402c40..08b362d96 100644 --- a/config/examples/Malyan/M200/Configuration_adv.h +++ b/config/examples/Malyan/M200/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Micromake/C1/basic/Configuration.h b/config/examples/Micromake/C1/basic/Configuration.h index 48dbc0d76..6954ffa3f 100644 --- a/config/examples/Micromake/C1/basic/Configuration.h +++ b/config/examples/Micromake/C1/basic/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Micromake/C1/enhanced/Configuration.h b/config/examples/Micromake/C1/enhanced/Configuration.h index 7f100de73..6bc176857 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/config/examples/Micromake/C1/enhanced/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 442cd948f..497f283fd 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Mks/Robin/Configuration.h b/config/examples/Mks/Robin/Configuration.h index ba3e2814f..1d2659279 100644 --- a/config/examples/Mks/Robin/Configuration.h +++ b/config/examples/Mks/Robin/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1016,7 +1016,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1109,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1135,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1204,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2039,7 +2039,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2068,7 +2068,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Mks/Robin/Configuration_adv.h b/config/examples/Mks/Robin/Configuration_adv.h index ec4fdb7c2..39e53fde6 100644 --- a/config/examples/Mks/Robin/Configuration_adv.h +++ b/config/examples/Mks/Robin/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Mks/Sbase/Configuration.h b/config/examples/Mks/Sbase/Configuration.h index 1c0f9e7a3..17a645c04 100644 --- a/config/examples/Mks/Sbase/Configuration.h +++ b/config/examples/Mks/Sbase/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h index 83383a4aa..9174cf2ed 100644 --- a/config/examples/Mks/Sbase/Configuration_adv.h +++ b/config/examples/Mks/Sbase/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1036,7 +1036,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1655,7 +1655,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Printrbot/PrintrboardG2/Configuration.h b/config/examples/Printrbot/PrintrboardG2/Configuration.h index 16c79597d..307477f79 100644 --- a/config/examples/Printrbot/PrintrboardG2/Configuration.h +++ b/config/examples/Printrbot/PrintrboardG2/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1023,7 +1023,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1116,7 +1116,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1142,7 +1142,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1211,7 +1211,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2045,7 +2045,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2074,7 +2074,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RapideLite/RL200/Configuration.h b/config/examples/RapideLite/RL200/Configuration.h index 68c69d1e7..1f6152ebd 100644 --- a/config/examples/RapideLite/RL200/Configuration.h +++ b/config/examples/RapideLite/RL200/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h index 23554df61..3bc84557d 100644 --- a/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/config/examples/RapideLite/RL200/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/RepRapPro/Huxley/Configuration.h b/config/examples/RepRapPro/Huxley/Configuration.h index 72984acb9..2ac0509cd 100644 --- a/config/examples/RepRapPro/Huxley/Configuration.h +++ b/config/examples/RepRapPro/Huxley/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1064,7 +1064,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1157,7 +1157,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1183,7 +1183,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1252,7 +1252,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2086,7 +2086,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2115,7 +2115,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RepRapWorld/Megatronics/Configuration.h b/config/examples/RepRapWorld/Megatronics/Configuration.h index e931fd299..841336af5 100644 --- a/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RigidBot/Configuration.h b/config/examples/RigidBot/Configuration.h index 26cfbc9c4..f6cb9d3ea 100644 --- a/config/examples/RigidBot/Configuration.h +++ b/config/examples/RigidBot/Configuration.h @@ -221,7 +221,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1013,7 +1013,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1106,7 +1106,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1132,7 +1132,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1201,7 +1201,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h index c9ea2d442..da57a1939 100644 --- a/config/examples/RigidBot/Configuration_adv.h +++ b/config/examples/RigidBot/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/SCARA/Configuration.h b/config/examples/SCARA/Configuration.h index e639d8277..a7dd893df 100644 --- a/config/examples/SCARA/Configuration.h +++ b/config/examples/SCARA/Configuration.h @@ -70,7 +70,7 @@ #define MORGAN_SCARA //#define MAKERARM_SCARA -#if ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA) +#if EITHER(MORGAN_SCARA, MAKERARM_SCARA) //#define DEBUG_SCARA_KINEMATICS #define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly @@ -249,7 +249,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1028,7 +1028,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1121,7 +1121,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1147,7 +1147,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1216,7 +1216,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2050,7 +2050,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2079,7 +2079,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/SCARA/Configuration_adv.h b/config/examples/SCARA/Configuration_adv.h index c1da974fa..5a42a0de7 100644 --- a/config/examples/SCARA/Configuration_adv.h +++ b/config/examples/SCARA/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/STM32F10/Configuration.h b/config/examples/STM32F10/Configuration.h index a7bdafde1..edd12f914 100644 --- a/config/examples/STM32F10/Configuration.h +++ b/config/examples/STM32F10/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1017,7 +1017,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1110,7 +1110,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1136,7 +1136,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1205,7 +1205,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2039,7 +2039,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2068,7 +2068,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/STM32F4/Configuration.h b/config/examples/STM32F4/Configuration.h index 643124171..7b117984d 100644 --- a/config/examples/STM32F4/Configuration.h +++ b/config/examples/STM32F4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Sanguinololu/Configuration.h b/config/examples/Sanguinololu/Configuration.h index 2be54c57b..7b12e1b0c 100644 --- a/config/examples/Sanguinololu/Configuration.h +++ b/config/examples/Sanguinololu/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1046,7 +1046,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1139,7 +1139,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1165,7 +1165,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1234,7 +1234,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2068,7 +2068,7 @@ #define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 11 #define RGB_LED_G_PIN 10 #define RGB_LED_B_PIN 17 @@ -2097,7 +2097,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Sanguinololu/Configuration_adv.h b/config/examples/Sanguinololu/Configuration_adv.h index 640a1e4a1..c331365c6 100644 --- a/config/examples/Sanguinololu/Configuration_adv.h +++ b/config/examples/Sanguinololu/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/TheBorg/Configuration.h b/config/examples/TheBorg/Configuration.h index 761d41458..91064ea4a 100644 --- a/config/examples/TheBorg/Configuration.h +++ b/config/examples/TheBorg/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/TheBorg/Configuration_adv.h b/config/examples/TheBorg/Configuration_adv.h index 168bee37b..64141a797 100644 --- a/config/examples/TheBorg/Configuration_adv.h +++ b/config/examples/TheBorg/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/TinyBoy2/Configuration.h b/config/examples/TinyBoy2/Configuration.h index 8fa082e30..c9a07ed64 100644 --- a/config/examples/TinyBoy2/Configuration.h +++ b/config/examples/TinyBoy2/Configuration.h @@ -240,7 +240,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1071,7 +1071,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1164,7 +1164,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1190,7 +1190,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1259,7 +1259,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2093,7 +2093,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2122,7 +2122,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h index ff48061ff..c5f2c00d1 100644 --- a/config/examples/TinyBoy2/Configuration_adv.h +++ b/config/examples/TinyBoy2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Tronxy/X1/Configuration.h b/config/examples/Tronxy/X1/Configuration.h index 8cbd6e73c..76d92dc41 100644 --- a/config/examples/Tronxy/X1/Configuration.h +++ b/config/examples/Tronxy/X1/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X3A/Configuration.h b/config/examples/Tronxy/X3A/Configuration.h index b5f6e2e3e..8f90631de 100644 --- a/config/examples/Tronxy/X3A/Configuration.h +++ b/config/examples/Tronxy/X3A/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1019,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2041,7 +2041,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2070,7 +2070,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h index da113278b..ef0f2ce31 100644 --- a/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/config/examples/Tronxy/X3A/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Tronxy/X5S-2E/Configuration.h b/config/examples/Tronxy/X5S-2E/Configuration.h index f049da373..cc8fe1c7e 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration.h +++ b/config/examples/Tronxy/X5S-2E/Configuration.h @@ -220,7 +220,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1036,7 +1036,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1129,7 +1129,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1155,7 +1155,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1224,7 +1224,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2058,7 +2058,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2087,7 +2087,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X5S-2E/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Configuration_adv.h index aa9fb3da9..6eed1e10e 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Tronxy/X5S/Configuration.h b/config/examples/Tronxy/X5S/Configuration.h index da25bbb69..9ae37dce1 100644 --- a/config/examples/Tronxy/X5S/Configuration.h +++ b/config/examples/Tronxy/X5S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1014,7 +1014,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1107,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1133,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1202,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2036,7 +2036,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2065,7 +2065,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/XY100/Configuration.h b/config/examples/Tronxy/XY100/Configuration.h index dd5e9b6c1..fd80e6739 100644 --- a/config/examples/Tronxy/XY100/Configuration.h +++ b/config/examples/Tronxy/XY100/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1026,7 +1026,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1119,7 +1119,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1145,7 +1145,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1214,7 +1214,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2048,7 +2048,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2077,7 +2077,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim1/Configuration.h b/config/examples/UltiMachine/Archim1/Configuration.h index 1f3bdab79..89bb87be8 100644 --- a/config/examples/UltiMachine/Archim1/Configuration.h +++ b/config/examples/UltiMachine/Archim1/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h index b3a5dcbad..d1ea41660 100644 --- a/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/UltiMachine/Archim2/Configuration.h b/config/examples/UltiMachine/Archim2/Configuration.h index 99dc6ecd2..a30f84940 100644 --- a/config/examples/UltiMachine/Archim2/Configuration.h +++ b/config/examples/UltiMachine/Archim2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h index e7df3a08d..4537f4ec4 100644 --- a/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/VORONDesign/Configuration.h b/config/examples/VORONDesign/Configuration.h index b3949cca2..e71cc3035 100644 --- a/config/examples/VORONDesign/Configuration.h +++ b/config/examples/VORONDesign/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1024,7 +1024,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1117,7 +1117,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1143,7 +1143,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1212,7 +1212,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2046,7 +2046,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2075,7 +2075,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h index 5982dc166..84e7daf37 100644 --- a/config/examples/VORONDesign/Configuration_adv.h +++ b/config/examples/VORONDesign/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Velleman/K8200/Configuration.h b/config/examples/Velleman/K8200/Configuration.h index 6dbcbc1c7..3542c4f45 100644 --- a/config/examples/Velleman/K8200/Configuration.h +++ b/config/examples/Velleman/K8200/Configuration.h @@ -238,7 +238,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1045,7 +1045,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1138,7 +1138,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1164,7 +1164,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1233,7 +1233,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2072,7 +2072,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2101,7 +2101,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h index 4717dabd0..7f02fa5d4 100644 --- a/config/examples/Velleman/K8200/Configuration_adv.h +++ b/config/examples/Velleman/K8200/Configuration_adv.h @@ -88,7 +88,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 8 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1048,7 +1048,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1667,7 +1667,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Velleman/K8400/Configuration.h b/config/examples/Velleman/K8400/Configuration.h index 152e82b1f..8ba594638 100644 --- a/config/examples/Velleman/K8400/Configuration.h +++ b/config/examples/Velleman/K8400/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100 //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) // Pin defines for the RGB LED Add-on. #define RGB_LED_R_PIN 41 #define RGB_LED_G_PIN 40 @@ -2067,7 +2067,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Velleman/K8400/Configuration_adv.h b/config/examples/Velleman/K8400/Configuration_adv.h index b88593d8c..eb7f20e3a 100644 --- a/config/examples/Velleman/K8400/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Velleman/K8400/Dual-head/Configuration.h b/config/examples/Velleman/K8400/Dual-head/Configuration.h index 9971e75d1..788d408e9 100644 --- a/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100 //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) // Pin defines for the RGB LED Add-on. #define RGB_LED_R_PIN 41 #define RGB_LED_G_PIN 40 @@ -2067,7 +2067,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/WASP/PowerWASP/Configuration.h b/config/examples/WASP/PowerWASP/Configuration.h index 8e8d0f9da..ee838ff16 100644 --- a/config/examples/WASP/PowerWASP/Configuration.h +++ b/config/examples/WASP/PowerWASP/Configuration.h @@ -237,7 +237,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1034,7 +1034,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1127,7 +1127,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1153,7 +1153,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1222,7 +1222,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2056,7 +2056,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2085,7 +2085,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h index 4205b4a66..feb5095ca 100644 --- a/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/Wanhao/Duplicator 6/Configuration.h b/config/examples/Wanhao/Duplicator 6/Configuration.h index 97c136516..99bebfc16 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1025,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2050,7 +2050,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2079,7 +2079,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index cbb6bdabc..503edbd50 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/adafruit/ST7565/Configuration.h b/config/examples/adafruit/ST7565/Configuration.h index ad1b5507b..5f4b13200 100644 --- a/config/examples/adafruit/ST7565/Configuration.h +++ b/config/examples/adafruit/ST7565/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1015,7 +1015,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1108,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1134,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1203,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2037,7 +2037,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2066,7 +2066,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Anycubic/Kossel/Configuration.h b/config/examples/delta/Anycubic/Kossel/Configuration.h index cd44da1a6..2c1fe91d3 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration.h @@ -233,7 +233,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -638,7 +638,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - MIN_PROBE_EDGE // (mm) // Set the steprate for papertest probing @@ -1203,7 +1203,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1298,7 +1298,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1324,7 +1324,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1394,7 +1394,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X -40 #define PROBE_PT_1_Y 60 #define PROBE_PT_2_X 40 @@ -2227,7 +2227,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2256,7 +2256,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index f0e61e0dd..89eeced8f 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index ab5baa3c0..50f40a49a 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -605,7 +605,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // (mm) // Set the steprate for papertest probing @@ -1143,7 +1143,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1236,7 +1236,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1262,7 +1262,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1332,7 +1332,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2165,7 +2165,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2194,7 +2194,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index a583068de..b9dc2faeb 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/FLSUN/kossel/Configuration.h b/config/examples/delta/FLSUN/kossel/Configuration.h index 516e52b68..2216516bf 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/config/examples/delta/FLSUN/kossel/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -605,7 +605,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 7 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 63 // (mm) // Set the steprate for papertest probing @@ -1142,7 +1142,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1235,7 +1235,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1261,7 +1261,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1331,7 +1331,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2164,7 +2164,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2193,7 +2193,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h index a583068de..b9dc2faeb 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 949183938..bb7288acb 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -605,7 +605,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // (mm) // Set the steprate for papertest probing @@ -1142,7 +1142,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1235,7 +1235,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1261,7 +1261,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1331,7 +1331,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2164,7 +2164,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2193,7 +2193,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 9f8c92589..6ec96b262 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration.h b/config/examples/delta/Geeetech/Rostock 301/Configuration.h index 58171ba2a..48beb424a 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -595,7 +595,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -1133,7 +1133,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1226,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1252,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1322,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2155,7 +2155,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2184,7 +2184,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 9f8c92589..6ec96b262 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/Hatchbox_Alpha/Configuration.h b/config/examples/delta/Hatchbox_Alpha/Configuration.h index 1674933b0..89bc6fcd1 100644 --- a/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -610,7 +610,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -1145,7 +1145,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1238,7 +1238,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1264,7 +1264,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1334,7 +1334,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X -116 #define PROBE_PT_1_Y -67.5 #define PROBE_PT_2_X 116 @@ -2167,7 +2167,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2196,7 +2196,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/MKS/SBASE/Configuration.h b/config/examples/delta/MKS/SBASE/Configuration.h index dc59c17c7..11f0cd89d 100644 --- a/config/examples/delta/MKS/SBASE/Configuration.h +++ b/config/examples/delta/MKS/SBASE/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -595,7 +595,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -1130,7 +1130,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1223,7 +1223,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1249,7 +1249,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1319,7 +1319,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2152,7 +2152,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2181,7 +2181,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h index d51093dfb..459e9a585 100644 --- a/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/Tevo Little Monster/Configuration.h b/config/examples/delta/Tevo Little Monster/Configuration.h index 88c4dc9dd..4e59729aa 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration.h +++ b/config/examples/delta/Tevo Little Monster/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -599,7 +599,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 7 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 140 // (mm) // Set the steprate for papertest probing @@ -1134,7 +1134,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1227,7 +1227,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1253,7 +1253,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1323,7 +1323,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2156,7 +2156,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2185,7 +2185,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h index eb53c8ea4..5435f50a5 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/generic/Configuration.h b/config/examples/delta/generic/Configuration.h index 745e09c61..e6847d577 100644 --- a/config/examples/delta/generic/Configuration.h +++ b/config/examples/delta/generic/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -595,7 +595,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -1130,7 +1130,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1223,7 +1223,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1249,7 +1249,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1319,7 +1319,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2152,7 +2152,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2181,7 +2181,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h index 9f8c92589..6ec96b262 100644 --- a/config/examples/delta/generic/Configuration_adv.h +++ b/config/examples/delta/generic/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/kossel_mini/Configuration.h b/config/examples/delta/kossel_mini/Configuration.h index 54cfb1359..0237ca01c 100644 --- a/config/examples/delta/kossel_mini/Configuration.h +++ b/config/examples/delta/kossel_mini/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -595,7 +595,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 78.0 // (mm) // Set the steprate for papertest probing @@ -1132,7 +1132,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1225,7 +1225,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1251,7 +1251,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1321,7 +1321,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2154,7 +2154,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2183,7 +2183,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_mini/Configuration_adv.h b/config/examples/delta/kossel_mini/Configuration_adv.h index 8ec47cf10..58e29e248 100644 --- a/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/kossel_mini/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1036,7 +1036,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1655,7 +1655,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/delta/kossel_pro/Configuration.h b/config/examples/delta/kossel_pro/Configuration.h index e0604fc49..5db974b94 100644 --- a/config/examples/delta/kossel_pro/Configuration.h +++ b/config/examples/delta/kossel_pro/Configuration.h @@ -222,7 +222,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -581,7 +581,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 110.0 // (mm) // Set the steprate for papertest probing @@ -1133,7 +1133,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1226,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1252,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1322,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2155,7 +2155,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2184,7 +2184,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_xl/Configuration.h b/config/examples/delta/kossel_xl/Configuration.h index a7a921f96..b72a088bb 100644 --- a/config/examples/delta/kossel_xl/Configuration.h +++ b/config/examples/delta/kossel_xl/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -599,7 +599,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -1133,7 +1133,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1226,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1252,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1322,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2155,7 +2155,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2184,7 +2184,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h index 40255faef..9ed05be63 100644 --- a/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/config/examples/delta/kossel_xl/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1037,7 +1037,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1656,7 +1656,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/gCreate/gMax1.5+/Configuration.h b/config/examples/gCreate/gMax1.5+/Configuration.h index e00289c0d..5cc6ecda2 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/config/examples/gCreate/gMax1.5+/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1029,7 +1029,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1122,7 +1122,7 @@ */ #define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1148,7 +1148,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1217,7 +1217,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 53 #define PROBE_PT_1_Y 323 #define PROBE_PT_2_X 53 @@ -2051,7 +2051,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2080,7 +2080,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 2e4e1f240..5cb7cd6e0 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 3 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/makibox/Configuration.h b/config/examples/makibox/Configuration.h index c012c76c9..a5660234b 100644 --- a/config/examples/makibox/Configuration.h +++ b/config/examples/makibox/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1018,7 +1018,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1111,7 +1111,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1137,7 +1137,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1206,7 +1206,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2040,7 +2040,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2069,7 +2069,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h index 6593cb145..80fe7522d 100644 --- a/config/examples/makibox/Configuration_adv.h +++ b/config/examples/makibox/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/stm32f103ret6/Configuration.h b/config/examples/stm32f103ret6/Configuration.h index c2394f456..bbed86965 100644 --- a/config/examples/stm32f103ret6/Configuration.h +++ b/config/examples/stm32f103ret6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1017,7 +1017,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1110,7 +1110,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1136,7 +1136,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1205,7 +1205,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2039,7 +2039,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2068,7 +2068,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/tvrrug/Round2/Configuration.h b/config/examples/tvrrug/Round2/Configuration.h index f6fc50004..a7d942ce6 100644 --- a/config/examples/tvrrug/Round2/Configuration.h +++ b/config/examples/tvrrug/Round2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1010,7 +1010,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1103,7 +1103,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1129,7 +1129,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1198,7 +1198,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2032,7 +2032,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2061,7 +2061,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h index 437f60f45..9c7f2a0f2 100644 --- a/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/config/examples/tvrrug/Round2/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1035,7 +1035,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1654,7 +1654,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 diff --git a/config/examples/wt150/Configuration.h b/config/examples/wt150/Configuration.h index 6f2a0c09a..1045671d1 100644 --- a/config/examples/wt150/Configuration.h +++ b/config/examples/wt150/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -1020,7 +1020,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1113,7 +1113,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1139,7 +1139,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1208,7 +1208,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -2042,7 +2042,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 @@ -2071,7 +2071,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/wt150/Configuration_adv.h b/config/examples/wt150/Configuration_adv.h index a332b2a23..c38d19b80 100644 --- a/config/examples/wt150/Configuration_adv.h +++ b/config/examples/wt150/Configuration_adv.h @@ -78,7 +78,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -1036,7 +1036,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1655,7 +1655,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8