Skip to content

Commit 9283859

Browse files
committed
🎨 ANY => EITHER
1 parent e840015 commit 9283859

33 files changed

+46
-46
lines changed

Marlin/src/inc/Conditionals_LCD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
#define HAS_DGUS_LCD_CLASSIC 1
465465
#endif
466466

467-
#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
467+
#if EITHER(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
468468
#define HAS_DGUS_LCD 1
469469
#endif
470470

@@ -1431,7 +1431,7 @@
14311431
#define TFT_DEFAULT_ORIENTATION 0
14321432
#define TFT_RES_480x272
14331433
#define TFT_INTERFACE_FSMC
1434-
#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505
1434+
#elif EITHER(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505
14351435
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
14361436
#define TFT_RES_320x240
14371437
#define TFT_INTERFACE_FSMC

Marlin/src/inc/Conditionals_post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
// Set additional flags to let HALs choose in their Conditionals_post.h
4949
#if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION, QSPI_EEPROM)
5050
#define USE_EMULATED_EEPROM 1
51-
#elif ANY(I2C_EEPROM, SPI_EEPROM)
51+
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
5252
#define USE_WIRED_EEPROM 1
5353
#elif ENABLED(IIC_BL24CXX_EEPROM)
5454
// nothing

Marlin/src/lcd/e3v2/marlinui/ui_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) {
565565

566566
#endif // AUTO_BED_LEVELING_UBL
567567

568-
#if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
568+
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
569569

570570
void MarlinUI::zoffset_overlay(const int8_t dir) {
571571
const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW),

Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ void CLCD::default_display_orientation() {
12081208
+ ENABLED(TOUCH_UI_INVERTED) * 1
12091209
);
12101210
cmd.execute();
1211-
#elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
1211+
#elif EITHER(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
12121212
#error "PORTRAIT or MIRRORED orientation not supported on the FT800."
12131213
#elif ENABLED(TOUCH_UI_INVERTED)
12141214
mem_write_32(REG::ROTATE, 1);

Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ namespace Theme {
3737
#else
3838
// Use linear accent colors
3939

40-
#if ANY(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
41-
// Dark blue accent colors
42-
constexpr int accent_hue = 216;
43-
constexpr float accent_sat = 0.7;
40+
#if EITHER(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME)
41+
// Dark blue accent colors
42+
constexpr int accent_hue = 216;
43+
constexpr float accent_sat = 0.7;
4444
#else
45-
// Green accent colors
46-
constexpr int accent_hue = 68;
47-
constexpr float accent_sat = 0.68;
45+
// Green accent colors
46+
constexpr int accent_hue = 68;
47+
constexpr float accent_sat = 0.68;
4848
#endif
4949

5050
// Shades of accent color
@@ -88,7 +88,7 @@ namespace Theme {
8888

8989
constexpr uint32_t bed_mesh_lines_rgb = 0xFFFFFF;
9090
constexpr uint32_t bed_mesh_shadow_rgb = 0x444444;
91-
#elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
91+
#elif EITHER(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME)
9292
constexpr uint32_t theme_darkest = accent_color_1;
9393
constexpr uint32_t theme_dark = accent_color_4;
9494

Marlin/src/libs/nozzle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Nozzle nozzle;
161161
void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) {
162162
xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT, middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE;
163163

164-
const uint8_t arrPos = ANY(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder;
164+
const uint8_t arrPos = EITHER(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder;
165165

166166
#if NOZZLE_CLEAN_MIN_TEMP > 20
167167
if (thermalManager.degTargetHotend(arrPos) < NOZZLE_CLEAN_MIN_TEMP) {

Marlin/src/module/probe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
float largest_sensorless_adj = 0;
5454
#endif
5555

56-
#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS)
56+
#if EITHER(HAS_QUIET_PROBING, USE_SENSORLESS)
5757
#include "stepper/indirection.h"
5858
#if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF)
5959
#include "stepper.h"

Marlin/src/module/temperature.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ volatile bool Temperature::raw_temps_ready = false;
904904
temp_hotend[active_extruder].target = 0.0f;
905905
temp_hotend[active_extruder].soft_pwm_amount = 0;
906906
#if HAS_FAN
907-
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
907+
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
908908
planner.sync_fan_speeds(fan_speed);
909909
#endif
910910

@@ -922,7 +922,7 @@ volatile bool Temperature::raw_temps_ready = false;
922922
disable_all_heaters();
923923
#if HAS_FAN
924924
zero_fan_speeds();
925-
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
925+
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
926926
planner.sync_fan_speeds(fan_speed);
927927
#endif
928928
const xyz_pos_t tuningpos = MPC_TUNING_POS;
@@ -949,7 +949,7 @@ volatile bool Temperature::raw_temps_ready = false;
949949
}
950950

951951
#if HAS_FAN
952-
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
952+
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0);
953953
planner.sync_fan_speeds(fan_speed);
954954
#endif
955955

@@ -1031,7 +1031,7 @@ volatile bool Temperature::raw_temps_ready = false;
10311031
total_energy_fan0 += constants.heater_power * hotend.soft_pwm_amount / 127 * MPC_dT + (last_temp - current_temp) * constants.block_heat_capacity;
10321032
#if HAS_FAN
10331033
else if (ELAPSED(ms, test_end_ms) && !fan0_done) {
1034-
set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
1034+
set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255);
10351035
planner.sync_fan_speeds(fan_speed);
10361036
settle_end_ms = ms + settle_time;
10371037
test_end_ms = settle_end_ms + test_duration;
@@ -1430,7 +1430,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
14301430

14311431
float ambient_xfer_coeff = constants.ambient_xfer_coeff_fan0;
14321432
#if ENABLED(MPC_INCLUDE_FAN)
1433-
const uint8_t fan_index = ANY(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee;
1433+
const uint8_t fan_index = EITHER(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee;
14341434
const float fan_fraction = TERN_(MPC_FAN_0_ACTIVE_HOTEND, !this_hotend ? 0.0f : ) fan_speed[fan_index] * RECIPROCAL(255);
14351435
ambient_xfer_coeff += fan_fraction * constants.fan255_adjustment;
14361436
#endif

Marlin/src/pins/linux/pins_RAMPS_LINUX.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@
582582
#define LCD_SDSS SDSS
583583
#define SD_DETECT_PIN 49
584584

585-
#elif ANY(VIKI2, miniVIKI)
585+
#elif EITHER(VIKI2, miniVIKI)
586586

587587
#define DOGLCD_CS 45
588588
#define DOGLCD_A0 44

Marlin/src/pins/lpc1768/pins_MKS_SBASE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
#define LCD_SDSS P0_28 // EXP2.4
239239
#define LCD_PINS_ENABLE P0_18 // EXP1.3
240240
#define LCD_PINS_D4 P0_15 // EXP1.5
241-
#if ANY(VIKI2, miniVIKI)
241+
#if EITHER(VIKI2, miniVIKI)
242242
#define DOGLCD_SCK SD_SCK_PIN
243243
#define DOGLCD_MOSI SD_MOSI_PIN
244244
#endif

0 commit comments

Comments
 (0)