|
@@ -121,6 +121,13 @@ LCDViewAction lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
121
|
121
|
uint16_t max_display_update_time = 0;
|
122
|
122
|
millis_t next_lcd_update_ms;
|
123
|
123
|
|
|
124
|
+#if HAS_LCD_CONTRAST
|
|
125
|
+ void set_lcd_contrast(const int16_t value) {
|
|
126
|
+ lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
|
|
127
|
+ u8g.setContrast(lcd_contrast);
|
|
128
|
+ }
|
|
129
|
+#endif
|
|
130
|
+
|
124
|
131
|
#if ENABLED(ULTIPANEL)
|
125
|
132
|
|
126
|
133
|
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
|
|
@@ -339,6 +346,12 @@ millis_t next_lcd_update_ms;
|
339
|
346
|
|
340
|
347
|
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
|
341
|
348
|
|
|
349
|
+ #define MENU_ITEM_ADDON_START(X) \
|
|
350
|
+ if (lcdDrawUpdate && _menuLineNr == _thisItemNr - 1) { \
|
|
351
|
+ SETCURSOR(X, _lcdLineNr)
|
|
352
|
+
|
|
353
|
+ #define MENU_ITEM_ADDON_END() } (0)
|
|
354
|
+
|
342
|
355
|
// Used to print static text with no visible cursor.
|
343
|
356
|
// Parameters: label [, bool center [, bool invert [, char *value] ] ]
|
344
|
357
|
#define STATIC_ITEM_P(LABEL, ...) do{ \
|
|
@@ -3264,21 +3277,11 @@ void lcd_quick_feedback(const bool clear_buttons) {
|
3264
|
3277
|
* "Motion" > "Move Axis" submenu
|
3265
|
3278
|
*
|
3266
|
3279
|
*/
|
3267
|
|
-
|
3268
|
|
- #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
|
3269
|
|
- #define _MOVE_XYZ_ALLOWED (all_axes_homed())
|
3270
|
|
- #else
|
3271
|
|
- #define _MOVE_XYZ_ALLOWED true
|
3272
|
|
- #endif
|
3273
|
|
-
|
3274
|
3280
|
#if ENABLED(DELTA)
|
3275
|
|
- #define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
|
3276
|
3281
|
void lcd_lower_z_to_clip_height() {
|
3277
|
3282
|
line_to_z(delta_clip_start_height);
|
3278
|
3283
|
lcd_synchronize();
|
3279
|
3284
|
}
|
3280
|
|
- #else
|
3281
|
|
- #define _MOVE_XY_ALLOWED true
|
3282
|
3285
|
#endif
|
3283
|
3286
|
|
3284
|
3287
|
void lcd_move_menu() {
|
|
@@ -3289,8 +3292,18 @@ void lcd_quick_feedback(const bool clear_buttons) {
|
3289
|
3292
|
MENU_ITEM_EDIT(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
|
3290
|
3293
|
#endif
|
3291
|
3294
|
|
3292
|
|
- if (_MOVE_XYZ_ALLOWED) {
|
3293
|
|
- if (_MOVE_XY_ALLOWED) {
|
|
3295
|
+ #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
|
|
3296
|
+ const bool do_move_xyz = all_axes_homed();
|
|
3297
|
+ #else
|
|
3298
|
+ constexpr bool do_move_xyz = true;
|
|
3299
|
+ #endif
|
|
3300
|
+ if (do_move_xyz) {
|
|
3301
|
+ #if ENABLED(DELTA)
|
|
3302
|
+ const bool do_move_xy = current_position[Z_AXIS] <= delta_clip_start_height;
|
|
3303
|
+ #else
|
|
3304
|
+ constexpr bool do_move_xy = true;
|
|
3305
|
+ #endif
|
|
3306
|
+ if (do_move_xy) {
|
3294
|
3307
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_get_x_amount);
|
3295
|
3308
|
MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_get_y_amount);
|
3296
|
3309
|
}
|
|
@@ -5804,15 +5817,6 @@ void lcd_setalertstatusPGM(PGM_P const message) {
|
5804
|
5817
|
|
5805
|
5818
|
void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
5806
|
5819
|
|
5807
|
|
-#if HAS_LCD_CONTRAST
|
5808
|
|
-
|
5809
|
|
- void set_lcd_contrast(const int16_t value) {
|
5810
|
|
- lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
|
5811
|
|
- u8g.setContrast(lcd_contrast);
|
5812
|
|
- }
|
5813
|
|
-
|
5814
|
|
-#endif
|
5815
|
|
-
|
5816
|
5820
|
#if ENABLED(ULTIPANEL)
|
5817
|
5821
|
|
5818
|
5822
|
/**
|