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:
@ -47,7 +47,7 @@
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)
|
||||
#if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
|
||||
#include "../lcd/ultralcd.h"
|
||||
#endif
|
||||
|
||||
@ -964,7 +964,7 @@ void clean_up_after_endstop_or_probe_move() {
|
||||
void prepare_move_to_destination() {
|
||||
apply_motion_limits(destination);
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||
#if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE)
|
||||
|
||||
if (!DEBUGGING(DRYRUN)) {
|
||||
if (destination[E_AXIS] != current_position[E_AXIS]) {
|
||||
@ -1025,7 +1025,7 @@ bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool
|
||||
if (zz) SERIAL_CHAR('Z');
|
||||
SERIAL_ECHOLNPGM(" " MSG_FIRST);
|
||||
|
||||
#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)
|
||||
#if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
|
||||
ui.status_printf_P(0, PSTR(MSG_HOME " %s%s%s " MSG_FIRST), xx ? MSG_X : "", yy ? MSG_Y : "", zz ? MSG_Z : "");
|
||||
#endif
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user