|
@@ -45,7 +45,6 @@
|
45
|
45
|
#include "../feature/pause.h"
|
46
|
46
|
#endif
|
47
|
47
|
|
48
|
|
-
|
49
|
48
|
bool lcd_hasstatus();
|
50
|
49
|
void lcd_setstatus(const char* message, const bool persist=false);
|
51
|
50
|
void lcd_setstatusPGM(const char* message, const int8_t level=0);
|
|
@@ -90,7 +89,7 @@
|
90
|
89
|
#define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0)
|
91
|
90
|
#define BUTTON_PRESSED(BN) !READ(BTN_## BN)
|
92
|
91
|
|
93
|
|
- #if ENABLED(ULTIPANEL)
|
|
92
|
+ #if ENABLED(ULTIPANEL) // LCD with a click-wheel input
|
94
|
93
|
|
95
|
94
|
extern bool defer_return_to_status;
|
96
|
95
|
|
|
@@ -114,27 +113,6 @@
|
114
|
113
|
|
115
|
114
|
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
|
116
|
115
|
|
117
|
|
- // Encoder click is directly connected
|
118
|
|
-
|
119
|
|
- #define BLEN_A 0
|
120
|
|
- #define BLEN_B 1
|
121
|
|
-
|
122
|
|
- #define EN_A (_BV(BLEN_A))
|
123
|
|
- #define EN_B (_BV(BLEN_B))
|
124
|
|
-
|
125
|
|
- #if BUTTON_EXISTS(ENC)
|
126
|
|
- #define BLEN_C 2
|
127
|
|
- #define EN_C (_BV(BLEN_C))
|
128
|
|
- #endif
|
129
|
|
-
|
130
|
|
- #if BUTTON_EXISTS(BACK)
|
131
|
|
- #define BLEN_D 3
|
132
|
|
- #define EN_D _BV(BLEN_D)
|
133
|
|
- #define LCD_BACK_CLICKED (buttons & EN_D)
|
134
|
|
- #endif
|
135
|
|
-
|
136
|
|
- extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
137
|
|
- void lcd_buttons_update();
|
138
|
116
|
void lcd_completion_feedback(const bool good=true);
|
139
|
117
|
|
140
|
118
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|
@@ -142,7 +120,7 @@
|
142
|
120
|
void lcd_advanced_pause_show_message(const AdvancedPauseMessage message,
|
143
|
121
|
const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT,
|
144
|
122
|
const uint8_t extruder=active_extruder);
|
145
|
|
- #endif // ADVANCED_PAUSE_FEATURE
|
|
123
|
+ #endif
|
146
|
124
|
|
147
|
125
|
#if ENABLED(G26_MESH_VALIDATION)
|
148
|
126
|
void lcd_chirp();
|
|
@@ -155,10 +133,6 @@
|
155
|
133
|
float lcd_z_offset_edit();
|
156
|
134
|
#endif
|
157
|
135
|
|
158
|
|
- #else
|
159
|
|
-
|
160
|
|
- inline void lcd_buttons_update() {}
|
161
|
|
-
|
162
|
136
|
#endif
|
163
|
137
|
|
164
|
138
|
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
|
@@ -243,7 +217,6 @@
|
243
|
217
|
constexpr bool lcd_wait_for_move = false;
|
244
|
218
|
|
245
|
219
|
inline void lcd_refresh() {}
|
246
|
|
- inline void lcd_buttons_update() {}
|
247
|
220
|
inline bool lcd_hasstatus() { return false; }
|
248
|
221
|
inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); }
|
249
|
222
|
inline void lcd_setstatusPGM(const char* const message, const int8_t level=0) { UNUSED(message); UNUSED(level); }
|
|
@@ -253,6 +226,39 @@
|
253
|
226
|
|
254
|
227
|
#endif // ULTRA_LCD
|
255
|
228
|
|
|
229
|
+#if ENABLED(ULTIPANEL)
|
|
230
|
+
|
|
231
|
+ #if ENABLED(NEWPANEL) // Uses digital switches, not a shift register
|
|
232
|
+
|
|
233
|
+ // Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes)
|
|
234
|
+ #define BLEN_A 0
|
|
235
|
+ #define BLEN_B 1
|
|
236
|
+
|
|
237
|
+ #define EN_A _BV(BLEN_A)
|
|
238
|
+ #define EN_B _BV(BLEN_B)
|
|
239
|
+
|
|
240
|
+ #if BUTTON_EXISTS(ENC)
|
|
241
|
+ #define BLEN_C 2
|
|
242
|
+ #define EN_C _BV(BLEN_C)
|
|
243
|
+ #endif
|
|
244
|
+
|
|
245
|
+ #if BUTTON_EXISTS(BACK)
|
|
246
|
+ #define BLEN_D 3
|
|
247
|
+ #define EN_D _BV(BLEN_D)
|
|
248
|
+ #define LCD_BACK_CLICKED (buttons & EN_D)
|
|
249
|
+ #endif
|
|
250
|
+
|
|
251
|
+ #endif // NEWPANEL
|
|
252
|
+
|
|
253
|
+ extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
|
254
|
+ void lcd_buttons_update();
|
|
255
|
+
|
|
256
|
+#else
|
|
257
|
+
|
|
258
|
+ inline void lcd_buttons_update() {}
|
|
259
|
+
|
|
260
|
+#endif
|
|
261
|
+
|
256
|
262
|
#define LCD_MESSAGEPGM(x) lcd_setstatusPGM(PSTR(x))
|
257
|
263
|
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x))
|
258
|
264
|
|