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:
@ -40,7 +40,7 @@
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/motion.h"
|
||||
|
||||
#if DISABLED(LCD_PROGRESS_BAR) && ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
||||
#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
|
||||
#include "../../feature/filwidth.h"
|
||||
#include "../../gcode/parser.h"
|
||||
#endif
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_I2C_PIN_EN, LCD_I2C_PIN_RW, LCD_I2C_PIN_RS, LCD_I2C_PIN_D4, LCD_I2C_PIN_D5, LCD_I2C_PIN_D6, LCD_I2C_PIN_D7);
|
||||
|
||||
#elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)
|
||||
#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
|
||||
|
||||
LCD_CLASS lcd(LCD_I2C_ADDRESS
|
||||
#ifdef DETECT_DEVICE
|
||||
@ -628,7 +628,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
if (progress > 2) return draw_progress_bar(progress);
|
||||
}
|
||||
|
||||
#elif ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
||||
#elif BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
|
||||
|
||||
// Alternate Status message and Filament display
|
||||
if (ELAPSED(millis(), next_filament_display)) {
|
||||
|
Reference in New Issue
Block a user