|
@@ -44,9 +44,6 @@
|
44
|
44
|
constexpr bool lcd_external_control = false;
|
45
|
45
|
#endif
|
46
|
46
|
|
47
|
|
- #define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0)
|
48
|
|
- #define BUTTON_PRESSED(BN) !READ(BTN_## BN)
|
49
|
|
-
|
50
|
47
|
extern int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
51
|
48
|
|
52
|
49
|
#if ENABLED(LCD_BED_LEVELING)
|
|
@@ -96,6 +93,8 @@
|
96
|
93
|
#endif
|
97
|
94
|
|
98
|
95
|
#define LCD_UPDATE_INTERVAL 100
|
|
96
|
+ #define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0)
|
|
97
|
+ #define BUTTON_PRESSED(BN) !READ(BTN_## BN)
|
99
|
98
|
|
100
|
99
|
#if ENABLED(ULTIPANEL)
|
101
|
100
|
|
|
@@ -107,15 +106,24 @@
|
107
|
106
|
|
108
|
107
|
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
|
109
|
108
|
|
|
109
|
+ // Encoder click is directly connected
|
|
110
|
+
|
110
|
111
|
#define BLEN_A 0
|
111
|
112
|
#define BLEN_B 1
|
112
|
|
- // Encoder click is directly connected
|
|
113
|
+
|
|
114
|
+ #define EN_A (_BV(BLEN_A))
|
|
115
|
+ #define EN_B (_BV(BLEN_B))
|
|
116
|
+
|
113
|
117
|
#if BUTTON_EXISTS(ENC)
|
114
|
118
|
#define BLEN_C 2
|
|
119
|
+ #define EN_C (_BV(BLEN_C))
|
|
120
|
+ #endif
|
|
121
|
+
|
|
122
|
+ #if BUTTON_EXISTS(BACK)
|
|
123
|
+ #define BLEN_D 3
|
|
124
|
+ #define EN_D BIT(BLEN_D)
|
|
125
|
+ #define LCD_BACK_CLICKED (buttons & EN_D)
|
115
|
126
|
#endif
|
116
|
|
- #define EN_A (_BV(BLEN_A))
|
117
|
|
- #define EN_B (_BV(BLEN_B))
|
118
|
|
- #define EN_C (_BV(BLEN_C))
|
119
|
127
|
|
120
|
128
|
extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
121
|
129
|
void lcd_buttons_update();
|
|
@@ -213,9 +221,13 @@
|
213
|
221
|
)
|
214
|
222
|
|
215
|
223
|
#elif ENABLED(NEWPANEL)
|
|
224
|
+
|
216
|
225
|
#define LCD_CLICKED (buttons & EN_C)
|
|
226
|
+
|
217
|
227
|
#else
|
|
228
|
+
|
218
|
229
|
#define LCD_CLICKED false
|
|
230
|
+
|
219
|
231
|
#endif
|
220
|
232
|
|
221
|
233
|
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|