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:
@ -45,7 +45,7 @@
|
||||
#include "../../module/probe.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) || ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#if EITHER(ENABLE_LEVELING_FADE_HEIGHT, AUTO_BED_LEVELING_UBL)
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
@ -205,7 +205,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint32_t encoder/*=0*/) {
|
||||
lcd_z_fade_height = planner.z_fade_height;
|
||||
#endif
|
||||
|
||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) && ENABLED(BABYSTEPPING)
|
||||
#if BOTH(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING)
|
||||
static millis_t doubleclick_expire_ms = 0;
|
||||
// Going to menu_main from status screen? Remember first click time.
|
||||
// Going back to status screen within a very short time? Go to Z babystepping.
|
||||
@ -405,7 +405,7 @@ void MarlinUI::completion_feedback(const bool good/*=true*/) {
|
||||
|
||||
#endif // BABYSTEP_ZPROBE_OFFSET
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ANY(AUTO_BED_LEVELING_UBL, PID_AUTOTUNE_MENU, ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
void lcd_enqueue_command(const char * const cmd) {
|
||||
no_reentry = true;
|
||||
|
Reference in New Issue
Block a user