🎨 ANY => EITHER

This commit is contained in:
Scott Lahteine 2022-07-13 21:22:53 -05:00
parent e840015cad
commit 9283859b1e
33 changed files with 46 additions and 46 deletions

View File

@ -464,7 +464,7 @@
#define HAS_DGUS_LCD_CLASSIC 1
#endif
#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
#if EITHER(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
#define HAS_DGUS_LCD 1
#endif
@ -1431,7 +1431,7 @@
#define TFT_DEFAULT_ORIENTATION 0
#define TFT_RES_480x272
#define TFT_INTERFACE_FSMC
#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505
#elif EITHER(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

View File

@ -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 ANY(I2C_EEPROM, SPI_EEPROM)
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#define USE_WIRED_EEPROM 1
#elif ENABLED(IIC_BL24CXX_EEPROM)
// nothing

View File

@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) {
#endif // AUTO_BED_LEVELING_UBL
#if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
#if EITHER(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

@ -1208,7 +1208,7 @@ void CLCD::default_display_orientation() {
+ ENABLED(TOUCH_UI_INVERTED) * 1
);
cmd.execute();
#elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
#elif EITHER(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
#error "PORTRAIT or MIRRORED orientation not supported on the FT800."
#elif ENABLED(TOUCH_UI_INVERTED)
mem_write_32(REG::ROTATE, 1);

View File

@ -37,7 +37,7 @@ namespace Theme {
#else
// Use linear accent colors
#if ANY(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
#if EITHER(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
// Dark blue accent colors
constexpr int accent_hue = 216;
constexpr float accent_sat = 0.7;
@ -88,7 +88,7 @@ namespace Theme {
constexpr uint32_t bed_mesh_lines_rgb = 0xFFFFFF;
constexpr uint32_t bed_mesh_shadow_rgb = 0x444444;
#elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
#elif EITHER(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
constexpr uint32_t theme_darkest = accent_color_1;
constexpr uint32_t theme_dark = accent_color_4;

View File

@ -161,7 +161,7 @@ Nozzle nozzle;
void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) {
xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT, middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE;
const uint8_t arrPos = ANY(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder;
const uint8_t arrPos = EITHER(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder;
#if NOZZLE_CLEAN_MIN_TEMP > 20
if (thermalManager.degTargetHotend(arrPos) < NOZZLE_CLEAN_MIN_TEMP) {

View File

@ -53,7 +53,7 @@
float largest_sensorless_adj = 0;
#endif
#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS)
#if EITHER(HAS_QUIET_PROBING, USE_SENSORLESS)
#include "stepper/indirection.h"
#if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF)
#include "stepper.h"

View File

@ -904,7 +904,7 @@ volatile bool Temperature::raw_temps_ready = false;
temp_hotend[active_extruder].target = 0.0f;
temp_hotend[active_extruder].soft_pwm_amount = 0;
#if HAS_FAN
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
planner.sync_fan_speeds(fan_speed);
#endif
@ -922,7 +922,7 @@ volatile bool Temperature::raw_temps_ready = false;
disable_all_heaters();
#if HAS_FAN
zero_fan_speeds();
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
planner.sync_fan_speeds(fan_speed);
#endif
const xyz_pos_t tuningpos = MPC_TUNING_POS;
@ -949,7 +949,7 @@ volatile bool Temperature::raw_temps_ready = false;
}
#if HAS_FAN
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
planner.sync_fan_speeds(fan_speed);
#endif
@ -1031,7 +1031,7 @@ volatile bool Temperature::raw_temps_ready = false;
total_energy_fan0 += constants.heater_power * hotend.soft_pwm_amount / 127 * MPC_dT + (last_temp - current_temp) * constants.block_heat_capacity;
#if HAS_FAN
else if (ELAPSED(ms, test_end_ms) && !fan0_done) {
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
planner.sync_fan_speeds(fan_speed);
settle_end_ms = ms + settle_time;
test_end_ms = settle_end_ms + test_duration;
@ -1430,7 +1430,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
float ambient_xfer_coeff = constants.ambient_xfer_coeff_fan0;
#if ENABLED(MPC_INCLUDE_FAN)
const uint8_t fan_index = ANY(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee;
const uint8_t fan_index = EITHER(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee;
const float fan_fraction = TERN_(MPC_FAN_0_ACTIVE_HOTEND, !this_hotend ? 0.0f : ) fan_speed[fan_index] * RECIPROCAL(255);
ambient_xfer_coeff += fan_fraction * constants.fan255_adjustment;
#endif

View File

@ -582,7 +582,7 @@
#define LCD_SDSS SDSS
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#define DOGLCD_CS 45
#define DOGLCD_A0 44

View File

@ -238,7 +238,7 @@
#define LCD_SDSS P0_28 // EXP2.4
#define LCD_PINS_ENABLE P0_18 // EXP1.3
#define LCD_PINS_D4 P0_15 // EXP1.5
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define DOGLCD_SCK SD_SCK_PIN
#define DOGLCD_MOSI SD_MOSI_PIN
#endif

View File

@ -351,7 +351,7 @@
//#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4
#endif
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define DOGLCD_CS P0_16 // (16)
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#define DOGLCD_SCK SD_SCK_PIN

View File

@ -107,7 +107,7 @@
// Display
//
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN P1_31
#define DOGLCD_A0 P2_06
#define DOGLCD_CS P0_16

View File

@ -154,7 +154,7 @@
//#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4
#endif
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN P1_30 // (37) may change if cable changes
#define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
#define DOGLCD_SCK SD_SCK_PIN

View File

@ -91,7 +91,7 @@
//
// LCD / Controller
//
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN P1_31
#define DOGLCD_A0 P2_11

View File

@ -208,7 +208,7 @@
#define LCD_PINS_D6 74
#define LCD_PINS_D7 75
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN 44
// NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the
// beeper/buzzer is connected to pin 33; however, the pin used in the

View File

@ -143,7 +143,7 @@
#define HOME_PIN BTN_HOME
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN 44
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 70

View File

@ -51,7 +51,7 @@
#undef STAT_LED_RED_PIN
#undef STAT_LED_BLUE_PIN
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#undef DOGLCD_A0
#undef DOGLCD_CS

View File

@ -142,7 +142,7 @@
#undef BEEPER_PIN
#define BEEPER_PIN 33
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN 49 // For easy adapter board
#undef BEEPER_PIN
@ -169,7 +169,7 @@
#undef SPINDLE_DIR_PIN
#if HAS_CUTTER // EXP2 header
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BTN_EN2 31 // Pin 7 needed for Spindle PWM
#endif
#define SPINDLE_LASER_PWM_PIN 7 // Hardware PWM

View File

@ -60,7 +60,7 @@
//
// LCD / Controller
//
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
/**
* VIKI2 Has two groups of wires with...
*

View File

@ -728,7 +728,7 @@
#define LCD_SDSS SDSS
#define SD_DETECT_PIN EXP2_04_PIN
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#define DOGLCD_CS AUX4_05_PIN
#define DOGLCD_A0 AUX2_07_PIN

View File

@ -128,7 +128,7 @@
// LCD Display input pins
#if IS_NEWPANEL
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#undef DOGLCD_A0
#define DOGLCD_A0 23
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)

View File

@ -163,7 +163,7 @@
//
// LCD / Controller
//
#if ANY(BOARD_REV_1_0, BOARD_REV_1_1_TO_1_3)
#if EITHER(BOARD_REV_1_0, BOARD_REV_1_1_TO_1_3)
#define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22

View File

@ -217,7 +217,7 @@
#endif
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define DOGLCD_A0 EXP1_04_PIN
#define KILL_PIN 51
#define STAT_LED_BLUE_PIN EXP1_08_PIN

View File

@ -373,7 +373,7 @@
//#define LCD_SDSS SDSS
//#define SD_DETECT_PIN EXP2_01_PIN
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
// TO TEST
//#define DOGLCD_CS 45

View File

@ -424,7 +424,7 @@
//#define LCD_SDSS SDSS
//#define SD_DETECT_PIN EXP2_01_PIN
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
// TO TEST
//#define DOGLCD_CS 45

View File

@ -408,7 +408,7 @@
//#define LCD_SDSS SDSS
//#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
// TO TEST
//#define DOGLCD_CS 45

View File

@ -131,7 +131,7 @@
#error "LCD_I2C_PANELOLU2 is not supported."
#elif ENABLED(LCD_I2C_VIKI)
#error "LCD_I2C_VIKI is not supported."
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#error "VIKI2 / miniVIKI is not supported."
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#error "ELB_FULL_GRAPHIC_CONTROLLER is not supported."

View File

@ -171,7 +171,7 @@
#define LCD_SDSS PD5 // 53
#define SD_DETECT_PIN PD1 // 49
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN PC1 // 33

View File

@ -120,7 +120,7 @@
#error "LCD_I2C_PANELOLU2 is not supported."
#elif ENABLED(LCD_I2C_VIKI)
#error "LCD_I2C_VIKI is not supported."
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#error "VIKI2 / miniVIKI is not supported."
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#error "ELB_FULL_GRAPHIC_CONTROLLER is not supported."

View File

@ -144,7 +144,7 @@
#error "LCD_I2C_PANELOLU2 is not supported."
#elif ENABLED(LCD_I2C_VIKI)
#error "LCD_I2C_VIKI is not supported."
#elif ANY(VIKI2, miniVIKI)
#elif EITHER(VIKI2, miniVIKI)
#error "VIKI2 / miniVIKI is not supported."
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#error "ELB_FULL_GRAPHIC_CONTROLLER is not supported."

View File

@ -261,7 +261,7 @@
#endif
#endif
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI)
#if EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI)
#define TFT_CS_PIN EXP1_04_PIN
#define TFT_SCK_PIN EXP2_09_PIN
#define TFT_MISO_PIN EXP2_10_PIN

View File

@ -130,7 +130,7 @@
#define LCD_PINS_D6 5 // D5 JP11-6
#define LCD_PINS_D7 4 // D4 JP11-5
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN 8 // E0 JP11-10
#define DOGLCD_A0 40 // F2 JP2-2

View File

@ -207,7 +207,7 @@
#define LCD_PINS_D6 5 // D5 JP11-6
#define LCD_PINS_D7 4 // D4 JP11-5
#if ANY(VIKI2, miniVIKI)
#if EITHER(VIKI2, miniVIKI)
#define BEEPER_PIN 8 // E0 JP11-10
#define DOGLCD_A0 40 // F2 JP2-2