|
@@ -55,13 +55,14 @@ static void lcd_status_screen();
|
55
|
55
|
static void lcd_control_temperature_preheat_abs_settings_menu();
|
56
|
56
|
static void lcd_control_motion_menu();
|
57
|
57
|
static void lcd_control_volumetric_menu();
|
|
58
|
+
|
58
|
59
|
#if ENABLED(HAS_LCD_CONTRAST)
|
59
|
60
|
static void lcd_set_contrast();
|
60
|
61
|
#endif
|
|
62
|
+
|
61
|
63
|
#if ENABLED(FWRETRACT)
|
62
|
64
|
static void lcd_control_retract_menu();
|
63
|
65
|
#endif
|
64
|
|
- static void lcd_sdcard_menu();
|
65
|
66
|
|
66
|
67
|
#if ENABLED(DELTA_CALIBRATION_MENU)
|
67
|
68
|
static void lcd_delta_calibrate_menu();
|
|
@@ -79,8 +80,6 @@ static void lcd_status_screen();
|
79
|
80
|
static void menu_action_submenu(menuFunc_t data);
|
80
|
81
|
static void menu_action_gcode(const char* pgcode);
|
81
|
82
|
static void menu_action_function(menuFunc_t data);
|
82
|
|
- static void menu_action_sdfile(const char* filename, char* longFilename);
|
83
|
|
- static void menu_action_sddirectory(const char* filename, char* longFilename);
|
84
|
83
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr);
|
85
|
84
|
static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
|
86
|
85
|
static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue);
|
|
@@ -100,6 +99,12 @@ static void lcd_status_screen();
|
100
|
99
|
static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
101
|
100
|
static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc);
|
102
|
101
|
|
|
102
|
+ #if ENABLED(SDSUPPORT)
|
|
103
|
+ static void lcd_sdcard_menu();
|
|
104
|
+ static void menu_action_sdfile(const char* filename, char* longFilename);
|
|
105
|
+ static void menu_action_sddirectory(const char* filename, char* longFilename);
|
|
106
|
+ #endif
|
|
107
|
+
|
103
|
108
|
#define ENCODER_FEEDRATE_DEADZONE 10
|
104
|
109
|
|
105
|
110
|
#if DISABLED(LCD_I2C_VIKI)
|
|
@@ -578,8 +583,11 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
|
578
|
583
|
fanSpeed = fan;
|
579
|
584
|
lcd_return_to_status();
|
580
|
585
|
}
|
581
|
|
-void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
582
|
|
-void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
586
|
+
|
|
587
|
+#if TEMP_SENSOR_0 != 0
|
|
588
|
+ void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
589
|
+ void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); }
|
|
590
|
+#endif
|
583
|
591
|
|
584
|
592
|
#if EXTRUDERS > 1
|
585
|
593
|
void lcd_preheat_pla1() { _lcd_preheat(1, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); }
|
|
@@ -613,14 +621,15 @@ void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTem
|
613
|
621
|
void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, absPreheatHPBTemp, absPreheatFanSpeed); }
|
614
|
622
|
#endif
|
615
|
623
|
|
616
|
|
-static void lcd_preheat_pla_menu() {
|
617
|
|
- START_MENU();
|
618
|
|
- MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
619
|
|
- #if EXTRUDERS == 1
|
620
|
|
- MENU_ITEM(function, MSG_PREHEAT_PLA, lcd_preheat_pla0);
|
621
|
|
- #else
|
622
|
|
- MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0);
|
623
|
|
- #if EXTRUDERS > 1
|
|
624
|
+#if TEMP_SENSOR_0 != 0 && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0)
|
|
625
|
+
|
|
626
|
+ static void lcd_preheat_pla_menu() {
|
|
627
|
+ START_MENU();
|
|
628
|
+ MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
629
|
+ #if EXTRUDERS == 1
|
|
630
|
+ MENU_ITEM(function, MSG_PREHEAT_PLA, lcd_preheat_pla0);
|
|
631
|
+ #else
|
|
632
|
+ MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H1, lcd_preheat_pla0);
|
624
|
633
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H2, lcd_preheat_pla1);
|
625
|
634
|
#if EXTRUDERS > 2
|
626
|
635
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H3, lcd_preheat_pla2);
|
|
@@ -628,23 +637,21 @@ static void lcd_preheat_pla_menu() {
|
628
|
637
|
MENU_ITEM(function, MSG_PREHEAT_PLA_N MSG_H4, lcd_preheat_pla3);
|
629
|
638
|
#endif
|
630
|
639
|
#endif
|
|
640
|
+ MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123);
|
631
|
641
|
#endif
|
632
|
|
- MENU_ITEM(function, MSG_PREHEAT_PLA_ALL, lcd_preheat_pla0123);
|
633
|
|
- #endif
|
634
|
|
- #if TEMP_SENSOR_BED != 0
|
635
|
|
- MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly);
|
636
|
|
- #endif
|
637
|
|
- END_MENU();
|
638
|
|
-}
|
|
642
|
+ #if TEMP_SENSOR_BED != 0
|
|
643
|
+ MENU_ITEM(function, MSG_PREHEAT_PLA_BEDONLY, lcd_preheat_pla_bedonly);
|
|
644
|
+ #endif
|
|
645
|
+ END_MENU();
|
|
646
|
+ }
|
639
|
647
|
|
640
|
|
-static void lcd_preheat_abs_menu() {
|
641
|
|
- START_MENU();
|
642
|
|
- MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
643
|
|
- #if EXTRUDERS == 1
|
644
|
|
- MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs0);
|
645
|
|
- #else
|
646
|
|
- MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0);
|
647
|
|
- #if EXTRUDERS > 1
|
|
648
|
+ static void lcd_preheat_abs_menu() {
|
|
649
|
+ START_MENU();
|
|
650
|
+ MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
|
|
651
|
+ #if EXTRUDERS == 1
|
|
652
|
+ MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs0);
|
|
653
|
+ #else
|
|
654
|
+ MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H1, lcd_preheat_abs0);
|
648
|
655
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H2, lcd_preheat_abs1);
|
649
|
656
|
#if EXTRUDERS > 2
|
650
|
657
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H3, lcd_preheat_abs2);
|
|
@@ -652,14 +659,15 @@ static void lcd_preheat_abs_menu() {
|
652
|
659
|
MENU_ITEM(function, MSG_PREHEAT_ABS_N MSG_H4, lcd_preheat_abs3);
|
653
|
660
|
#endif
|
654
|
661
|
#endif
|
|
662
|
+ MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123);
|
655
|
663
|
#endif
|
656
|
|
- MENU_ITEM(function, MSG_PREHEAT_ABS_ALL, lcd_preheat_abs0123);
|
657
|
|
- #endif
|
658
|
|
- #if TEMP_SENSOR_BED != 0
|
659
|
|
- MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly);
|
660
|
|
- #endif
|
661
|
|
- END_MENU();
|
662
|
|
-}
|
|
664
|
+ #if TEMP_SENSOR_BED != 0
|
|
665
|
+ MENU_ITEM(function, MSG_PREHEAT_ABS_BEDONLY, lcd_preheat_abs_bedonly);
|
|
666
|
+ #endif
|
|
667
|
+ END_MENU();
|
|
668
|
+ }
|
|
669
|
+
|
|
670
|
+#endif // TEMP_SENSOR_0 && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_BED)
|
663
|
671
|
|
664
|
672
|
void lcd_cooldown() {
|
665
|
673
|
disable_all_heaters();
|
|
@@ -1441,24 +1449,25 @@ static void menu_action_back(menuFunc_t func) { lcd_goto_menu(func); }
|
1441
|
1449
|
static void menu_action_submenu(menuFunc_t func) { lcd_goto_menu(func); }
|
1442
|
1450
|
static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
|
1443
|
1451
|
static void menu_action_function(menuFunc_t func) { (*func)(); }
|
1444
|
|
-static void menu_action_sdfile(const char* filename, char* longFilename) {
|
1445
|
|
- char cmd[30];
|
1446
|
|
- char* c;
|
1447
|
|
- sprintf_P(cmd, PSTR("M23 %s"), filename);
|
1448
|
|
- for(c = &cmd[4]; *c; c++) *c = tolower(*c);
|
1449
|
|
- enqueuecommand(cmd);
|
1450
|
|
- enqueuecommands_P(PSTR("M24"));
|
1451
|
|
- lcd_return_to_status();
|
1452
|
|
-}
|
1453
|
1452
|
|
1454
|
1453
|
#if ENABLED(SDSUPPORT)
|
1455
|
1454
|
|
|
1455
|
+ static void menu_action_sdfile(const char* filename, char* longFilename) {
|
|
1456
|
+ char cmd[30];
|
|
1457
|
+ char* c;
|
|
1458
|
+ sprintf_P(cmd, PSTR("M23 %s"), filename);
|
|
1459
|
+ for(c = &cmd[4]; *c; c++) *c = tolower(*c);
|
|
1460
|
+ enqueuecommand(cmd);
|
|
1461
|
+ enqueuecommands_P(PSTR("M24"));
|
|
1462
|
+ lcd_return_to_status();
|
|
1463
|
+ }
|
|
1464
|
+
|
1456
|
1465
|
static void menu_action_sddirectory(const char* filename, char* longFilename) {
|
1457
|
1466
|
card.chdir(filename);
|
1458
|
1467
|
encoderPosition = 0;
|
1459
|
1468
|
}
|
1460
|
1469
|
|
1461
|
|
-#endif
|
|
1470
|
+#endif //SDSUPPORT
|
1462
|
1471
|
|
1463
|
1472
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); }
|
1464
|
1473
|
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) {
|