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:
Scott Lahteine
2019-03-16 23:43:06 -05:00
committed by GitHub
parent d20eab4f83
commit 49cf92dc36
281 changed files with 1299 additions and 1288 deletions

View File

@@ -36,7 +36,7 @@
#include "../../module/probe.h"
#endif
#if ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING)
#if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
#include "../../module/motion.h"
#include "../../gcode/queue.h"
@@ -244,7 +244,7 @@ void menu_bed_leveling() {
#endif
// Level Bed
#if ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING)
#if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
// Manual leveling uses a guided procedure
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
#else