|
@@ -236,23 +236,23 @@ uint16_t max_display_update_time = 0;
|
236
|
236
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
|
237
|
237
|
*
|
238
|
238
|
*/
|
239
|
|
- #define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \
|
|
239
|
+ #define _MENU_ITEM_PART_1(TYPE, ...) \
|
240
|
240
|
if (_menuLineNr == _thisItemNr) { \
|
241
|
|
- if (lcdDrawUpdate) \
|
242
|
|
- lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
243
|
241
|
if (lcd_clicked && encoderLine == _thisItemNr) {
|
244
|
242
|
|
245
|
|
- #define _MENU_ITEM_PART_2(TYPE, ...) \
|
|
243
|
+ #define _MENU_ITEM_PART_2(TYPE, LABEL, ...) \
|
246
|
244
|
menu_action_ ## TYPE(__VA_ARGS__); \
|
247
|
245
|
if (screen_changed) return; \
|
248
|
246
|
} \
|
|
247
|
+ if (lcdDrawUpdate) \
|
|
248
|
+ lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
249
|
249
|
} \
|
250
|
250
|
++_thisItemNr
|
251
|
251
|
|
252
|
252
|
#define MENU_ITEM(TYPE, LABEL, ...) do { \
|
253
|
253
|
_skipStatic = false; \
|
254
|
|
- _MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \
|
255
|
|
- _MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \
|
|
254
|
+ _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
|
|
255
|
+ _MENU_ITEM_PART_2(TYPE, LABEL, ## __VA_ARGS__); \
|
256
|
256
|
} while(0)
|
257
|
257
|
|
258
|
258
|
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
|
|
@@ -281,10 +281,10 @@ uint16_t max_display_update_time = 0;
|
281
|
281
|
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
|
282
|
282
|
*/
|
283
|
283
|
#define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
|
284
|
|
- _MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \
|
|
284
|
+ _MENU_ITEM_PART_1(type, ## __VA_ARGS__); \
|
285
|
285
|
encoderRateMultiplierEnabled = true; \
|
286
|
286
|
lastEncoderMovementMillis = 0; \
|
287
|
|
- _MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
|
|
287
|
+ _MENU_ITEM_PART_2(type, label, ## __VA_ARGS__); \
|
288
|
288
|
} while(0)
|
289
|
289
|
|
290
|
290
|
#else // !ENCODER_RATE_MULTIPLIER
|
|
@@ -581,8 +581,6 @@ void lcd_status_screen() {
|
581
|
581
|
#endif
|
582
|
582
|
#endif // LCD_PROGRESS_BAR
|
583
|
583
|
|
584
|
|
- lcd_implementation_status_screen();
|
585
|
|
-
|
586
|
584
|
#if ENABLED(ULTIPANEL)
|
587
|
585
|
|
588
|
586
|
if (lcd_clicked) {
|
|
@@ -595,6 +593,7 @@ void lcd_status_screen() {
|
595
|
593
|
#endif
|
596
|
594
|
);
|
597
|
595
|
lcd_goto_screen(lcd_main_menu);
|
|
596
|
+ return;
|
598
|
597
|
}
|
599
|
598
|
|
600
|
599
|
#if ENABLED(ULTIPANEL_FEEDMULTIPLY)
|
|
@@ -623,8 +622,12 @@ void lcd_status_screen() {
|
623
|
622
|
feedrate_percentage = constrain(feedrate_percentage, 10, 999);
|
624
|
623
|
|
625
|
624
|
#endif // ULTIPANEL
|
|
625
|
+
|
|
626
|
+ lcd_implementation_status_screen();
|
626
|
627
|
}
|
627
|
628
|
|
|
629
|
+void lcd_reset_status() { lcd_setstatusPGM(PSTR(""), -1); }
|
|
630
|
+
|
628
|
631
|
/**
|
629
|
632
|
*
|
630
|
633
|
* draw the kill screen
|
|
@@ -632,7 +635,7 @@ void lcd_status_screen() {
|
632
|
635
|
*/
|
633
|
636
|
void kill_screen(const char* lcd_msg) {
|
634
|
637
|
lcd_init();
|
635
|
|
- lcd_setalertstatuspgm(lcd_msg);
|
|
638
|
+ lcd_setalertstatusPGM(lcd_msg);
|
636
|
639
|
#if ENABLED(DOGLCD)
|
637
|
640
|
u8g.firstPage();
|
638
|
641
|
do {
|
|
@@ -704,7 +707,7 @@ void kill_screen(const char* lcd_msg) {
|
704
|
707
|
card.startFileprint();
|
705
|
708
|
print_job_timer.start();
|
706
|
709
|
#endif
|
707
|
|
- lcd_setstatusPGM(PSTR(""), -1);
|
|
710
|
+ lcd_reset_status();
|
708
|
711
|
}
|
709
|
712
|
|
710
|
713
|
void lcd_sdcard_stop() {
|
|
@@ -717,7 +720,8 @@ void kill_screen(const char* lcd_msg) {
|
717
|
720
|
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
|
718
|
721
|
#endif
|
719
|
722
|
wait_for_heatup = false;
|
720
|
|
- lcd_setstatusPGM(PSTR(MSG_PRINT_PAUSED), -1);
|
|
723
|
+ lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
|
|
724
|
+ lcd_return_to_status();
|
721
|
725
|
}
|
722
|
726
|
|
723
|
727
|
#endif // SDSUPPORT
|
|
@@ -1764,7 +1768,7 @@ void kill_screen(const char* lcd_msg) {
|
1764
|
1768
|
MENU_BACK(MSG_UBL_EDIT_MESH_MENU);
|
1765
|
1769
|
MENU_ITEM_EDIT(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9);
|
1766
|
1770
|
MENU_ITEM(function, MSG_UBL_MESH_HEIGHT_ADJUST, _lcd_ubl_adjust_height_cmd);
|
1767
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1771
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1768
|
1772
|
END_MENU();
|
1769
|
1773
|
}
|
1770
|
1774
|
|
|
@@ -1778,7 +1782,7 @@ void kill_screen(const char* lcd_msg) {
|
1778
|
1782
|
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R T"));
|
1779
|
1783
|
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_CLOSEST, PSTR("G29 P4 T"));
|
1780
|
1784
|
MENU_ITEM(submenu, MSG_UBL_MESH_HEIGHT_ADJUST, _lcd_ubl_height_adjust_menu);
|
1781
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1785
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1782
|
1786
|
END_MENU();
|
1783
|
1787
|
}
|
1784
|
1788
|
|
|
@@ -1812,7 +1816,7 @@ void kill_screen(const char* lcd_msg) {
|
1812
|
1816
|
MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
|
1813
|
1817
|
#endif
|
1814
|
1818
|
MENU_ITEM(function, MSG_UBL_VALIDATE_CUSTOM_MESH, _lcd_ubl_validate_custom_mesh);
|
1815
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1819
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1816
|
1820
|
END_MENU();
|
1817
|
1821
|
}
|
1818
|
1822
|
|
|
@@ -1844,7 +1848,7 @@ void kill_screen(const char* lcd_msg) {
|
1844
|
1848
|
MENU_BACK(MSG_UBL_TOOLS);
|
1845
|
1849
|
MENU_ITEM(gcode, MSG_UBL_3POINT_MESH_LEVELING, PSTR("G29 J0"));
|
1846
|
1850
|
MENU_ITEM(submenu, MSG_UBL_GRID_MESH_LEVELING, _lcd_ubl_grid_level);
|
1847
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1851
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1848
|
1852
|
END_MENU();
|
1849
|
1853
|
}
|
1850
|
1854
|
|
|
@@ -1876,7 +1880,7 @@ void kill_screen(const char* lcd_msg) {
|
1876
|
1880
|
MENU_ITEM(function, MSG_UBL_FILLIN_MESH, _lcd_ubl_fillin_amount_cmd);
|
1877
|
1881
|
MENU_ITEM(function, MSG_UBL_SMART_FILLIN, _lcd_ubl_smart_fillin_cmd);
|
1878
|
1882
|
MENU_ITEM(gcode, MSG_UBL_MANUAL_FILLIN, PSTR("G29 P2 B T0"));
|
1879
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1883
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1880
|
1884
|
END_MENU();
|
1881
|
1885
|
}
|
1882
|
1886
|
|
|
@@ -1928,7 +1932,7 @@ void kill_screen(const char* lcd_msg) {
|
1928
|
1932
|
MENU_ITEM(gcode, MSG_UBL_CONTINUE_MESH, PSTR("G29 P1 C"));
|
1929
|
1933
|
MENU_ITEM(function, MSG_UBL_INVALIDATE_ALL, _lcd_ubl_invalidate);
|
1930
|
1934
|
MENU_ITEM(gcode, MSG_UBL_INVALIDATE_CLOSEST, PSTR("G29 I"));
|
1931
|
|
- MENU_ITEM(submenu, MSG_WATCH, lcd_status_screen);
|
|
1935
|
+ MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
|
1932
|
1936
|
END_MENU();
|
1933
|
1937
|
}
|
1934
|
1938
|
|
|
@@ -4158,7 +4162,7 @@ void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) {
|
4158
|
4162
|
lcd_finishstatus(level > 0);
|
4159
|
4163
|
}
|
4160
|
4164
|
|
4161
|
|
-void lcd_setalertstatuspgm(const char * const message) {
|
|
4165
|
+void lcd_setalertstatusPGM(const char * const message) {
|
4162
|
4166
|
lcd_setstatusPGM(message, 1);
|
4163
|
4167
|
#if ENABLED(ULTIPANEL)
|
4164
|
4168
|
lcd_return_to_status();
|