Apply ternary macros
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
#define HAS_SLOW_BUTTONS 1
|
||||
#endif
|
||||
|
||||
#if E_MANUAL > 1
|
||||
#define MULTI_MANUAL 1
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
|
||||
#include "../MarlinCore.h"
|
||||
@@ -491,15 +495,9 @@ public:
|
||||
static void save_previous_screen();
|
||||
|
||||
// goto_previous_screen and go_back may also be used as menu item callbacks
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
static void _goto_previous_screen(const bool is_back);
|
||||
static inline void goto_previous_screen() { _goto_previous_screen(false); }
|
||||
static inline void go_back() { _goto_previous_screen(true); }
|
||||
#else
|
||||
static void _goto_previous_screen();
|
||||
FORCE_INLINE static void goto_previous_screen() { _goto_previous_screen(); }
|
||||
FORCE_INLINE static void go_back() { _goto_previous_screen(); }
|
||||
#endif
|
||||
static void _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back));
|
||||
static inline void goto_previous_screen() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, false)); }
|
||||
static inline void go_back() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, true)); }
|
||||
|
||||
static void return_to_status();
|
||||
static inline bool on_status_screen() { return currentScreen == status_screen; }
|
||||
@@ -510,11 +508,7 @@ public:
|
||||
#endif
|
||||
|
||||
FORCE_INLINE static void defer_status_screen(const bool defer=true) {
|
||||
#if LCD_TIMEOUT_TO_STATUS
|
||||
defer_return_to_status = defer;
|
||||
#else
|
||||
UNUSED(defer);
|
||||
#endif
|
||||
TERN(LCD_TIMEOUT_TO_STATUS, defer_return_to_status = defer, UNUSED(defer));
|
||||
}
|
||||
|
||||
static inline void goto_previous_screen_no_defer() {
|
||||
@@ -582,11 +576,7 @@ public:
|
||||
|
||||
static uint32_t encoderPosition;
|
||||
|
||||
#if ENABLED(REVERSE_ENCODER_DIRECTION)
|
||||
#define ENCODERBASE -1
|
||||
#else
|
||||
#define ENCODERBASE +1
|
||||
#endif
|
||||
#define ENCODERBASE (TERN(REVERSE_ENCODER_DIRECTION, -1, +1))
|
||||
|
||||
#if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION)
|
||||
static int8_t encoderDirection;
|
||||
|
||||
Reference in New Issue
Block a user