1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

♻️ EITHER/BOTH => ANY/ALL

This commit is contained in:
Scott Lahteine 2024-01-30 17:16:33 -06:00
parent fa85e9e066
commit 2e4b037dbf
296 changed files with 864 additions and 864 deletions

View File

@ -283,7 +283,7 @@
static constexpr bool DROPPED_RX = false;
static constexpr bool RX_FRAMING_ERRORS = false;
static constexpr bool MAX_RX_QUEUED = false;
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
static constexpr bool RX_OVERRUNS = ALL(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
};
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;

View File

@ -23,7 +23,7 @@
#include "../../inc/MarlinConfig.h"
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
/**
* PersistentStore for Arduino-style EEPROM interface

View File

@ -95,11 +95,11 @@
/**
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
*/
#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
#if ALL(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif
#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
#if ALL(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
#endif

View File

@ -42,7 +42,7 @@
// Public functions
// ------------------------
#if EITHER(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------
// Software SPI

View File

@ -23,6 +23,6 @@
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -165,7 +165,7 @@ void MarlinHAL::init_board() {
}
void MarlinHAL::idletask() {
#if BOTH(WIFISUPPORT, OTASUPPORT)
#if ALL(WIFISUPPORT, OTASUPPORT)
OTA_handle();
#endif
TERN_(ESP3D_WIFISUPPORT, esp3dlib.idletask());

View File

@ -40,7 +40,7 @@
#error "TMC220x Software Serial is not supported on ESP32."
#endif
#if BOTH(WIFISUPPORT, ESP3D_WIFISUPPORT)
#if ALL(WIFISUPPORT, ESP3D_WIFISUPPORT)
#error "Only enable one WiFi option, either WIFISUPPORT or ESP3D_WIFISUPPORT."
#endif
@ -52,7 +52,7 @@
#error "FAST_PWM_FAN is not available on TinyBee."
#endif
#if BOTH(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING)
#if ALL(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING)
#error "BABYSTEPPING on I2S stream requires INTEGRATED_BABYSTEPPING."
#endif
@ -60,10 +60,10 @@
#error "PULLDOWN pin mode is not available on ESP32 boards."
#endif
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
#if ALL(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
#error "I2S stream is currently incompatible with LIN_ADVANCE."
#endif
#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC)
#if ALL(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC)
#error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution."
#endif

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(WIFISUPPORT, OTASUPPORT)
#if ALL(WIFISUPPORT, OTASUPPORT)
#include <WiFi.h>
#include <ESPmDNS.h>

View File

@ -23,7 +23,7 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(WIFISUPPORT, WEBSUPPORT)
#if ALL(WIFISUPPORT, WEBSUPPORT)
#include "../../core/serial.h"

View File

@ -25,7 +25,7 @@
#include "../../inc/MarlinConfig.h"
#if EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#include <U8glib-HAL.h>
#include "../shared/HAL_SPI.h"
@ -101,6 +101,6 @@ uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
return 1;
}
#endif // EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#endif // ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#endif // ARDUINO_ARCH_ESP32

View File

@ -23,7 +23,7 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(WIFISUPPORT, WEBSUPPORT)
#if ALL(WIFISUPPORT, WEBSUPPORT)
#include "../../inc/MarlinConfig.h"

View File

@ -24,7 +24,7 @@
#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#if ALL(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define 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 required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use

View File

@ -23,7 +23,7 @@
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -23,7 +23,7 @@
#include "../../core/macros.h"
#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#if ALL(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define 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 required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use

View File

@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
static uint8_t SPI_speed = 0;
static void u8g_sw_spi_HAL_LPC1768_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864)
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@ -160,7 +160,7 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
break;
case U8G_COM_MSG_CHIP_SELECT:
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active

View File

@ -24,7 +24,7 @@
#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#if ALL(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define 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 required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use

View File

@ -131,7 +131,7 @@ static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const u
}
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864)
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
#else
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
@ -159,7 +159,7 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
break;
case U8G_COM_MSG_CHIP_SELECT:
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active

View File

@ -45,7 +45,7 @@
// Public functions
// --------------------------------------------------------------------------
#if EITHER(SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------
// Software SPI

View File

@ -28,6 +28,6 @@
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -44,7 +44,7 @@
// Public functions
// --------------------------------------------------------------------------
#if EITHER(SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------
// Software SPI

View File

@ -23,6 +23,6 @@
#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -21,7 +21,7 @@
*/
#pragma once
#if BOTH(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE)
#if ALL(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE)
#define HAS_SD_HOST_DRIVE 1
#endif

View File

@ -24,7 +24,7 @@
// If no real or emulated EEPROM selected, fall back to SD emulation
#if USE_FALLBACK_EEPROM
#define SDCARD_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h"
#if BOTH(USE_OTG_USB_HOST, USBHOST)
#if ALL(USE_OTG_USB_HOST, USBHOST)
#include "usb_host.h"
#include "../shared/Marduino.h"

View File

@ -224,7 +224,7 @@ void MarlinHAL::init() {
#endif
#if HAS_SD_HOST_DRIVE
MSC_SD_init();
#elif BOTH(SERIAL_USB, EMERGENCY_PARSER)
#elif ALL(SERIAL_USB, EMERGENCY_PARSER)
usb_cdcacm_set_hooks(USB_CDCACM_HOOK_RX, my_rx_callback);
#endif
#if PIN_EXISTS(USB_CONNECT)

View File

@ -82,7 +82,7 @@
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)
#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#define NUM_UARTS 5
#else
#define NUM_UARTS 3

View File

