Extended condition macros (#13419)
Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add: - Alias `ANY(...)` for `!DISABLED(...)` - Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...` - Alias `EITHER(A,B)` for `ANY(...)` - Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)` - `NONE(...)` for `DISABLED(...)`
This commit is contained in:
@ -128,7 +128,7 @@
|
||||
#include "feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
|
||||
#if BOTH(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_NO_STEPPER_TIMEOUT)
|
||||
#include "feature/pause.h"
|
||||
#endif
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
#include "feature/fanmux.h"
|
||||
#endif
|
||||
|
||||
#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
|
||||
#if DO_SWITCH_EXTRUDER || ANY(SWITCHING_NOZZLE, PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
|
||||
#include "module/tool_change.h"
|
||||
#endif
|
||||
|
||||
@ -328,7 +328,7 @@ void disable_all_steppers() {
|
||||
ExtUI::onFilamentRunout(ExtUI::getActiveTool());
|
||||
#endif
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT) || ENABLED(HOST_ACTION_COMMANDS)
|
||||
#if EITHER(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS)
|
||||
const char tool = '0'
|
||||
#if NUM_RUNOUT_SENSORS > 1
|
||||
+ active_extruder
|
||||
@ -443,7 +443,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
||||
}
|
||||
|
||||
// Prevent steppers timing-out in the middle of M600
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
|
||||
#if BOTH(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_NO_STEPPER_TIMEOUT)
|
||||
#define MOVE_AWAY_TEST !did_pause_print
|
||||
#else
|
||||
#define MOVE_AWAY_TEST true
|
||||
@ -1000,7 +1000,7 @@ void setup() {
|
||||
dac_init();
|
||||
#endif
|
||||
|
||||
#if (ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) && HAS_SOLENOID_1
|
||||
#if EITHER(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1
|
||||
OUT_WRITE(SOL1_PIN, LOW); // OFF
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user