|
@@ -422,7 +422,7 @@ static void lcd_main_menu() {
|
422
|
422
|
END_MENU();
|
423
|
423
|
}
|
424
|
424
|
|
425
|
|
-#if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART )
|
|
425
|
+#if defined(SDSUPPORT) && defined(MENU_ADDAUTOSTART)
|
426
|
426
|
static void lcd_autostart_sd() {
|
427
|
427
|
card.autostart_index = 0;
|
428
|
428
|
card.setroot();
|
|
@@ -431,7 +431,7 @@ static void lcd_main_menu() {
|
431
|
431
|
#endif
|
432
|
432
|
|
433
|
433
|
void lcd_set_home_offsets() {
|
434
|
|
- for(int8_t i=0; i < NUM_AXIS; i++) {
|
|
434
|
+ for (int8_t i=0; i < NUM_AXIS; i++) {
|
435
|
435
|
if (i != E_AXIS) {
|
436
|
436
|
home_offset[i] -= current_position[i];
|
437
|
437
|
current_position[i] = 0.0;
|
|
@@ -965,48 +965,49 @@ static void lcd_control_volumetric_menu() {
|
965
|
965
|
|
966
|
966
|
#ifdef DOGLCD
|
967
|
967
|
|
968
|
|
-static void lcd_set_contrast() {
|
969
|
|
- if (encoderPosition != 0) {
|
970
|
|
- lcd_contrast -= encoderPosition;
|
971
|
|
- if (lcd_contrast < 0) lcd_contrast = 0;
|
972
|
|
- else if (lcd_contrast > 63) lcd_contrast = 63;
|
973
|
|
- encoderPosition = 0;
|
974
|
|
- lcdDrawUpdate = 1;
|
975
|
|
- u8g.setContrast(lcd_contrast);
|
|
968
|
+ static void lcd_set_contrast() {
|
|
969
|
+ if (encoderPosition != 0) {
|
|
970
|
+ lcd_contrast -= encoderPosition;
|
|
971
|
+ lcd_contrast &= 0x3F;
|
|
972
|
+ encoderPosition = 0;
|
|
973
|
+ lcdDrawUpdate = 1;
|
|
974
|
+ u8g.setContrast(lcd_contrast);
|
|
975
|
+ }
|
|
976
|
+ if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
|
977
|
+ if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
976
|
978
|
}
|
977
|
|
- if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
978
|
|
- if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
979
|
|
-}
|
980
|
979
|
|
981
|
|
-#endif //DOGLCD
|
|
980
|
+#endif // DOGLCD
|
982
|
981
|
|
983
|
982
|
#ifdef FWRETRACT
|
984
|
983
|
|
985
|
|
-static void lcd_control_retract_menu() {
|
986
|
|
- START_MENU();
|
987
|
|
- MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
988
|
|
- MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
|
989
|
|
- MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
|
990
|
|
- #if EXTRUDERS > 1
|
991
|
|
- MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100);
|
992
|
|
- #endif
|
993
|
|
- MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate, 1, 999);
|
994
|
|
- MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999);
|
995
|
|
- MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, 0, 100);
|
996
|
|
- #if EXTRUDERS > 1
|
997
|
|
- MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, 0, 100);
|
998
|
|
- #endif
|
999
|
|
- MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
|
1000
|
|
- END_MENU();
|
1001
|
|
-}
|
|
984
|
+ static void lcd_control_retract_menu() {
|
|
985
|
+ START_MENU();
|
|
986
|
+ MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
|
987
|
+ MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
|
|
988
|
+ MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
|
|
989
|
+ #if EXTRUDERS > 1
|
|
990
|
+ MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100);
|
|
991
|
+ #endif
|
|
992
|
+ MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate, 1, 999);
|
|
993
|
+ MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999);
|
|
994
|
+ MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, 0, 100);
|
|
995
|
+ #if EXTRUDERS > 1
|
|
996
|
+ MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, 0, 100);
|
|
997
|
+ #endif
|
|
998
|
+ MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
|
|
999
|
+ END_MENU();
|
|
1000
|
+ }
|
1002
|
1001
|
|
1003
|
|
-#endif //FWRETRACT
|
|
1002
|
+#endif // FWRETRACT
|
1004
|
1003
|
|
1005
|
1004
|
#if SDCARDDETECT == -1
|
|
1005
|
+
|
1006
|
1006
|
static void lcd_sd_refresh() {
|
1007
|
1007
|
card.initsd();
|
1008
|
1008
|
currentMenuViewOffset = 0;
|
1009
|
1009
|
}
|
|
1010
|
+
|
1010
|
1011
|
#endif
|
1011
|
1012
|
|
1012
|
1013
|
static void lcd_sd_updir() {
|
|
@@ -1029,13 +1030,14 @@ void lcd_sdcard_menu() {
|
1029
|
1030
|
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
|
1030
|
1031
|
}
|
1031
|
1032
|
|
1032
|
|
- for(uint16_t i = 0; i < fileCnt; i++) {
|
|
1033
|
+ for (uint16_t i = 0; i < fileCnt; i++) {
|
1033
|
1034
|
if (_menuItemNr == _lineNr) {
|
1034
|
|
- #ifndef SDCARD_RATHERRECENTFIRST
|
1035
|
|
- card.getfilename(i);
|
1036
|
|
- #else
|
1037
|
|
- card.getfilename(fileCnt-1-i);
|
1038
|
|
- #endif
|
|
1035
|
+ card.getfilename(
|
|
1036
|
+ #ifdef SDCARD_RATHERRECENTFIRST
|
|
1037
|
+ fileCnt-1 -
|
|
1038
|
+ #endif
|
|
1039
|
+ i
|
|
1040
|
+ );
|
1039
|
1041
|
if (card.filenameIsDir)
|
1040
|
1042
|
MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename);
|
1041
|
1043
|
else
|
|
@@ -1456,7 +1458,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
1456
|
1458
|
|
1457
|
1459
|
#ifdef DOGLCD
|
1458
|
1460
|
void lcd_setcontrast(uint8_t value) {
|
1459
|
|
- lcd_contrast = value & 63;
|
|
1461
|
+ lcd_contrast = value & 0x3F;
|
1460
|
1462
|
u8g.setContrast(lcd_contrast);
|
1461
|
1463
|
}
|
1462
|
1464
|
#endif
|