@ -116,7 +116,7 @@ constexpr bool serial_handles_emergency(int port) {
#endif
DEFINE_HWSERIAL_MARLIN(MSerial2, 2);
DEFINE_HWSERIAL_MARLIN(MSerial3, 3);
#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
DEFINE_HWSERIAL_UART_MARLIN(MSerial4, 4);
DEFINE_HWSERIAL_UART_MARLIN(MSerial5, 5);
#endif

View File

@ -52,7 +52,7 @@ typedef Serial1Class<MarlinSerial> MSerialT;
extern MSerialT MSerial1;
extern MSerialT MSerial2;
extern MSerialT MSerial3;
#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
extern MSerialT MSerial4;
extern MSerialT MSerial5;
#endif

View File

@ -24,7 +24,7 @@
#include "../../../inc/MarlinConfig.h"
#if BOTH(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI)
#if ALL(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI)
#include <U8glib-HAL.h>
#include "../../shared/HAL_SPI.h"

View File

@ -24,7 +24,7 @@
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
#if USE_FALLBACK_EEPROM
#define SDCARD_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif

View File

@ -98,7 +98,7 @@ static void pwm_details(const pin_t pin) {
timer_dev * const tdev = PIN_MAP[pin].timer_device;
const uint8_t channel = PIN_MAP[pin].timer_channel;
const char num = (
#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
tdev == &timer8 ? '8' :
tdev == &timer5 ? '5' :
#endif

View File

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h" // Allow pins/pins.h to set density
#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY)
#include "sdio.h"

View File

@ -27,7 +27,7 @@
* (bypassing U8G), it will allow the LIGHTWEIGHT_UI to operate.
*/
#if BOTH(HAS_MARLINUI_U8GLIB, LIGHTWEIGHT_UI)
#if ALL(HAS_MARLINUI_U8GLIB, LIGHTWEIGHT_UI)
void ST7920_cs();
void ST7920_ncs();
void ST7920_set_cmd();

View File

@ -22,7 +22,7 @@
*/
#include "../../inc/MarlinConfigPre.h"
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#include "eeprom_api.h"
PersistentStore persistentStore;

View File

@ -194,7 +194,7 @@
#include "feature/runout.h"
#endif
#if EITHER(PROBE_TARE, HAS_Z_SERVO_PROBE)
#if ANY(PROBE_TARE, HAS_Z_SERVO_PROBE)
#include "module/probe.h"
#endif
@ -940,7 +940,7 @@ void minkill(const bool steppers_off/*=false*/) {
TERN_(HAS_SUICIDE, suicide());
#if EITHER(HAS_KILL, SOFT_RESET_ON_KILL)
#if ANY(HAS_KILL, SOFT_RESET_ON_KILL)
// Wait for both KILL and ENC to be released
while (TERN0(HAS_KILL, kill_state()) || TERN0(SOFT_RESET_ON_KILL, ui.button_pressed()))
@ -969,7 +969,7 @@ void stop() {
print_job_timer.stop();
#if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
#if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE)
thermalManager.set_fans_paused(false); // Un-pause fans for safety
#endif
@ -1331,14 +1331,14 @@ void setup() {
#endif
#endif
#if BOTH(SDSUPPORT, SDCARD_EEPROM_EMULATION)
#if ALL(SDSUPPORT, SDCARD_EEPROM_EMULATION)
SETUP_RUN(card.mount()); // Mount media with settings before first_load
#endif
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
// This also updates variables in the planner, elsewhere
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
#if ALL(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
SETUP_RUN(ui.show_bootscreen());
const millis_t bootscreen_ms = millis();
#endif
@ -1413,7 +1413,7 @@ void setup() {
SETUP_RUN(stepper_dac.init());
#endif
#if EITHER(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1
#if ANY(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1
OUT_WRITE(SOL1_PIN, LOW); // OFF
#endif
@ -1621,7 +1621,7 @@ void setup() {
SETUP_RUN(tft_lvgl_init());
#endif
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
#if ALL(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
const millis_t elapsed = millis() - bootscreen_ms;
#if ENABLED(MARLIN_DEV_MODE)
SERIAL_ECHOLNPGM("elapsed=", elapsed);
@ -1633,7 +1633,7 @@ void setup() {
SETUP_RUN(password.lock_machine()); // Will not proceed until correct password provided
#endif
#if BOTH(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) && EITHER(TFT_CLASSIC_UI, TFT_COLOR_UI)
#if ALL(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) && ANY(TFT_CLASSIC_UI, TFT_COLOR_UI)
SETUP_RUN(ui.check_touch_calibration());
#endif
@ -1680,7 +1680,7 @@ void loop() {
queue.advance();
#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
powerManager.checkAutoPowerOff();
#endif

View File

@ -503,7 +503,7 @@
#define STR_W ""
#endif
#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
#if ANY(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
// Custom characters defined in the first 8 characters of the LCD
#define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!

View File

@ -31,7 +31,7 @@
#define BABYSTEP_TICKS ((TEMP_TIMER_RATE) / (BABYSTEPS_PER_SEC))
#endif
#if IS_CORE || EITHER(BABYSTEP_XY, I2C_POSITION_ENCODERS)
#if IS_CORE || ANY(BABYSTEP_XY, I2C_POSITION_ENCODERS)
#define BS_AXIS_IND(A) A
#define BS_AXIS(I) AxisEnum(I)
#else

View File

@ -66,7 +66,7 @@ Backlash backlash;
void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block) {
axis_bits_t changed_dir = last_direction_bits ^ dm;
// Ignore direction change unless steps are taken in that direction
#if DISABLED(CORE_BACKLASH) || EITHER(MARKFORGED_XY, MARKFORGED_YX)
#if DISABLED(CORE_BACKLASH) || ANY(MARKFORGED_XY, MARKFORGED_YX)
if (!da) CBI(changed_dir, X_AXIS);
if (!db) CBI(changed_dir, Y_AXIS);
if (!dc) CBI(changed_dir, Z_AXIS);

View File

@ -27,7 +27,7 @@
#include "bedlevel.h"
#include "../../module/planner.h"
#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY)
#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY)
#include "../../module/motion.h"
#endif
@ -120,7 +120,7 @@ void reset_bed_level() {
TERN_(ABL_PLANAR, planner.bed_level_matrix.set_to_identity());
}
#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING)
#if ANY(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING)
/**
* Enable to produce output in JSON format suitable
@ -188,7 +188,7 @@ void reset_bed_level() {
#endif // AUTO_BED_LEVELING_BILINEAR || MESH_BED_LEVELING
#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY)
#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY)
void _manual_goto_xy(const xy_pos_t &pos) {

View File

@ -23,7 +23,7 @@
#include "../../inc/MarlinConfigPre.h"
#if EITHER(RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28)
#if ANY(RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28)
#define CAN_SET_LEVELING_AFTER_G28 1
#endif
@ -41,7 +41,7 @@ void reset_bed_level();
void set_z_fade_height(const_float_t zfh, const bool do_report=true);
#endif
#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY)
#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY)
void _manual_goto_xy(const xy_pos_t &pos);
#endif
@ -69,7 +69,7 @@ class TemporaryBedLevelingState {
#include "mbl/mesh_bed_leveling.h"
#endif
#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING)
#if ANY(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING)
#include <stdint.h>

View File

@ -44,7 +44,7 @@ void CancelObject::set_active_object(const int8_t obj) {
else
skipping = false;
#if BOTH(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING)
#if ALL(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING)
if (active_object >= 0)
ui.status_printf(0, F(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object));
else

View File

@ -22,7 +22,7 @@
#include "../inc/MarlinConfig.h"
#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#include "cooler.h"
Cooler cooler;

View File

@ -187,13 +187,13 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
switch (response) {
case 0: // "Purge More" button
#if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more)
#endif
break;
case 1: // "Continue" / "Disable Runout" button
#if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // Simulate menu selection
#endif
#if HAS_FILAMENT_SENSOR
@ -209,7 +209,7 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
break;
case PROMPT_PAUSE_RESUME:
#if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT)
#if ALL(ADVANCED_PAUSE_FEATURE, SDSUPPORT)
extern const char M24_STR[];
queue.inject_P(M24_STR);
#endif

View File

@ -30,7 +30,7 @@
#include "leds.h"
#if EITHER(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL)
#if ANY(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL)
#include "../../feature/caselight.h"
#endif
@ -50,7 +50,7 @@
LEDLights leds;
void LEDLights::setup() {
#if EITHER(RGB_LED, RGBW_LED)
#if ANY(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);
@ -121,7 +121,7 @@ void LEDLights::set_color(const LEDColor &incol
#endif
#endif
#if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
#if ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
// Update brightness only if caselight is ON or switching leds off
if (caselight.on || incol.is_off())
#endif
@ -136,7 +136,7 @@ void LEDLights::set_color(const LEDColor &incol
}
#endif
#if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
#if ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
// Update color only if caselight is ON or switching leds off
if (caselight.on || incol.is_off())
#endif
@ -151,7 +151,7 @@ void LEDLights::set_color(const LEDColor &incol
#endif
#if EITHER(RGB_LED, RGBW_LED)
#if ANY(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.
@ -173,7 +173,7 @@ void LEDLights::set_color(const LEDColor &incol
TERN_(PCA9632, PCA9632_set_led_color(incol));
TERN_(PCA9533, PCA9533_set_rgb(incol.r, incol.g, incol.b));
#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS)
#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS)
// Don't update the color when OFF
lights_on = !incol.is_off();
if (lights_on) color = incol;

View File

@ -30,7 +30,7 @@
#include <string.h>
// A white component can be passed
#if EITHER(RGBW_LED, PCA9632_RGBW)
#if ANY(RGBW_LED, PCA9632_RGBW)
#define HAS_WHITE_LED 1
#endif
@ -164,7 +164,7 @@ public:
#if ENABLED(LED_CONTROL_MENU)
static void toggle(); // swap "off" with color
#endif
#if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0
#if ANY(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0
static void update() { set_color(color); }
#endif

View File

@ -30,7 +30,7 @@
#include "leds.h"
#if EITHER(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST)
#if ANY(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST)
#include "../../core/utility.h"
#endif

View File

@ -58,7 +58,7 @@
#define MULTIPLE_NEOPIXEL_TYPES 1
#endif
#if EITHER(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES)
#if ANY(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES)
#define CONJOINED_NEOPIXEL 1
#endif

View File

@ -42,7 +42,7 @@ int_fast8_t Mixer::runner = 0;
mixer_comp_t Mixer::s_color[MIXING_STEPPERS];
mixer_accu_t Mixer::accu[MIXING_STEPPERS] = { 0 };
#if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX)
#if ANY(HAS_DUAL_MIXING, GRADIENT_MIX)
mixer_perc_t Mixer::mix[MIXING_STEPPERS];
#endif
@ -138,7 +138,7 @@ void Mixer::init() {
color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK;
#endif
#if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX)
#if ANY(HAS_DUAL_MIXING, GRADIENT_MIX)
update_mix_from_vtool();
#endif

View File

@ -122,7 +122,7 @@ class Mixer {
MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i];
}
#if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX)
#if ANY(HAS_DUAL_MIXING, GRADIENT_MIX)
static mixer_perc_t mix[MIXING_STEPPERS]; // Scratch array for the Mix in proportion to 100

View File

@ -140,7 +140,7 @@ uint8_t MMU2::get_current_tool() {
return extruder == MMU2_NO_TOOL ? -1 : extruder;
}
#if EITHER(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR)
#if ANY(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR)
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)
#endif

View File

@ -210,7 +210,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
while (wait_for_user) {
impatient_beep(max_beep_count);
#if BOTH(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
#if ALL(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
#if MULTI_FILAMENT_SENSOR
#define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
switch (active_extruder) {
@ -284,7 +284,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
// Show "Purge More" / "Resume" menu and wait for reply
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = false;
#if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
#else
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
@ -326,18 +326,18 @@ inline void disable_active_extruder() {
*/
bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
#if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
, const_float_t mix_multiplier/*=1.0*/
#endif
) {
DEBUG_SECTION(uf, "unload_filament", true);
DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
#if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
, " mixmult:", mix_multiplier
#endif
);
#if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
#if !ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
constexpr float mix_multiplier = 1.0f;
#endif

View File

@ -117,7 +117,7 @@ bool unload_filament(
const_float_t unload_length, // (mm) Filament Unload Length - 0 to skip
const bool show_lcd=false, // Set LCD status messages?
const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
#if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
, const_float_t mix_multiplier=1.0f // Extrusion multiplier (for a Mixing Extruder)
#endif
);

View File

@ -26,7 +26,7 @@
#include "../inc/MarlinConfigPre.h"
#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL)
#if ANY(PSU_CONTROL, AUTO_POWER_CONTROL)
#include "power.h"
#include "../module/planner.h"
@ -49,7 +49,7 @@ bool Power::psu_on;
#include "../module/stepper.h"
#include "../module/temperature.h"
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
#if ALL(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
#include "controllerfan.h"
#endif
@ -78,7 +78,7 @@ void Power::power_on() {
if (psu_on) return;
#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
cancelAutoPowerOff();
#endif
@ -115,12 +115,12 @@ void Power::power_off() {
OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE);
psu_on = false;
#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
cancelAutoPowerOff();
#endif
}
#if EITHER(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN)
bool Power::is_cooling_needed() {
#if HAS_HOTEND && AUTO_POWER_E_TEMP
@ -140,7 +140,7 @@ void Power::power_off() {
#endif
#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ENABLED(POWER_OFF_TIMER)
millis_t Power::power_off_time = 0;
@ -192,7 +192,7 @@ void Power::power_off() {
HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true;
#endif
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
#if ALL(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
if (controllerFan.state()) return true;
#endif

View File

@ -25,7 +25,7 @@
* power.h - power control
*/
#if EITHER(AUTO_POWER_CONTROL, POWER_OFF_TIMER)
#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER)
#include "../core/millis_t.h"
#endif
@ -37,7 +37,7 @@ class Power {
static void power_on();
static void power_off();
#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ENABLED(POWER_OFF_TIMER)
static millis_t power_off_time;
static void setPowerOffTimer(const millis_t delay_ms);

View File

@ -691,7 +691,7 @@ void PrintJobRecovery::resume() {
#endif
// Mixing extruder and gradient
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
#if ALL(MIXING_EXTRUDER, GRADIENT_MIX)
DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF");
#endif

View File

@ -22,7 +22,7 @@
#include "../inc/MarlinConfig.h"
#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#include "solenoid.h"

View File

@ -158,7 +158,7 @@ void GcodeSuite::G35() {
if (old_tool_index != 0) tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous toolhead if not PARKING_EXTRUDER
#endif
#if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G35)
#if ALL(HAS_LEVELING, RESTORE_LEVELING_AFTER_G35)
set_bed_leveling_enabled(leveling_was_active);
#endif

View File

@ -101,7 +101,7 @@ public:
uint8_t tool_index;
#endif
#if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR)
#if ANY(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR)
int abl_probe_index;
#endif
@ -143,7 +143,7 @@ public:
#endif
};
#if ABL_USES_GRID && EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR)
#if ABL_USES_GRID && ANY(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR)
constexpr xy_uint8_t G29_State::grid_points;
constexpr int G29_State::abl_points;
#endif
@ -235,7 +235,7 @@ G29_TYPE GcodeSuite::G29() {
reset_stepper_timeout();
// Q = Query leveling and G29 state
const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q');
const bool seenQ = ANY(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q');
// G29 Q is also available if debugging
#if ENABLED(DEBUG_LEVELING_FEATURE)
@ -286,7 +286,7 @@ G29_TYPE GcodeSuite::G29() {
if (active_extruder != 0) tool_change(0, true);
#endif
#if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR)
#if ANY(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR)
abl.abl_probe_index = -1;
#endif
@ -443,7 +443,7 @@ G29_TYPE GcodeSuite::G29() {
#if ENABLED(PREHEAT_BEFORE_LEVELING)
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
#if BOTH(DWIN_LCD_PROUI, HAS_HEATED_BED)
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
HMI_data.BedLevT
#else
LEVELING_BED_TEMP
@ -556,7 +556,7 @@ G29_TYPE GcodeSuite::G29() {
}
else {
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
const uint16_t index = abl.abl_probe_index - 1;
#endif

View File

@ -468,7 +468,7 @@ void GcodeSuite::G28() {
#endif
}
#if BOTH(FOAMCUTTER_XYUV, HAS_I_AXIS)
#if ALL(FOAMCUTTER_XYUV, HAS_I_AXIS)
// Home I (after X)
if (doI) homeaxis(I_AXIS);
#endif
@ -479,7 +479,7 @@ void GcodeSuite::G28() {
homeaxis(Y_AXIS);
#endif
#if BOTH(FOAMCUTTER_XYUV, HAS_J_AXIS)
#if ALL(FOAMCUTTER_XYUV, HAS_J_AXIS)
// Home J (after Y)
if (doJ) homeaxis(J_AXIS);
#endif
@ -493,7 +493,7 @@ void GcodeSuite::G28() {
// Home Z last if homing towards the bed
#if HAS_Z_AXIS && DISABLED(HOME_Z_FIRST)
if (doZ) {
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
#if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
stepper.set_all_z_lock(false);
stepper.set_separate_multi_axis(false);
#endif

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfigPre.h"
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
#if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
#include "../../feature/z_stepper_align.h"
@ -451,7 +451,7 @@ void GcodeSuite::G34() {
// Restore the active tool after homing
TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER))); // Fetch previous tool for parking extruder
#if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34)
#if ALL(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34)
set_bed_leveling_enabled(leveling_was_active);
#endif

View File

@ -70,7 +70,7 @@
#define CALIBRATION_MEASUREMENT_CERTAIN 0.5 // mm
#endif
#if BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT)
#if ALL(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT)
#define HAS_X_CENTER 1
#endif
#if ALL(HAS_Y_AXIS, CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK)

View File

@ -82,7 +82,7 @@
* - `P` - Run probe temperature calibration.
*/
#if BOTH(PTC_PROBE, PTC_BED)
#if ALL(PTC_PROBE, PTC_BED)
static void say_waiting_for() { SERIAL_ECHOPGM("Waiting for "); }
static void say_waiting_for_probe_heating() { say_waiting_for(); SERIAL_ECHOLNPGM("probe heating."); }

View File

@ -60,7 +60,7 @@
#define TEST_BYTE ((char) 0xE5)
#if EITHER(__AVR__, IS_32BIT_TEENSY)
#if ANY(__AVR__, IS_32BIT_TEENSY)
extern char __bss_end;
char *end_bss = &__bss_end,

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h"
#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#include "../gcode.h"
#include "../../feature/solenoid.h"

View File

@ -37,7 +37,7 @@
}
#endif
#if EITHER(COOLANT_FLOOD, AIR_ASSIST)
#if ANY(COOLANT_FLOOD, AIR_ASSIST)
#if ENABLED(AIR_ASSIST)
#include "../../feature/spindle_laser.h"

View File

@ -79,7 +79,7 @@ void GcodeSuite::M81() {
print_job_timer.stop();
#if BOTH(HAS_FAN, PROBING_FANS_OFF)
#if ALL(HAS_FAN, PROBING_FANS_OFF)
thermalManager.fans_paused = false;
ZERO(thermalManager.saved_fan_speed);
#endif

View File

@ -23,7 +23,7 @@
#include "../gcode.h"
#include "../../module/tool_change.h"
#if EITHER(HAS_MULTI_EXTRUDER, DEBUG_LEVELING_FEATURE)
#if ANY(HAS_MULTI_EXTRUDER, DEBUG_LEVELING_FEATURE)
#include "../../module/motion.h"
#endif

View File

@ -96,7 +96,7 @@ void GcodeSuite::M125() {
const bool show_lcd = TERN0(HAS_MARLINUI_MENU, parser.boolval('P'));
if (pause_print(retract, park_point, show_lcd, 0)) {
if (ENABLED(EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) {
if (ENABLED(EXTENSIBLE_UI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) {
wait_for_confirmation(false, 0);
resume_print(0, 0, -retract, 0);
}

View File

@ -199,7 +199,7 @@ void GcodeSuite::M702() {
#if HAS_PRUSA_MMU2
mmu2.unload();
#else
#if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS)
#if ALL(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS)
if (!parser.seenval('T')) {
HOTEND_LOOP() {
if (e != active_extruder) tool_change(e);

View File

@ -94,7 +94,7 @@ axis_bits_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG(
| (ar_init.w << REL_W)
);
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
#if ANY(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
bool GcodeSuite::autoreport_paused; // = false
#endif
@ -216,13 +216,13 @@ void GcodeSuite::get_destination_from_command() {
TERN_(LASER_FEATURE, cutter.feedrate_mm_m = MMS_TO_MMM(feedrate_mm_s));
}
#if BOTH(PRINTCOUNTER, HAS_EXTRUDERS)
#if ALL(PRINTCOUNTER, HAS_EXTRUDERS)
if (!DEBUGGING(DRYRUN) && !skip_move)
print_job_timer.incFilamentUsed(destination.e - current_position.e);
#endif
// Get ABCDHI mixing factors
#if BOTH(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1)
#if ALL(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1)
M165();
#endif
@ -454,7 +454,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 61: G61(); break; // G61: Apply/restore saved coordinates.
#endif
#if BOTH(PTC_PROBE, PTC_BED)
#if ALL(PTC_PROBE, PTC_BED)
case 76: G76(); break; // G76: Calibrate first layer compensation values
#endif
@ -496,11 +496,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 7: M7(); break; // M7: Coolant Mist ON
#endif
#if EITHER(AIR_ASSIST, COOLANT_FLOOD)
#if ANY(AIR_ASSIST, COOLANT_FLOOD)
case 8: M8(); break; // M8: Air Assist / Coolant Flood ON
#endif
#if EITHER(AIR_ASSIST, COOLANT_CONTROL)
#if ANY(AIR_ASSIST, COOLANT_CONTROL)
case 9: M9(); break; // M9: Air Assist / Coolant OFF
#endif
@ -540,7 +540,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 33: M33(); break; // M33: Get the long full path to a file or folder
#endif
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
case 34: M34(); break; // M34: Set SD card sorting options
#endif
@ -640,7 +640,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 154: M154(); break; // M154: Set position auto-report interval
#endif
#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
#if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
case 155: M155(); break; // M155: Set temperature auto-report interval
#endif
@ -836,7 +836,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
#endif
#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#if ANY(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
@ -991,7 +991,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC)
case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
case 908: M908(); break; // M908: Control digital trimpot directly.
#if HAS_MOTOR_CURRENT_DAC
case 909: M909(); break; // M909: Print digipot/DAC current value

View File

@ -435,7 +435,7 @@ public:
process_subcommands_now(keep_leveling ? FPSTR(G28_STR) : TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR)));
}
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
#if ANY(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
static bool autoreport_paused;
static bool set_autoreport_paused(const bool p) {
const bool was = autoreport_paused;
@ -582,7 +582,7 @@ private:
static void G59();
#endif
#if BOTH(PTC_PROBE, PTC_BED)
#if ALL(PTC_PROBE, PTC_BED)
static void G76();
#endif
@ -614,11 +614,11 @@ private:
static void M7();
#endif
#if EITHER(AIR_ASSIST, COOLANT_FLOOD)
#if ANY(AIR_ASSIST, COOLANT_FLOOD)
static void M8();
#endif
#if EITHER(AIR_ASSIST, COOLANT_CONTROL)
#if ANY(AIR_ASSIST, COOLANT_CONTROL)
static void M9();
#endif
@ -662,7 +662,7 @@ private:
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
static void M33();
#endif
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
static void M34();
#endif
#endif
@ -811,7 +811,7 @@ private:
static void M154();
#endif
#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
#if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
static void M155();
#endif
@ -979,7 +979,7 @@ private:
static bool M364();
#endif
#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
static void M380();
static void M381();
#endif
@ -1101,7 +1101,7 @@ private:
static void M665_report(const bool forReplay=true);
#endif
#if EITHER(DELTA, HAS_EXTRA_ENDSTOPS)
#if ANY(DELTA, HAS_EXTRA_ENDSTOPS)
static void M666();
static void M666_report(const bool forReplay=true);
#endif
@ -1200,7 +1200,7 @@ private:
static void M995();
#endif
#if BOTH(SPI_FLASH, SDSUPPORT)
#if ALL(SPI_FLASH, SDSUPPORT)
static void M993();
static void M994();
#endif

View File

@ -25,7 +25,7 @@
#include "../../MarlinCore.h"
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
#if ALL(FWRETRACT, FWRETRACT_AUTORETRACT)
#include "../../feature/fwretract.h"
#endif
@ -87,7 +87,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
}
#endif
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
#if ALL(FWRETRACT, FWRETRACT_AUTORETRACT)
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) {
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves

View File

@ -233,7 +233,7 @@ void GCodeParser::parse(char *p) {
#if ENABLED(GCODE_MOTION_MODES)
#if EITHER(BEZIER_CURVE_SUPPORT, ARC_SUPPORT)
#if ANY(BEZIER_CURVE_SUPPORT, ARC_SUPPORT)
case 'I' ... 'J': case 'P':
if (TERN1(BEZIER_CURVE_SUPPORT, motion_mode_codenum != 5)
&& TERN1(ARC_P_CIRCLES, !WITHIN(motion_mode_codenum, 2, 3))

View File

@ -76,7 +76,7 @@ void GcodeSuite::G30() {
TERN_(HAS_PTC, ptc.set_enabled(true));
if (!isnan(measured_z)) {
SERIAL_ECHOLNPGM("Bed X: ", pos.asLogical().x, " Y: ", pos.asLogical().y, " Z: ", measured_z);
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
char msg[31], str_1[6], str_2[6], str_3[6];
sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"),
dtostrf(pos.x, 1, 1, str_1),

View File

@ -34,7 +34,7 @@
#include "../queue.h"
#endif
#if EITHER(SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE)
#if ANY(SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE)
#include "../../lcd/marlinui.h"
#endif

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h"
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
#include "../gcode.h"
#include "../../sd/cardreader.h"

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h"
#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
#if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
#include "../gcode.h"
#include "../../module/temperature.h"

View File

@ -78,7 +78,7 @@ void GcodeSuite::M303() {
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
const bool u = parser.boolval('U');
#if ENABLED(DWIN_LCD_PROUI) && EITHER(PIDTEMP, PIDTEMPBED)
#if ENABLED(DWIN_LCD_PROUI) && ANY(PIDTEMP, PIDTEMPBED)
if (seenC) HMI_data.PidCycles = c;
if (seenS) {
switch (hid) {

View File

@ -27,12 +27,12 @@
*/
// MKS_LCD12864A/B is a variant of MKS_MINI_12864
#if EITHER(MKS_LCD12864A, MKS_LCD12864B)
#if ANY(MKS_LCD12864A, MKS_LCD12864B)
#define MKS_MINI_12864
#endif
// MKS_MINI_12864_V3 and BTT_MINI_12864_V1 are identical to FYSETC_MINI_12864_2_1
#if EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
#define FYSETC_MINI_12864_2_1
#endif
@ -51,7 +51,7 @@
* IS_U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib
* IS_U8GLIB_LM6059_AF : LM6059 with Hardware SPI via U8GLib
*/
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define MINIPANEL
@ -64,7 +64,7 @@
#define DOGLCD
#define IS_ULTIPANEL 1
#elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)
#elif ANY(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)
#define IS_DWIN_MARLINUI 1
#define IS_ULTIPANEL 1
@ -197,7 +197,7 @@
#define LCD_WIDTH 16
#define LCD_HEIGHT 2
#elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
#elif ANY(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
#define IS_TFTGLCD_PANEL 1
#define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
@ -227,7 +227,7 @@
#define LCD_ST7920_DELAY_2 125
#define LCD_ST7920_DELAY_3 125
#elif EITHER(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#elif ANY(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#define IS_RRD_FG_SC 1
#define LCD_ST7920_DELAY_1 150
@ -257,7 +257,7 @@
#endif
// ST7565 / 64128N graphical displays
#if EITHER(MAKRPANEL, MINIPANEL)
#if ANY(MAKRPANEL, MINIPANEL)
#define IS_ULTIPANEL 1
#define DOGLCD
#if ENABLED(MAKRPANEL)
@ -321,11 +321,11 @@
#define TFT_INTERFACE_SPI
#endif
#if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
#if ANY(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
#define TFT_CLASSIC_UI
#elif ANY(TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI)
#define TFT_COLOR_UI
#elif EITHER(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
#elif ANY(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
#define TFT_LVGL_UI
#endif
@ -370,7 +370,7 @@
#define IS_ULTIPANEL 1
#endif
#elif EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
#elif ANY(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
#define LCD_I2C_TYPE_PCF8575 // I2C Character-based 12864 display
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
@ -408,7 +408,7 @@
#endif
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT)
#if ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT)
#define DETECT_I2C_LCD_DEVICE 1
#endif
@ -446,15 +446,15 @@
#define IS_ULTIPANEL 1
#endif
#if EITHER(IS_ULTIPANEL, ULTRA_LCD)
#if ANY(IS_ULTIPANEL, ULTRA_LCD)
#define HAS_WIRED_LCD 1
#endif
#if EITHER(IS_ULTIPANEL, REPRAPWORLD_KEYPAD)
#if ANY(IS_ULTIPANEL, REPRAPWORLD_KEYPAD)
#define IS_NEWPANEL 1
#endif
#if EITHER(ZONESTAR_LCD, REPRAPWORLD_KEYPAD)
#if ANY(ZONESTAR_LCD, REPRAPWORLD_KEYPAD)
#define IS_RRW_KEYPAD 1
#ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
@ -466,7 +466,7 @@
#define HAS_DGUS_LCD_CLASSIC 1
#endif
#if EITHER(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
#define HAS_DGUS_LCD 1
#endif
@ -477,10 +477,10 @@
#endif
// Aliases for LCD features
#if EITHER(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
#define HAS_DWIN_E3V2_BASIC 1
#endif
#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
#define HAS_DWIN_E3V2 1
#endif
#if ENABLED(DWIN_LCD_PROUI)
@ -663,7 +663,7 @@
#define SINGLENOZZLE
#endif
#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
#if ANY(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
#undef HOTENDS
#define HOTENDS 1
#undef HOTEND_OFFSET_X
@ -1042,7 +1042,7 @@
#if DISABLED(SINGLENOZZLE)
#undef SINGLENOZZLE_STANDBY_TEMP
#endif
#if !BOTH(HAS_FAN, SINGLENOZZLE)
#if !ALL(HAS_FAN, SINGLENOZZLE)
#undef SINGLENOZZLE_STANDBY_FAN
#endif
@ -1248,7 +1248,7 @@
#if DISABLED(NOZZLE_AS_PROBE)
#define HAS_PROBE_XY_OFFSET 1
#endif
#if BOTH(DELTA, SENSORLESS_PROBING)
#if ALL(DELTA, SENSORLESS_PROBING)
#define HAS_DELTA_SENSORLESS_PROBING 1
#endif
#if NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, HAS_DELTA_SENSORLESS_PROBING)
@ -1260,7 +1260,7 @@
#ifndef Z_PROBE_LOW_POINT
#define Z_PROBE_LOW_POINT -5
#endif
#if EITHER(Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
#if ANY(Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
#define PROBE_TRIGGERED_WHEN_STOWED_TEST 1 // Extra test for Allen Key Probe
#endif
#if MULTIPLE_PROBING > 1
@ -1290,14 +1290,14 @@
*/
#if ENABLED(AUTO_BED_LEVELING_UBL)
#undef LCD_BED_LEVELING
#if EITHER(DELTA, SEGMENT_LEVELED_MOVES)
#if ANY(DELTA, SEGMENT_LEVELED_MOVES)
#define UBL_SEGMENTED 1
#endif
#endif
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
#define ABL_PLANAR 1
#endif
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
#define ABL_USES_GRID 1
#endif
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_3POINT)
@ -1306,16 +1306,16 @@
#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
#define HAS_MESH 1
#endif
#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT)
#if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT)
#define NEEDS_THREE_PROBE_POINTS 1
#endif
#if EITHER(HAS_ABL_NOT_UBL, AUTO_BED_LEVELING_UBL)
#if ANY(HAS_ABL_NOT_UBL, AUTO_BED_LEVELING_UBL)
#define HAS_ABL_OR_UBL 1
#if DISABLED(PROBE_MANUALLY)
#define HAS_AUTOLEVEL 1
#endif
#endif
#if EITHER(HAS_ABL_OR_UBL, MESH_BED_LEVELING)
#if ANY(HAS_ABL_OR_UBL, MESH_BED_LEVELING)
#define HAS_LEVELING 1
#if DISABLED(AUTO_BED_LEVELING_UBL)
#define PLANNER_LEVELING 1
@ -1326,7 +1326,7 @@
#undef ENABLE_LEVELING_AFTER_G28
#undef G29_RETRY_AND_RECOVER
#endif
#if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
#if !HAS_LEVELING || ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
#undef PROBE_MANUALLY
#endif
#if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING)
@ -1346,13 +1346,13 @@
/**
* CoreXY, CoreXZ, and CoreYZ - and their reverse
*/
#if EITHER(COREXY, COREYX)
#if ANY(COREXY, COREYX)
#define CORE_IS_XY 1
#endif
#if EITHER(COREXZ, COREZX)
#if ANY(COREXZ, COREZX)
#define CORE_IS_XZ 1
#endif
#if EITHER(COREYZ, COREZY)
#if ANY(COREYZ, COREZY)
#define CORE_IS_YZ 1
#endif
#if CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ
@ -1373,7 +1373,7 @@
#define CORE_AXIS_2 C_AXIS
#endif
#define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n))
#elif EITHER(MARKFORGED_XY, MARKFORGED_YX)
#elif ANY(MARKFORGED_XY, MARKFORGED_YX)
// Markforged kinematics
#define CORE_AXIS_1 A_AXIS
#define CORE_AXIS_2 B_AXIS
@ -1383,7 +1383,7 @@
#if ANY(MORGAN_SCARA, MP_SCARA, AXEL_TPARA)
#define IS_SCARA 1
#define IS_KINEMATIC 1
#elif EITHER(DELTA, POLARGRAPH)
#elif ANY(DELTA, POLARGRAPH)
#define IS_KINEMATIC 1
#else
#define IS_CARTESIAN 1
@ -1397,7 +1397,7 @@
#endif
// This flag indicates some kind of jerk storage is needed
#if EITHER(CLASSIC_JERK, IS_KINEMATIC)
#if ANY(CLASSIC_JERK, IS_KINEMATIC)
#define HAS_CLASSIC_JERK 1
#endif
@ -1457,12 +1457,12 @@
* - TFT_COLOR
* - GRAPHICAL_TFT_UPSCALE
*/
#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) // ST7796
#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) // ST7796
#define TFT_DEFAULT_DRIVER ST7796
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
#define TFT_RES_480x320
#define TFT_INTERFACE_SPI
#elif EITHER(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796
#elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
#define TFT_RES_480x320
#define TFT_INTERFACE_FSMC
@ -1480,7 +1480,7 @@
#define TFT_DEFAULT_ORIENTATION 0
#define TFT_RES_480x272
#define TFT_INTERFACE_FSMC
#elif EITHER(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505
#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#define TFT_RES_320x240
#define TFT_INTERFACE_FSMC
@ -1577,13 +1577,13 @@
#endif
#endif
#if EITHER(TFT_320x240, TFT_320x240_SPI)
#if ANY(TFT_320x240, TFT_320x240_SPI)
#define HAS_UI_320x240 1
#elif EITHER(TFT_480x320, TFT_480x320_SPI)
#elif ANY(TFT_480x320, TFT_480x320_SPI)
#define HAS_UI_480x320 1
#elif EITHER(TFT_480x272, TFT_480x272_SPI)
#elif ANY(TFT_480x272, TFT_480x272_SPI)
#define HAS_UI_480x272 1
#elif EITHER(TFT_1024x600_LTDC, TFT_1024x600_SIM)
#elif ANY(TFT_1024x600_LTDC, TFT_1024x600_SIM)
#define HAS_UI_1024x600 1
#endif
#if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)

View File

@ -660,11 +660,11 @@
#endif
#endif
#if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS))
#if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || ALL(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS))
#define HAS_MIXER_SYNC_CHANNEL 1
#endif
#if EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
#if ANY(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
#define HAS_DUPLICATION_MODE 1
#endif
@ -702,7 +702,7 @@
#undef MENU_ADDAUTOSTART
#endif
#if EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
#if ANY(SDSUPPORT, SET_PROGRESS_MANUALLY)
#define HAS_PRINT_PROGRESS 1
#endif
@ -724,7 +724,7 @@
#define HAS_MEDIA_SUBCALLS 1
#endif
#if HAS_PRINT_PROGRESS && EITHER(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME)
#if HAS_PRINT_PROGRESS && ANY(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME)
#define HAS_PRINT_PROGRESS_PERMYRIAD 1
#endif
@ -742,7 +742,7 @@
#if ANY(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS, Z_MULTI_ENDSTOPS)
#define HAS_EXTRA_ENDSTOPS 1
#endif
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#define HAS_SOFTWARE_ENDSTOPS 1
#endif
#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, HAS_DWIN_E3V2)
@ -764,7 +764,7 @@
#define HAS_GCODE_M255 1
#endif
#if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#if ANY(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#define HAS_MOTOR_CURRENT_I2C 1
#endif
@ -797,7 +797,7 @@
// Spindle/Laser power display types
// Defined here so sanity checks can use them
//
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
#if ANY(SPINDLE_FEATURE, LASER_FEATURE)
#define HAS_CUTTER 1
#define _CUTTER_POWER_PWM255 1
#define _CUTTER_POWER_PERCENT 2
@ -870,7 +870,7 @@
#endif
#endif
#if EITHER(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864)
#if ANY(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864)
#ifndef LED_USER_PRESET_GREEN
#define LED_USER_PRESET_GREEN 128
#endif
@ -905,7 +905,7 @@
#endif
#endif
#if BOTH(LED_CONTROL_MENU, NEOPIXEL2_SEPARATE)
#if ALL(LED_CONTROL_MENU, NEOPIXEL2_SEPARATE)
#ifndef LED2_USER_PRESET_RED
#define LED2_USER_PRESET_RED 255
#endif
@ -928,7 +928,7 @@
#endif
// Full Touch Screen needs 'tft/xpt2046'
#if EITHER(TFT_TOUCH_DEVICE_XPT2046, HAS_TFT_LVGL_UI)
#if ANY(TFT_TOUCH_DEVICE_XPT2046, HAS_TFT_LVGL_UI)
#define HAS_TFT_XPT2046 1
#endif
@ -1107,7 +1107,7 @@
#endif
// Power Monitor sensors
#if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE)
#if ANY(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE)
#define HAS_POWER_MONITOR 1
#if ENABLED(POWER_MONITOR_CURRENT) && (ENABLED(POWER_MONITOR_VOLTAGE) || defined(POWER_MONITOR_FIXED_VOLTAGE))
#define HAS_POWER_MONITOR_WATTS 1
@ -1126,7 +1126,7 @@
// Flags for Case Light having a color property or a single pin
#if ENABLED(CASE_LIGHT_ENABLE)
#if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
#if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
#define CASE_LIGHT_IS_COLOR_LED 1
#else
#define NEED_CASE_LIGHT_PIN 1
@ -1143,7 +1143,7 @@
#define NEED_LSF 1
#endif
#if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN)
#if ALL(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN)
#define _HAS_1(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE))
#define HAS_USER_ITEM(V...) DO(HAS,||,V)
#else
@ -1171,12 +1171,12 @@
#if !HAS_MULTI_SERIAL
#undef MEATPACK_ON_SERIAL_PORT_2
#endif
#if EITHER(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2)
#if ANY(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2)
#define HAS_MEATPACK 1
#endif
// AVR are (usually) too limited in resources to store the configuration into the binary
#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || DISABLED(SDSUPPORT) || EITHER(SDCARD_READONLY, DISABLE_M503))
#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || DISABLED(SDSUPPORT) || ANY(SDCARD_READONLY, DISABLE_M503))
#undef CONFIGURATION_EMBEDDING
#define CANNOT_EMBED_CONFIGURATION defined(__AVR__)
#endif
@ -1197,6 +1197,6 @@
#endif
// Input shaping
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#define HAS_SHAPING 1
#endif

View File

@ -38,7 +38,7 @@
#endif
// Linear advance uses Jerk since E is an isolated axis
#if BOTH(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
#define HAS_LINEAR_E_JERK 1
#endif
@ -48,7 +48,7 @@
// Set additional flags to let HALs choose in their Conditionals_post.h
#if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION, QSPI_EEPROM)
#define USE_EMULATED_EEPROM 1
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_WIRED_EEPROM 1
#elif ENABLED(IIC_BL24CXX_EEPROM)
// nothing
@ -253,7 +253,7 @@
#endif
// Calibration codes only for non-core axes
#if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE)
#if ANY(BACKLASH_GCODE, CALIBRATION_GCODE)
#if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX)
#define CAN_CALIBRATE(A,B) (_AXIS(A) == B)
#else
@ -451,13 +451,13 @@
#elif ENABLED(AZSMZ_12864)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 190
#elif EITHER(MKS_LCD12864A, MKS_LCD12864B)
#elif ANY(MKS_LCD12864A, MKS_LCD12864B)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 205
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 195
#elif EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
#elif ANY(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
#define _LCD_CONTRAST_MIN 255
#define _LCD_CONTRAST_INIT 255
#elif ENABLED(FYSETC_MINI_12864)
@ -543,7 +543,7 @@
#endif
#endif
#if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD)
#if DISABLED(USB_FLASH_DRIVE_SUPPORT) || ALL(MULTI_VOLUME, VOLUME_SD_ONBOARD)
#if ENABLED(SDIO_SUPPORT)
#define NEED_SD2CARD_SDIO 1
#else
@ -896,13 +896,13 @@
// Add LIB_MAX6675 / LIB_MAX31855 / LIB_MAX31865 to the build_flags
// to select a USER library for MAX6675, MAX31855, MAX31865
//
#if BOTH(HAS_MAX6675, LIB_MAX6675)
#if ALL(HAS_MAX6675, LIB_MAX6675)
#define USE_LIB_MAX6675 1
#endif
#if BOTH(HAS_MAX31855, LIB_MAX31855)
#if ALL(HAS_MAX31855, LIB_MAX31855)
#define USE_ADAFRUIT_MAX31855 1
#endif
#if BOTH(HAS_MAX31865, LIB_MAX31865)
#if ALL(HAS_MAX31865, LIB_MAX31865)
#define USE_ADAFRUIT_MAX31865 1
#elif HAS_MAX31865
#define LIB_INTERNAL_MAX31865 1
@ -1704,7 +1704,7 @@
* - Z_PROBE_SLED uses SOL1_PIN, when defined (unless EXT_SOLENOID is enabled)
*/
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED)
#if PIN_EXISTS(SOL0) && (EITHER(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || BOTH(EXT_SOLENOID, HAS_EXTRUDERS))
#if PIN_EXISTS(SOL0) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || ALL(EXT_SOLENOID, HAS_EXTRUDERS))
#define HAS_SOLENOID_0 1
#endif
#if PIN_EXISTS(SOL1) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) || TERN0(EXT_SOLENOID, E_STEPPERS > 1))
@ -1738,7 +1738,7 @@
#if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K, STEALTHCHOP_U, STEALTHCHOP_V, STEALTHCHOP_W)
#define STEALTHCHOP_ENABLED 1
#endif
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
#if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING)
#define USE_SENSORLESS 1
#endif
// Disable Z axis sensorless homing if a probe is used to home the Z axis
@ -2432,7 +2432,7 @@
#define HAS_TEMP_ADC_REDUNDANT 1
#endif
#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || EITHER(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY))
#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY))
#if HAS_HOTEND && HAS_TEMP(0)
#define HAS_TEMP_HOTEND 1
#endif
@ -2553,10 +2553,10 @@
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
#define WATCH_BED 1
#endif
#if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0
#if ALL(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0
#define WATCH_CHAMBER 1
#endif
#if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0
#if ALL(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0
#define WATCH_COOLER 1
#endif
#if NONE(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_COOLER)
@ -2905,7 +2905,7 @@
*/
#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, (v) ^ HEATER_0_INVERTING)
#if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, (v) ^ HEATER_1_INVERTING)
#if HOTENDS > 2
#define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, (v) ^ HEATER_2_INVERTING)
@ -3031,7 +3031,7 @@
/**
* Bed Probe dependencies
*/
#if EITHER(MESH_BED_LEVELING, HAS_BED_PROBE)
#if ANY(MESH_BED_LEVELING, HAS_BED_PROBE)
#ifndef Z_PROBE_OFFSET_RANGE_MIN
#define Z_PROBE_OFFSET_RANGE_MIN -20
#endif
@ -3040,7 +3040,7 @@
#endif
#endif
#if HAS_BED_PROBE
#if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
#if ALL(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
#ifndef XY_PROBE_FEEDRATE
@ -3098,16 +3098,16 @@
#undef ADAPTIVE_FAN_SLOWING
#undef NO_FAN_SLOWING_IN_PID_TUNING
#endif
#if !BOTH(HAS_BED_PROBE, HAS_FAN)
#if !ALL(HAS_BED_PROBE, HAS_FAN)
#undef PROBING_FANS_OFF
#endif
#if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS)
#if !ALL(HAS_BED_PROBE, HAS_EXTRUDERS)
#undef PROBING_ESTEPPERS_OFF
#elif ENABLED(PROBING_STEPPERS_OFF)
// PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined
#define PROBING_ESTEPPERS_OFF
#endif
#if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
#if ANY(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
#define HEATER_IDLE_HANDLER 1
#endif
#if HAS_BED_PROBE && (ANY(PROBING_HEATERS_OFF, PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)
@ -3118,7 +3118,7 @@
* Advanced Pause - Filament Change
*/
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
#define M600_PURGE_MORE_RESUMABLE 1
#endif
#ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH
@ -3201,7 +3201,7 @@
/**
* Default mesh area is an area with an inset margin on the print area.
*/
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
#if ANY(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!")
@ -3255,7 +3255,7 @@
#if ANY(IS_TFTGLCD_PANEL, PCA9632_BUZZER, LCD_USE_I2C_BUZZER)
#define USE_MARLINUI_BUZZER 1
#endif
#if EITHER(HAS_BEEPER, USE_MARLINUI_BUZZER)
#if ANY(HAS_BEEPER, USE_MARLINUI_BUZZER)
#define HAS_SOUND 1
#endif
@ -3326,7 +3326,7 @@
// Define a starting height for measuring manual probe points
#ifndef MANUAL_PROBE_START_Z
#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY)
#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY)
// Leave MANUAL_PROBE_START_Z undefined so the prior Z height will be used.
// Note: If Z_CLEARANCE_BETWEEN_MANUAL_PROBES is 0 there will be no raise between points
#elif ENABLED(AUTO_BED_LEVELING_UBL) && defined(Z_CLEARANCE_BETWEEN_PROBES)
@ -3352,7 +3352,7 @@
#endif
#endif
#if EITHER(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE)
#if ANY(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE)
// LCD timeout to status screen default is 15s
#ifndef LCD_TIMEOUT_TO_STATUS
#define LCD_TIMEOUT_TO_STATUS 15000
@ -3378,14 +3378,14 @@
#endif
// Number of VFAT entries used. Each entry has 13 UTF-16 characters
#if EITHER(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2)
#if ANY(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2)
#define MAX_VFAT_ENTRIES (5)
#else
#define MAX_VFAT_ENTRIES (2)
#endif
// Nozzle park for Delta
#if BOTH(NOZZLE_PARK_FEATURE, DELTA)
#if ALL(NOZZLE_PARK_FEATURE, DELTA)
#undef NOZZLE_PARK_Z_FEEDRATE
#define NOZZLE_PARK_Z_FEEDRATE NOZZLE_PARK_XY_FEEDRATE
#endif

View File

@ -46,8 +46,8 @@
#if ENABLED(TEST0) || !ENABLED(TEST2) || ENABLED(TEST3) || !ENABLED(TEST1, TEST2, TEST4)
#error "ENABLED is borked!"
#endif
#if BOTH(TEST0, TEST1)
#error "BOTH is borked!"
#if ALL(TEST0, TEST1)
#error "ALL is borked!"
#endif
#if DISABLED(TEST1) || !DISABLED(TEST3) || DISABLED(TEST4) || DISABLED(TEST0, TEST1, TEST2, TEST4) || !DISABLED(TEST0, TEST3)
#error "DISABLED is borked!"
@ -860,45 +860,45 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
#endif
#if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
#if ALL(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
#error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
#elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)
#elif ALL(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)
#error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN."
#elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX)
#elif ALL(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX)
#error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX."
#elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX)
#elif ALL(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX)
#error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX."
#elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX)
#elif ALL(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX)
#error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX."
#elif BOTH(ENDSTOPPULLUP_IMAX, ENDSTOPPULLDOWN_IMAX)
#elif ALL(ENDSTOPPULLUP_IMAX, ENDSTOPPULLDOWN_IMAX)
#error "Enable only one of ENDSTOPPULLUP_I_MAX or ENDSTOPPULLDOWN_I_MAX."
#elif BOTH(ENDSTOPPULLUP_JMAX, ENDSTOPPULLDOWN_JMAX)
#elif ALL(ENDSTOPPULLUP_JMAX, ENDSTOPPULLDOWN_JMAX)
#error "Enable only one of ENDSTOPPULLUP_J_MAX or ENDSTOPPULLDOWN_J_MAX."
#elif BOTH(ENDSTOPPULLUP_KMAX, ENDSTOPPULLDOWN_KMAX)
#elif ALL(ENDSTOPPULLUP_KMAX, ENDSTOPPULLDOWN_KMAX)
#error "Enable only one of ENDSTOPPULLUP_K_MAX or ENDSTOPPULLDOWN_K_MAX."
#elif BOTH(ENDSTOPPULLUP_UMAX, ENDSTOPPULLDOWN_UMAX)
#elif ALL(ENDSTOPPULLUP_UMAX, ENDSTOPPULLDOWN_UMAX)
#error "Enable only one of ENDSTOPPULLUP_U_MAX or ENDSTOPPULLDOWN_U_MAX."
#elif BOTH(ENDSTOPPULLUP_VMAX, ENDSTOPPULLDOWN_VMAX)
#elif ALL(ENDSTOPPULLUP_VMAX, ENDSTOPPULLDOWN_VMAX)
#error "Enable only one of ENDSTOPPULLUP_V_MAX or ENDSTOPPULLDOWN_V_MAX."
#elif BOTH(ENDSTOPPULLUP_WMAX, ENDSTOPPULLDOWN_WMAX)
#elif ALL(ENDSTOPPULLUP_WMAX, ENDSTOPPULLDOWN_WMAX)
#error "Enable only one of ENDSTOPPULLUP_W_MAX or ENDSTOPPULLDOWN_W_MAX."
#elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
#elif ALL(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
#error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
#elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
#elif ALL(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
#error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN."
#elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN)
#elif ALL(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN)
#error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN."
#elif BOTH(ENDSTOPPULLUP_IMIN, ENDSTOPPULLDOWN_IMIN)
#elif ALL(ENDSTOPPULLUP_IMIN, ENDSTOPPULLDOWN_IMIN)
#error "Enable only one of ENDSTOPPULLUP_I_MIN or ENDSTOPPULLDOWN_I_MIN."
#elif BOTH(ENDSTOPPULLUP_JMIN, ENDSTOPPULLDOWN_JMIN)
#elif ALL(ENDSTOPPULLUP_JMIN, ENDSTOPPULLDOWN_JMIN)
#error "Enable only one of ENDSTOPPULLUP_J_MIN or ENDSTOPPULLDOWN_J_MIN."
#elif BOTH(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN)
#elif ALL(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN)
#error "Enable only one of ENDSTOPPULLUP_K_MIN or ENDSTOPPULLDOWN_K_MIN."
#elif BOTH(ENDSTOPPULLUP_UMIN, ENDSTOPPULLDOWN_UMIN)
#elif ALL(ENDSTOPPULLUP_UMIN, ENDSTOPPULLDOWN_UMIN)
#error "Enable only one of ENDSTOPPULLUP_U_MIN or ENDSTOPPULLDOWN_U_MIN."
#elif BOTH(ENDSTOPPULLUP_VMIN, ENDSTOPPULLDOWN_VMIN)
#elif ALL(ENDSTOPPULLUP_VMIN, ENDSTOPPULLDOWN_VMIN)
#error "Enable only one of ENDSTOPPULLUP_V_MIN or ENDSTOPPULLDOWN_V_MIN."
#elif BOTH(ENDSTOPPULLUP_WMIN, ENDSTOPPULLDOWN_WMIN)
#elif ALL(ENDSTOPPULLUP_WMIN, ENDSTOPPULLDOWN_WMIN)
#error "Enable only one of ENDSTOPPULLUP_W_MIN or ENDSTOPPULLDOWN_W_MIN."
#endif
@ -1007,7 +1007,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
* I2C Position Encoders
*/
#if ENABLED(I2C_POSITION_ENCODERS)
#if !BOTH(BABYSTEPPING, BABYSTEP_XY)
#if !ALL(BABYSTEPPING, BABYSTEP_XY)
#error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY."
#elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5)
#error "I2CPE_ENCODER_CNT must be between 1 and 5."
@ -1020,11 +1020,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#if ENABLED(BABYSTEPPING)
#if ENABLED(SCARA)
#error "BABYSTEPPING is not implemented for SCARA yet."
#elif ENABLED(BABYSTEP_XY) && EITHER(MARKFORGED_XY, MARKFORGED_YX)
#elif ENABLED(BABYSTEP_XY) && ANY(MARKFORGED_XY, MARKFORGED_YX)
#error "BABYSTEPPING only implemented for Z axis on MarkForged."
#elif BOTH(DELTA, BABYSTEP_XY)
#elif ALL(DELTA, BABYSTEP_XY)
#error "BABYSTEPPING only implemented for Z axis on deltabots."
#elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING)
#elif ALL(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."
@ -1034,7 +1034,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_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 BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
#elif ALL(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
#error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
#elif !defined(BABYSTEP_MULTIPLICATOR_Z)
#error "BABYSTEPPING requires BABYSTEP_MULTIPLICATOR_Z."
@ -1072,21 +1072,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "FIL_RUNOUT3_PIN is required with NUM_RUNOUT_SENSORS >= 3."
#elif NUM_RUNOUT_SENSORS >= 2 && !PIN_EXISTS(FIL_RUNOUT2)
#error "FIL_RUNOUT2_PIN is required with NUM_RUNOUT_SENSORS >= 2."
#elif BOTH(FIL_RUNOUT1_PULLUP, FIL_RUNOUT1_PULLDOWN)
#elif ALL(FIL_RUNOUT1_PULLUP, FIL_RUNOUT1_PULLDOWN)
#error "You can't enable FIL_RUNOUT1_PULLUP and FIL_RUNOUT1_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT2_PULLUP, FIL_RUNOUT2_PULLDOWN)
#elif ALL(FIL_RUNOUT2_PULLUP, FIL_RUNOUT2_PULLDOWN)
#error "You can't enable FIL_RUNOUT2_PULLUP and FIL_RUNOUT2_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT3_PULLUP, FIL_RUNOUT3_PULLDOWN)
#elif ALL(FIL_RUNOUT3_PULLUP, FIL_RUNOUT3_PULLDOWN)
#error "You can't enable FIL_RUNOUT3_PULLUP and FIL_RUNOUT3_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT4_PULLUP, FIL_RUNOUT4_PULLDOWN)
#elif ALL(FIL_RUNOUT4_PULLUP, FIL_RUNOUT4_PULLDOWN)
#error "You can't enable FIL_RUNOUT4_PULLUP and FIL_RUNOUT4_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT5_PULLUP, FIL_RUNOUT5_PULLDOWN)
#elif ALL(FIL_RUNOUT5_PULLUP, FIL_RUNOUT5_PULLDOWN)
#error "You can't enable FIL_RUNOUT5_PULLUP and FIL_RUNOUT5_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT6_PULLUP, FIL_RUNOUT6_PULLDOWN)
#elif ALL(FIL_RUNOUT6_PULLUP, FIL_RUNOUT6_PULLDOWN)
#error "You can't enable FIL_RUNOUT6_PULLUP and FIL_RUNOUT6_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT7_PULLUP, FIL_RUNOUT7_PULLDOWN)
#elif ALL(FIL_RUNOUT7_PULLUP, FIL_RUNOUT7_PULLDOWN)
#error "You can't enable FIL_RUNOUT7_PULLUP and FIL_RUNOUT7_PULLDOWN at the same time."
#elif BOTH(FIL_RUNOUT8_PULLUP, FIL_RUNOUT8_PULLDOWN)
#elif ALL(FIL_RUNOUT8_PULLUP, FIL_RUNOUT8_PULLDOWN)
#error "You can't enable FIL_RUNOUT8_PULLUP and FIL_RUNOUT8_PULLDOWN at the same time."
#elif FILAMENT_RUNOUT_DISTANCE_MM < 0
#error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
@ -1139,7 +1139,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Individual axis homing is useless for DELTAS
*/
#if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA)
#if ALL(INDIVIDUAL_AXIS_HOMING_MENU, DELTA)
#error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
#endif
@ -1381,7 +1381,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* (Magnetic) Parking Extruder requirements
*/
#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
#if ENABLED(EXT_SOLENOID)
#error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)"
#elif EXTRUDERS != 2
@ -1439,7 +1439,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Magnetic / Electromagnetic Switching Toolhead requirements
*/
#if EITHER(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
#if ANY(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
#ifndef SWITCHING_TOOLHEAD_Y_POS
#error "(ELECTRO)?MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS"
#elif !defined(SWITCHING_TOOLHEAD_X_POS)
@ -1504,7 +1504,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Extruder temperature control algorithm - There can be only one!
*/
#if BOTH(PIDTEMP, MPCTEMP)
#if ALL(PIDTEMP, MPCTEMP)
#error "Only enable PIDTEMP or MPCTEMP, but not both."
#endif
@ -1524,7 +1524,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Bed Heating Options - PID vs Limit Switching
*/
#if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING)
#if ALL(PIDTEMPBED, BED_LIMIT_SWITCHING)
#error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
#endif
@ -1547,7 +1547,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Chamber Heating Options - PID vs Limit Switching
*/
#if BOTH(PIDTEMPCHAMBER, CHAMBER_LIMIT_SWITCHING)
#if ALL(PIDTEMPCHAMBER, CHAMBER_LIMIT_SWITCHING)
#error "To use CHAMBER_LIMIT_SWITCHING you must disable PIDTEMPCHAMBER."
#endif
@ -1698,7 +1698,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Some things should not be used on Belt Printers
*/
#if BOTH(BELTPRINTER, HAS_LEVELING)
#if ALL(BELTPRINTER, HAS_LEVELING)
#error "Bed Leveling is not compatible with BELTPRINTER."
#endif
@ -1720,7 +1720,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Z_PROBE_SLED is incompatible with DELTA
*/
#if BOTH(Z_PROBE_SLED, DELTA)
#if ALL(Z_PROBE_SLED, DELTA)
#error "You cannot use Z_PROBE_SLED with DELTA."
#endif
@ -1857,7 +1857,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* Mag mounted probe requirements
*/
#if BOTH(MAG_MOUNTED_PROBE, USE_PROBE_FOR_Z_HOMING) && DISABLED(Z_SAFE_HOMING)
#if ALL(MAG_MOUNTED_PROBE, USE_PROBE_FOR_Z_HOMING) && DISABLED(Z_SAFE_HOMING)
#error "MAG_MOUNTED_PROBE requires Z_SAFE_HOMING if it's being used to home Z."
#endif
@ -2074,7 +2074,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
#endif
#if BOTH(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING)
#if ALL(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING)
#error "Disable PREHEAT_BEFORE_LEVELING when using PREHEAT_BEFORE_PROBING."
#endif
@ -2192,7 +2192,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
* Make sure DISABLE_[XYZ] compatible with selected homing options
*/
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W)
#if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
#if ANY(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
#error "DISABLE_[XYZIJKUVW] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
#endif
#endif
@ -2215,7 +2215,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "POWER_MONITOR_CURRENT requires a valid POWER_MONITOR_CURRENT_PIN."
#elif ENABLED(POWER_MONITOR_VOLTAGE) && !PIN_EXISTS(POWER_MONITOR_VOLTAGE)
#error "POWER_MONITOR_VOLTAGE requires POWER_MONITOR_VOLTAGE_PIN to be defined."
#elif BOTH(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) && POWER_MONITOR_CURRENT_PIN == POWER_MONITOR_VOLTAGE_PIN
#elif ALL(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) && POWER_MONITOR_CURRENT_PIN == POWER_MONITOR_VOLTAGE_PIN
#error "POWER_MONITOR_CURRENT_PIN and POWER_MONITOR_VOLTAGE_PIN must be different."
#endif
@ -2247,7 +2247,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#if ENABLED(SAV_3DGLCD)
#if NONE(U8GLIB_SSD1306, U8GLIB_SH1106)
#error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
#elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106)
#elif ALL(U8GLIB_SSD1306, U8GLIB_SH1106)
#error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
#endif
#endif
@ -2509,7 +2509,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN."
#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY
#error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
#elif ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
#error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin."
#endif
@ -2652,7 +2652,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* FYSETC/MKS/BTT Mini Panel Requirements
*/
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1)
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1)
#ifndef NEO_RGB
#define NEO_RGB 123
#define FAUX_RGB 1
@ -2666,7 +2666,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#undef NEO_RGB
#undef FAUX_RGB
#endif
#elif EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
#elif ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
#error "Your FYSETC Mini Panel requires RGB_LED."
#endif
@ -2815,14 +2815,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "Enable USE_ZMIN_PLUG when homing Z to MIN."
#elif Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING)
#error "Z_HOME_DIR must be -1 when homing Z with the probe."
#elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS)
#elif ALL(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS)
#error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING."
#elif Z_HOME_TO_MAX && DISABLED(USE_ZMAX_PLUG)
#error "Enable USE_ZMAX_PLUG when homing Z to MAX."
#endif
#endif
#if BOTH(HOME_Z_FIRST, USE_PROBE_FOR_Z_HOMING)
#if ALL(HOME_Z_FIRST, USE_PROBE_FOR_Z_HOMING)
#error "HOME_Z_FIRST can't be used when homing Z with a probe."
#endif
@ -2957,21 +2957,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
* Fan check
*/
#if HAS_FANCHECK
#if BOTH(E0_FAN_TACHO_PULLUP, E0_FAN_TACHO_PULLDOWN)
#if ALL(E0_FAN_TACHO_PULLUP, E0_FAN_TACHO_PULLDOWN)
#error "Enable only one of E0_FAN_TACHO_PULLUP or E0_FAN_TACHO_PULLDOWN."
#elif BOTH(E1_FAN_TACHO_PULLUP, E1_FAN_TACHO_PULLDOWN)
#elif ALL(E1_FAN_TACHO_PULLUP, E1_FAN_TACHO_PULLDOWN)
#error "Enable only one of E1_FAN_TACHO_PULLUP or E1_FAN_TACHO_PULLDOWN."
#elif BOTH(E2_FAN_TACHO_PULLUP, E2_FAN_TACHO_PULLDOWN)
#elif ALL(E2_FAN_TACHO_PULLUP, E2_FAN_TACHO_PULLDOWN)
#error "Enable only one of E2_FAN_TACHO_PULLUP or E2_FAN_TACHO_PULLDOWN."
#elif BOTH(E3_FAN_TACHO_PULLUP, E3_FAN_TACHO_PULLDOWN)
#elif ALL(E3_FAN_TACHO_PULLUP, E3_FAN_TACHO_PULLDOWN)
#error "Enable only one of E3_FAN_TACHO_PULLUP or E3_FAN_TACHO_PULLDOWN."
#elif BOTH(E4_FAN_TACHO_PULLUP, E4_FAN_TACHO_PULLDOWN)
#elif ALL(E4_FAN_TACHO_PULLUP, E4_FAN_TACHO_PULLDOWN)
#error "Enable only one of E4_FAN_TACHO_PULLUP or E4_FAN_TACHO_PULLDOWN."
#elif BOTH(E5_FAN_TACHO_PULLUP, E5_FAN_TACHO_PULLDOWN)
#elif ALL(E5_FAN_TACHO_PULLUP, E5_FAN_TACHO_PULLDOWN)
#error "Enable only one of E5_FAN_TACHO_PULLUP or E5_FAN_TACHO_PULLDOWN."
#elif BOTH(E6_FAN_TACHO_PULLUP, E6_FAN_TACHO_PULLDOWN)
#elif ALL(E6_FAN_TACHO_PULLUP, E6_FAN_TACHO_PULLDOWN)
#error "Enable only one of E6_FAN_TACHO_PULLUP or E6_FAN_TACHO_PULLDOWN."
#elif BOTH(E7_FAN_TACHO_PULLUP, E7_FAN_TACHO_PULLDOWN)
#elif ALL(E7_FAN_TACHO_PULLUP, E7_FAN_TACHO_PULLDOWN)
#error "Enable only one of E7_FAN_TACHO_PULLUP or E7_FAN_TACHO_PULLDOWN."
#endif
#elif ENABLED(AUTO_REPORT_FANS)
@ -3102,7 +3102,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "TFT_GENERIC requires either TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI interface."
#endif
#if BOTH(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
#if ALL(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
#error "Please enable only one of TFT_INTERFACE_SPI or TFT_INTERFACE_SPI."
#endif
@ -3126,7 +3126,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8."
#endif
#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)
#if ALL(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)
#error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW."
#endif
@ -3144,7 +3144,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
#endif
#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD)
#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD)
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader."
#endif
@ -3154,25 +3154,25 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#if ENABLED(DWIN_CREALITY_LCD)
#if DISABLED(SDSUPPORT)
#error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled."
#elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
#elif ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
#error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU."
#elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#elif ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#error "DWIN_CREALITY_LCD does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU."
#elif ENABLED(LCD_BED_TRAMMING)
#error "DWIN_CREALITY_LCD does not support LCD_BED_TRAMMING."
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
#elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#endif
#elif ENABLED(DWIN_LCD_PROUI)
#if DISABLED(SDSUPPORT)
#error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled."
#elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
#elif ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
#error "DWIN_LCD_PROUI does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU."
#elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#elif ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#error "DWIN_LCD_PROUI does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU."
#elif ENABLED(LCD_BED_TRAMMING)
#error "DWIN_LCD_PROUI does not support LCD_BED_TRAMMING."
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
#elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#endif
#endif
@ -3237,7 +3237,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#else
#if HAS_DGUS_LCD
#error "The DGUS LCD requires LCD_SERIAL_PORT to be defined."
#elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
#elif ANY(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
#error "The ANYCUBIC LCD requires LCD_SERIAL_PORT to be defined."
#elif ENABLED(MALYAN_LCD)
#error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined."
@ -3644,7 +3644,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
#endif
#if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
#if ENABLED(DELTA) && !ALL(STEALTHCHOP_XY, STEALTHCHOP_Z)
#error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
#elif ENDSTOP_NOISE_THRESHOLD
#error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_THRESHOLD."
@ -3683,7 +3683,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "CoreXZ requires both X and Z to use sensorless homing if either one does."
#elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS && !HOMING_Z_WITH_PROBE
#error "CoreYZ requires both Y and Z to use sensorless homing if either one does."
#elif EITHER(MARKFORGED_XY, MARKFORGED_YX) && X_SENSORLESS != Y_SENSORLESS
#elif ANY(MARKFORGED_XY, MARKFORGED_YX) && X_SENSORLESS != Y_SENSORLESS
#error "MARKFORGED requires both X and Y to use sensorless homing if either one does."
#endif
@ -3770,7 +3770,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
* Digipot requirement
*/
#if HAS_MOTOR_CURRENT_I2C
#if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#if ALL(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451."
#elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
&& (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1))
@ -3841,7 +3841,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#undef _PLUS_TEST
#undef _EXTRA_NOTE
#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS)
#if ALL(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS)
#error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
#endif
@ -3877,18 +3877,18 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
#endif
#if BOTH(X_AXIS_TWIST_COMPENSATION, NOZZLE_AS_PROBE)
#if ALL(X_AXIS_TWIST_COMPENSATION, NOZZLE_AS_PROBE)
#error "X_AXIS_TWIST_COMPENSATION is incompatible with NOZZLE_AS_PROBE."
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
#if ENABLED(BACKUP_POWER_SUPPLY) && !PIN_EXISTS(POWER_LOSS)
#error "BACKUP_POWER_SUPPLY requires a POWER_LOSS_PIN."
#elif BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN)
#elif ALL(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN)
#error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time."
#elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MAX
#error "POWER_LOSS_RECOVER_ZHOME is not needed on a machine that homes to ZMAX."
#elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS)
#elif ALL(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS)
#error "POWER_LOSS_RECOVER_ZHOME requires POWER_LOSS_ZHOME_POS for a Cartesian that homes to ZMIN."
#endif
#endif
@ -3950,7 +3950,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM."
#elif !defined(BACKLASH_CORRECTION)
#error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION."
#elif EITHER(MARKFORGED_XY, MARKFORGED_YX)
#elif ANY(MARKFORGED_XY, MARKFORGED_YX)
constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM;
static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2],
"BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " on a MarkForged system.");
@ -4000,7 +4000,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
/**
* Require soft endstops for certain setups
*/
#if !BOTH(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#if !ALL(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#if ENABLED(DUAL_X_CARRIAGE)
#error "DUAL_X_CARRIAGE requires both MIN_ and MAX_SOFTWARE_ENDSTOPS."
#elif HAS_HOTEND_OFFSET
@ -4061,7 +4061,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
#define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN)
#if BOTH(SPINDLE_FEATURE, LASER_FEATURE)
#if ALL(SPINDLE_FEATURE, LASER_FEATURE)
#error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE."
#elif NONE(SPINDLE_SERVO, SPINDLE_LASER_USE_PWM) && !PIN_EXISTS(SPINDLE_LASER_ENA)
#error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_USE_PWM, or SPINDLE_SERVO to control the power."
@ -4172,7 +4172,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "ESP3D_WIFISUPPORT requires an ESP32 MOTHERBOARD."
#elif ENABLED(WEBSUPPORT) && NONE(ARDUINO_ARCH_ESP32, WIFISUPPORT)
#error "WEBSUPPORT requires WIFISUPPORT and an ESP32 MOTHERBOARD."
#elif BOTH(ESP3D_WIFISUPPORT, WIFISUPPORT)
#elif ALL(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "Enable only one of ESP3D_WIFISUPPORT or WIFISUPPORT."
#endif
@ -4190,14 +4190,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
/**
* Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features
*/
#if BOTH(HAS_MEATPACK, BINARY_FILE_TRANSFER)
#if ALL(HAS_MEATPACK, BINARY_FILE_TRANSFER)
#error "Either enable MEATPACK_ON_SERIAL_PORT_* or BINARY_FILE_TRANSFER, not both."
#endif
/**
* Sanity Check for Slim LCD Menus and Probe Offset Wizard
*/
#if BOTH(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD)
#if ALL(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD)
#error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\""
#endif
@ -4219,7 +4219,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
/**
* Sanity check for MIXING_EXTRUDER & DISTINCT_E_FACTORS these are not compatible
*/
#if BOTH(MIXING_EXTRUDER, DISTINCT_E_FACTORS)
#if ALL(MIXING_EXTRUDER, DISTINCT_E_FACTORS)
#error "MIXING_EXTRUDER can't be used with DISTINCT_E_FACTORS. But you may use SINGLENOZZLE with DISTINCT_E_FACTORS."
#endif
@ -4332,7 +4332,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
// Check requirements for upload.py
#if ENABLED(XFER_BUILD) && !BOTH(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD)
#if ENABLED(XFER_BUILD) && !ALL(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD)
#error "BINARY_FILE_TRANSFER and CUSTOM_FIRMWARE_UPLOAD are required for custom upload."
#endif
@ -4352,12 +4352,12 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "Input Shaping is not compatible with POLARGRAPH kinematics."
#elif ENABLED(DIRECT_STEPPING)
#error "Input Shaping is not compatible with DIRECT_STEPPING."
#elif BOTH(INPUT_SHAPING_X, CORE_IS_XZ)
#elif ALL(INPUT_SHAPING_X, CORE_IS_XZ)
#error "INPUT_SHAPING_X is not supported with COREXZ."
#elif BOTH(INPUT_SHAPING_Y, CORE_IS_YZ)
#elif ALL(INPUT_SHAPING_Y, CORE_IS_YZ)
#error "INPUT_SHAPING_Y is not supported with COREYZ."
#elif ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
#if !BOTH(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if !ALL(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#error "INPUT_SHAPING_X and INPUT_SHAPING_Y must both be enabled for COREXY, COREYX, or MARKFORGED_*."
#else
static_assert(SHAPING_FREQ_X == SHAPING_FREQ_Y, "SHAPING_FREQ_X and SHAPING_FREQ_Y must be the same for COREXY / COREYX / MARKFORGED_*.");

View File

@ -749,17 +749,17 @@
/**
* FYSETC/MKS/BTT Mini Panel backlighting
*/
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS)
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS)
#warning "Your FYSETC/MKS/BTT Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS."
#endif
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
#warning "Your FYSETC Mini Panel works best with RGB_LED."
#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
#elif ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
#warning "Your FYSETC Mini Panel works best with LED_USER_PRESET_STARTUP."
#endif
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && BOTH(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && ALL(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT
#warning "Your FYSETC display with PSU_CONTROL works best with LED_POWEROFF_TIMEOUT."
#endif

View File

@ -41,12 +41,12 @@
#include "../../module/planner.h"
#include "../../module/motion.h"
#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#include "../../feature/filwidth.h"
#include "../../gcode/parser.h"
#endif
#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#include "../../feature/cooler.h"
#endif
@ -70,7 +70,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 EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
#elif ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
LCD_CLASS lcd(LCD_I2C_ADDRESS OPTARG(DETECT_I2C_LCD_DEVICE, 1));
@ -289,7 +289,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS
#endif // LCD_PROGRESS_BAR
#if BOTH(SDSUPPORT, HAS_MARLINUI_MENU)
#if ALL(SDSUPPORT, HAS_MARLINUI_MENU)
// CHARSET_MENU
const static PROGMEM byte refresh[8] = {
@ -339,7 +339,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS
#endif
{
createChar_P(LCD_STR_UPLEVEL[0], uplevel);
#if BOTH(SDSUPPORT, HAS_MARLINUI_MENU)
#if ALL(SDSUPPORT, HAS_MARLINUI_MENU)
// SD Card sub-menu special characters
createChar_P(LCD_STR_REFRESH[0], refresh);
createChar_P(LCD_STR_FOLDER[0], folder);
@ -687,7 +687,7 @@ void MarlinUI::draw_status_message(const bool blink) {
if (progress > 2) return draw_progress_bar(progress);
}
#elif BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#elif ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT)
// Alternate Status message and Filament display
if (ELAPSED(millis(), next_filament_display)) {
@ -1015,7 +1015,7 @@ void MarlinUI::draw_status_screen() {
uint16_t per;
#if HAS_FAN0
if (true
#if BOTH(HAS_EXTRUDERS, ADAPTIVE_FAN_SLOWING)
#if ALL(HAS_EXTRUDERS, ADAPTIVE_FAN_SLOWING)
&& (blink || thermalManager.fan_speed_scaler[0] < 128)
#endif
) {

View File

@ -52,12 +52,12 @@
#include "../../module/planner.h"
#include "../../module/motion.h"
#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#include "../../feature/filwidth.h"
#include "../../gcode/parser.h"
#endif
#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#include "../../feature/cooler.h"
#endif
@ -141,7 +141,7 @@ static uint8_t PanelDetected = 0;
#if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_ONE(V) SPI.transfer(V);
#define SPI_SEND_TWO(V) SPI.transfer16(V);
#elif EITHER(STM32F4xx, STM32F1xx)
#elif ANY(STM32F4xx, STM32F1xx)
#define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE);
#define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE);
#elif defined(ARDUINO_ARCH_ESP32)
@ -151,7 +151,7 @@ static uint8_t PanelDetected = 0;
#if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L);
#elif EITHER(STM32F4xx, STM32F1xx)
#elif ANY(STM32F4xx, STM32F1xx)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L, SPI_CONTINUE);
#elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32)
#define SPI_SEND_SOME(V,L,Z) do{ for (uint16_t i = 0; i < L; i++) SPI_SEND_ONE(V[(Z)+i]); }while(0)
@ -290,7 +290,7 @@ uint8_t MarlinUI::read_slow_buttons() {
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1);
#elif defined(STM32F1)
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2);
#elif EITHER(STM32F4xx, TARGET_LPC1768)
#elif ANY(STM32F4xx, TARGET_LPC1768)
Wire.requestFrom(LCD_I2C_ADDRESS, 2);
#endif
encoderDiff += Wire.read();
@ -672,7 +672,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
void MarlinUI::draw_status_message(const bool blink) {
if (!PanelDetected) return;
lcd_moveto(0, 3);
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT)
// Alternate Status message and Filament display
if (ELAPSED(millis(), next_filament_display)) {

View File

@ -38,7 +38,7 @@
#define HAS_SLOW_BUTTONS 1
#endif
#if EITHER(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2)
#if ANY(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2)
// Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes)
#define BLEN_A 0
#define BLEN_B 1
@ -149,7 +149,7 @@
#ifndef EN_C
#define EN_C 0
#endif
#if BUTTON_EXISTS(BACK) || EITHER(HAS_TOUCH_BUTTONS, IS_TFTGLCD_PANEL)
#if BUTTON_EXISTS(BACK) || ANY(HAS_TOUCH_BUTTONS, IS_TFTGLCD_PANEL)
#define BLEN_D 3
#define EN_D _BV(BLEN_D)
#else

View File

@ -143,7 +143,7 @@
// Can also be overridden in Configuration_adv.h
// If you can afford it, try the 3-frame fan animation!
// Don't compile in the fan animation with no fan
#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER))
#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER))
#undef STATUS_FAN_FRAMES
#elif !STATUS_FAN_FRAMES
#define STATUS_FAN_FRAMES 2
@ -253,7 +253,7 @@
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
#define STATUS_HEATERS_X 5
#else
#if BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4
#if ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4
#define STATUS_HEATERS_X 5
#else
#define STATUS_HEATERS_X 8 // Like the included bitmaps
@ -742,22 +742,22 @@
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
#define DO_DRAW_FAN 1
#endif
#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM)
#if ALL(HAS_HOTEND, STATUS_HOTEND_ANIM)
#define ANIM_HOTEND 1
#endif
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
#if ALL(DO_DRAW_BED, STATUS_BED_ANIM)
#define ANIM_BED 1
#endif
#if BOTH(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM)
#if ALL(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM)
#define ANIM_CHAMBER 1
#endif
#if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM)
#if ALL(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM)
#define ANIM_CUTTER 1
#endif
#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM)
#if ALL(DO_DRAW_COOLER, STATUS_COOLER_ANIM)
#define ANIM_COOLER 1
#endif
#if BOTH(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM)
#if ALL(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM)
#define ANIM_FLOWMETER 1
#endif
#if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER

View File

@ -628,7 +628,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
#endif // AUTO_BED_LEVELING_UBL
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
#if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
//
// Draw knob rotation => Z motion key for:

View File

@ -129,7 +129,7 @@
#define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes
#endif
#elif EITHER(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER)
#elif ANY(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER)
// FYSETC OLED 2.42" 128 × 64 Full Graphics Controller
// or K3D OLED 2.42" 128 × 64 Full Graphics Controller
@ -153,7 +153,7 @@
#define U8G_CLASS U8GLIB_SH1306_128X64 // 8 stripes
#endif
#elif EITHER(MKS_12864OLED, ZONESTAR_12864OLED)
#elif ANY(MKS_12864OLED, ZONESTAR_12864OLED)
// MKS 128x64 (SH1106) OLED I2C LCD
// - or -

View File

@ -55,7 +55,7 @@
#include "../../feature/spindle_laser.h"
#endif
#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER)
#include "../../feature/cooler.h"
#endif
@ -126,7 +126,7 @@
#define MAX_HOTEND_DRAW _MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
#endif
#if EITHER(DO_DRAW_BED, DO_DRAW_HOTENDS)
#if ANY(DO_DRAW_BED, DO_DRAW_HOTENDS)
#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
#endif
@ -588,7 +588,7 @@ void MarlinUI::draw_status_screen() {
#if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS)
#if ANIM_BED
#if BOTH(HAS_LEVELING, STATUS_ALT_BED_BITMAP)
#if ALL(HAS_LEVELING, STATUS_ALT_BED_BITMAP)
#define BED_BITMAP(S) ((S) \
? (planner.leveling_active ? status_bed_leveled_on_bmp : status_bed_on_bmp) \
: (planner.leveling_active ? status_bed_leveled_bmp : status_bed_bmp))
@ -759,7 +759,7 @@ void MarlinUI::draw_status_screen() {
// XYZ Coordinates
//
#if EITHER(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
#if ANY(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
#define XYZ_FRAME_TOP 29
#define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3
#else
@ -868,7 +868,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 BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT)
// Alternate Status message and Filament display
if (ELAPSED(millis(), next_filament_display)) {
lcd_put_u8str(F(LCD_STR_FILAM_DIA));

View File

@ -76,7 +76,7 @@
#include "../../../module/probe.h"
#endif
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#include "../../../feature/babystep.h"
#endif
@ -214,7 +214,7 @@ void HMI_SetLanguageCache() {
}
void HMI_SetLanguage() {
#if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
#if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif
HMI_SetLanguageCache();
@ -223,7 +223,7 @@ void HMI_SetLanguage() {
void HMI_ToggleLanguage() {
HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE;
HMI_SetLanguageCache();
#if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
#if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif
}
@ -488,7 +488,7 @@ void Draw_Back_First(const bool is_sel=true) {
#define PREPARE_CASE_ZOFF (PREPARE_CASE_HOME + ENABLED(HAS_ZOFFSET_ITEM))
#define PREPARE_CASE_PLA (PREPARE_CASE_ZOFF + ENABLED(HAS_PREHEAT))
#define PREPARE_CASE_ABS (PREPARE_CASE_PLA + (TERN0(HAS_PREHEAT, PREHEAT_COUNT > 1)))
#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + EITHER(HAS_HOTEND, HAS_HEATED_BED))
#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + ANY(HAS_HOTEND, HAS_HEATED_BED))
#define PREPARE_CASE_LANG (PREPARE_CASE_COOL + 1)
#define PREPARE_CASE_TOTAL PREPARE_CASE_LANG
@ -1388,7 +1388,7 @@ void HMI_Move_Z() {
LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100);
last_zoffset = dwin_zoffset;
dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f;
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset);
#endif
Draw_Edit_Signed_Float2(zoff_line, HMI_ValueStruct.offset_value, true);
@ -2308,10 +2308,10 @@ void HMI_Printing() {
char cmd[40];
cmd[0] = '\0';
#if BOTH(HAS_HEATED_BED, PAUSE_HEAT)
#if ALL(HAS_HEATED_BED, PAUSE_HEAT)
if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp);
#endif
#if BOTH(HAS_HOTEND, PAUSE_HEAT)
#if ALL(HAS_HOTEND, PAUSE_HEAT)
if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp);
#endif
@ -2718,7 +2718,7 @@ void HMI_Prepare() {
#if HAS_ZOFFSET_ITEM
case PREPARE_CASE_ZOFF:
#if EITHER(HAS_BED_PROBE, BABYSTEPPING)
#if ANY(HAS_BED_PROBE, BABYSTEPPING)
checkkey = Homeoffset;
HMI_ValueStruct.show_mode = -4;
HMI_ValueStruct.offset_value = BABY_Z_VAR * 100;
@ -3797,7 +3797,7 @@ void HMI_Tune() {
#endif
#if HAS_ZOFFSET_ITEM
case TUNE_CASE_ZOFF: // Z-offset
#if EITHER(HAS_BED_PROBE, BABYSTEPPING)
#if ANY(HAS_BED_PROBE, BABYSTEPPING)
checkkey = Homeoffset;
HMI_ValueStruct.offset_value = BABY_Z_VAR * 100;
Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF + MROWS - index_tune, HMI_ValueStruct.offset_value, true);
@ -4257,7 +4257,7 @@ void DWIN_HandleScreen() {
case Extruder: HMI_Move_E(); break;
case ETemp: HMI_ETemp(); break;
#endif
#if EITHER(HAS_BED_PROBE, BABYSTEPPING)
#if ANY(HAS_BED_PROBE, BABYSTEPPING)
case Homeoffset: HMI_Zoffset(); break;
#endif
#if HAS_HEATED_BED

View File

@ -1107,7 +1107,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item
#define PREPARE_MANUALLEVEL (PREPARE_HOME + 1)
#define PREPARE_ZOFFSET (PREPARE_MANUALLEVEL + ENABLED(HAS_ZOFFSET_ITEM))
#define PREPARE_PREHEAT (PREPARE_ZOFFSET + ENABLED(HAS_PREHEAT))
#define PREPARE_COOLDOWN (PREPARE_PREHEAT + EITHER(HAS_HOTEND, HAS_HEATED_BED))
#define PREPARE_COOLDOWN (PREPARE_PREHEAT + ANY(HAS_HOTEND, HAS_HEATED_BED))
#define PREPARE_CHANGEFIL (PREPARE_COOLDOWN + ENABLED(ADVANCED_PAUSE_FEATURE))
#define PREPARE_CUSTOM_MENU (PREPARE_CHANGEFIL + ENABLED(HAS_CUSTOM_MENU))
#define PREPARE_TOTAL PREPARE_CUSTOM_MENU
@ -3060,7 +3060,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item
#define LEVELING_BACK 0
#define LEVELING_ACTIVE (LEVELING_BACK + 1)
#define LEVELING_GET_TILT (LEVELING_ACTIVE + BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL))
#define LEVELING_GET_TILT (LEVELING_ACTIVE + ALL(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL))
#define LEVELING_GET_MESH (LEVELING_GET_TILT + 1)
#define LEVELING_MANUAL (LEVELING_GET_MESH + 1)
#define LEVELING_VIEW (LEVELING_MANUAL + 1)
@ -3095,7 +3095,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item
Draw_Checkbox(row, planner.leveling_active);
}
break;
#if BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)
#if ALL(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)
case LEVELING_GET_TILT:
if (draw)
Draw_Menu_Item(row, ICON_Tilt, F("Autotilt Current Mesh"));

View File

@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) {
#endif // AUTO_BED_LEVELING_UBL
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
#if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
void MarlinUI::zoffset_overlay(const int8_t dir) {
const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW),

View File

@ -192,7 +192,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
#endif
celsius_float_t tc = 0, tt = 0;
bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (BOTH(HAS_HOTEND, HAS_HEATED_BED) && heater < 0),
bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (ALL(HAS_HOTEND, HAS_HEATED_BED) && heater < 0),
ta = false, c_draw, t_draw, i_draw;
c_draw = t_draw = i_draw = !ui.did_first_redraw;
if (isBed) {

View File

@ -46,7 +46,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if BOTH(DWIN_LCD_PROUI, HAS_LEVELING)
#if ALL(DWIN_LCD_PROUI, HAS_LEVELING)
#include "../../marlinui.h"
#include "../../../core/types.h"

View File

@ -346,7 +346,7 @@ void HMI_SetLanguageCache() {
}
void HMI_SetLanguage() {
#if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
#if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif
HMI_SetLanguageCache();
@ -355,7 +355,7 @@ void HMI_SetLanguage() {
void HMI_ToggleLanguage() {
HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE;
HMI_SetLanguageCache();
#if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
#if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM)
BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language));
#endif
}
@ -1468,7 +1468,7 @@ void DWIN_LevelingStart() {
HMI_SaveProcessID(Leveling);
Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING));
DWIN_Show_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT));
#if BOTH(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING)
#if ALL(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING)
#if HAS_HOTEND
if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP)
thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0);
@ -1527,7 +1527,7 @@ void DWIN_LevelingDone() {
}
#endif
#if EITHER(PIDTEMP, PIDTEMPBED)
#if ANY(PIDTEMP, PIDTEMPBED)
void DWIN_PidTuning(pidresult_t result) {
HMI_value.pidresult = result;
@ -1676,10 +1676,10 @@ void DWIN_SetDataDefaults() {
TERN_(BAUD_RATE_GCODE, SetBaud250K());
HMI_data.FullManualTramming = false;
HMI_data.MediaAutoMount = ENABLED(HAS_SD_EXTENDER);
#if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
HMI_data.z_after_homing = DEF_Z_AFTER_HOMING;
#endif
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
TERN_(LED_COLOR_PRESETS, leds.set_default());
ApplyLEDColor();
#endif
@ -1699,7 +1699,7 @@ void DWIN_CopySettingsFrom(const char * const buff) {
TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT());
feedrate_percentage = 100;
TERN_(BAUD_RATE_GCODE, HMI_SetBaudRate());
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
leds.set_color(
HMI_data.Led_Color.r,
HMI_data.Led_Color.g,
@ -1961,7 +1961,7 @@ void AutoHome() { queue.inject_P(G28_STR); }
void HomeX() { queue.inject(F("G28X")); }
void HomeY() { queue.inject(F("G28Y")); }
void HomeZ() { queue.inject(F("G28Z")); }
#if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
void ApplyZAfterHoming() { HMI_data.z_after_homing = MenuData.Value; };
void SetZAfterHoming() { SetIntOnClick(0, 20, HMI_data.z_after_homing, ApplyZAfterHoming); }
#endif
@ -1979,14 +1979,14 @@ void AutoHome() { queue.inject_P(G28_STR); }
void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); }
void LiveZOffset() {
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
const_float_t step_zoffset = round((MenuData.Value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum;
if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset);
//DEBUG_ECHOLNF(F("BB Steps: "), step_zoffset);
#endif
}
void SetZOffset() {
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
babystep.accum = round(planner.settings.axis_steps_per_mm[Z_AXIS] * BABY_Z_VAR);
#endif
SetPFloatOnClick(Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, 2, ApplyZOffset, LiveZOffset);
@ -2057,7 +2057,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
}
#endif
#if EITHER(PIDTEMP, PIDTEMPBED)
#if ANY(PIDTEMP, PIDTEMPBED)
void SetPID(celsius_t t, heater_id_t h) {
char cmd[53] = "";
char str_1[5] = "", str_2[5] = "";
@ -2114,7 +2114,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#endif
#if ENABLED(LED_CONTROL_MENU)
#if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
#if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
void SetLedStatus() {
leds.toggle();
Show_Chkb_Line(leds.lights_on);
@ -2523,7 +2523,7 @@ void SetStepsZ() { HMI_value.axis = Z_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP
void SetBedPidT() { SetPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); }
#endif
#if EITHER(PIDTEMP, PIDTEMPBED)
#if ANY(PIDTEMP, PIDTEMPBED)
void SetPidCycles() { SetPIntOnClick(3, 50); }
void SetKp() { SetPFloatOnClick(0, 1000, 2); }
void ApplyPIDi() {
@ -2632,7 +2632,7 @@ void onDrawAutoHome(MenuItemClass* menuitem, int8_t line) {
}
#if HAS_ZOFFSET_ITEM
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
void onDrawZOffset(MenuItemClass* menuitem, int8_t line) {
if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 164, 223, 177);
onDrawPFloat2Menu(menuitem, line);
@ -2694,7 +2694,7 @@ void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) {
DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240);
}
#if EITHER(PIDTEMP, PIDTEMPBED)
#if ANY(PIDTEMP, PIDTEMPBED)
void onDrawPIDi(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast<MenuItemPtrClass*>(menuitem)->value)); }
void onDrawPIDd(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast<MenuItemPtrClass*>(menuitem)->value)); }
#endif
@ -3207,7 +3207,7 @@ void Draw_GetColor_Menu() {
DWIN_Draw_Rectangle(1, *MenuData.P_Int, 20, 315, DWIN_WIDTH - 20, 335);
}
#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
void Draw_CaseLight_Menu() {
checkkey = Menu;
@ -3227,7 +3227,7 @@ void Draw_GetColor_Menu() {
checkkey = Menu;
if (SET_MENU(LedControlMenu, MSG_LED_CONTROL, 10)) {
BACK_ITEM(Draw_Control_Menu);
#if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
#if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, SetLedStatus, &leds.lights_on);
#endif
#if HAS_COLOR_LEDS

View File

@ -35,7 +35,7 @@
#include "../common/encoder.h"
#include "../../../libs/BL24CXX.h"
#if EITHER(BABYSTEPPING, HAS_BED_PROBE)
#if ANY(BABYSTEPPING, HAS_BED_PROBE)
#define HAS_ZOFFSET_ITEM 1
#if !HAS_BED_PROBE
#define JUST_BABYSTEP 1
@ -128,10 +128,10 @@ typedef struct {
bool FullManualTramming = false;
bool MediaAutoMount = ENABLED(HAS_SD_EXTENDER);
#if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
uint8_t z_after_homing = DEF_Z_AFTER_HOMING;
#endif
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
LEDColor Led_Color = Def_Leds_Color;
#endif
} HMI_data_t;
@ -211,7 +211,7 @@ void ParkHead();
#if HAS_ONESTEP_LEVELING
void Trammingwizard();
#endif
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
void ApplyLEDColor();
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
@ -319,7 +319,7 @@ void Draw_FilSet_Menu();
void Draw_PhySet_Menu();
void Draw_SelectColors_Menu();
void Draw_GetColor_Menu();
#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
void Draw_CaseLight_Menu();
#endif
#if ENABLED(LED_CONTROL_MENU)
@ -340,7 +340,7 @@ void Draw_MaxAccel_Menu();
void Draw_MaxJerk_Menu();
#endif
void Draw_Steps_Menu();
#if EITHER(HAS_BED_PROBE, BABYSTEPPING)
#if ANY(HAS_BED_PROBE, BABYSTEPPING)
void Draw_ZOffsetWiz_Menu();
#endif
#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)

View File

@ -66,7 +66,7 @@
#define Def_Indicator_Color Color_White
#define Def_Coordinate_Color Color_White
#define Def_Button_Color RGB( 0, 23, 16)
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#define Def_Leds_Color LEDColorWhite()
#endif
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)

View File

@ -29,7 +29,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if BOTH(DWIN_LCD_PROUI, HAS_ESDIAG)
#if ALL(DWIN_LCD_PROUI, HAS_ESDIAG)
#include "endstop_diag.h"

View File

@ -44,7 +44,7 @@
#include "../../../inc/MarlinConfigPre.h"
#if BOTH(DWIN_LCD_PROUI, HAS_GCODE_PREVIEW)
#if ALL(DWIN_LCD_PROUI, HAS_GCODE_PREVIEW)
#include "../../../core/types.h"
#include "../../marlinui.h"

Some files were not shown because too many files have changed in this diff Show More