|
@@ -55,6 +55,8 @@
|
|
|
#endif
|
|
|
|
|
|
|
|
|
+int clock_interval = 0;
|
|
|
+
|
|
|
static void lcd_sd_updir();
|
|
|
static void lcd_mesh_bed_leveling_settings();
|
|
|
static void lcd_backlight_menu();
|
|
@@ -505,176 +507,212 @@ void lcdui_print_cmd_diag(void)
|
|
|
|
|
|
void lcdui_print_time(void)
|
|
|
{
|
|
|
-
|
|
|
- uint16_t print_t = 0;
|
|
|
- if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
|
|
|
- print_t = print_time_remaining();
|
|
|
- else if(starttime != 0)
|
|
|
- print_t = _millis() / 60000 - starttime / 60000;
|
|
|
- int chars = 0;
|
|
|
- if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (starttime != 0)))
|
|
|
- {
|
|
|
- char suff = ' ';
|
|
|
- char suff_doubt = ' ';
|
|
|
- if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
|
|
|
- {
|
|
|
- suff = 'R';
|
|
|
- if (feedmultiply != 100)
|
|
|
- suff_doubt = '?';
|
|
|
- }
|
|
|
- if (print_t < 6000)
|
|
|
- chars = lcd_printf_P(_N("%c%02u:%02u%c%c"), LCD_STR_CLOCK[0], print_t / 60, print_t % 60, suff, suff_doubt);
|
|
|
- else
|
|
|
- chars = lcd_printf_P(_N("%c%3uh %c%c"), LCD_STR_CLOCK[0], print_t / 60, suff, suff_doubt);
|
|
|
- }
|
|
|
- else
|
|
|
- chars = lcd_printf_P(_N("%c--:-- "), LCD_STR_CLOCK[0]);
|
|
|
- lcd_space(8 - chars);
|
|
|
+
|
|
|
+ int chars = 0;
|
|
|
+ if ((PRINTER_ACTIVE) && (starttime != 0))
|
|
|
+ {
|
|
|
+ uint16_t print_t = 0;
|
|
|
+ uint16_t print_tr = 0;
|
|
|
+ uint16_t print_tc = 0;
|
|
|
+ char suff = ' ';
|
|
|
+ char suff_doubt = ' ';
|
|
|
+
|
|
|
+#ifdef TMC2130
|
|
|
+ if (SilentModeMenu != SILENT_MODE_OFF)
|
|
|
+ {
|
|
|
+ if (print_time_remaining_silent != PRINT_TIME_REMAINING_INIT)
|
|
|
+ {
|
|
|
+ print_tr = print_time_remaining_silent;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (print_time_to_change_silent != PRINT_TIME_REMAINING_INIT)
|
|
|
+ {
|
|
|
+ print_tc = print_time_to_change_silent;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+#endif
|
|
|
+ if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
|
|
|
+ {
|
|
|
+ print_tr = print_time_remaining_normal;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (print_time_to_change_normal != PRINT_TIME_REMAINING_INIT)
|
|
|
+ {
|
|
|
+ print_tc = print_time_to_change_normal;
|
|
|
+ }
|
|
|
+
|
|
|
+#ifdef TMC2130
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ if (clock_interval == CLOCK_INTERVAL_TIME*2)
|
|
|
+ {
|
|
|
+ clock_interval = 0;
|
|
|
+ }
|
|
|
+ clock_interval++;
|
|
|
+
|
|
|
+ if (print_tc != 0 && clock_interval > CLOCK_INTERVAL_TIME)
|
|
|
+ {
|
|
|
+ print_t = print_tc;
|
|
|
+ suff = 'C';
|
|
|
+ }
|
|
|
+ else
|
|
|
+
|
|
|
+ if (print_tr != 0)
|
|
|
+ {
|
|
|
+ print_t = print_tr;
|
|
|
+ suff = 'R';
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ print_t = _millis() / 60000 - starttime / 60000;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (feedmultiply != 100 && (print_t == print_tr || print_t == print_tc))
|
|
|
+ {
|
|
|
+ suff_doubt = '?';
|
|
|
+ print_t = 100ul * print_t / feedmultiply;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (print_t < 6000)
|
|
|
+ chars = lcd_printf_P(_N("%c%02u:%02u%c%c"), LCD_STR_CLOCK[0], print_t / 60, print_t % 60, suff, suff_doubt);
|
|
|
+ else
|
|
|
+ chars = lcd_printf_P(_N("%c%3uh %c%c"), LCD_STR_CLOCK[0], print_t / 60, suff, suff_doubt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ chars = lcd_printf_P(_N("%c--:-- "), LCD_STR_CLOCK[0]);
|
|
|
+ lcd_space(8 - chars);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
void lcdui_print_status_line(void)
|
|
|
{
|
|
|
- if (heating_status)
|
|
|
- {
|
|
|
- heating_status_counter++;
|
|
|
- if (heating_status_counter > 13)
|
|
|
- {
|
|
|
- heating_status_counter = 0;
|
|
|
- }
|
|
|
- lcd_set_cursor(7, 3);
|
|
|
- lcd_space(13);
|
|
|
+ if (heating_status) {
|
|
|
+ heating_status_counter++;
|
|
|
+ if (heating_status_counter > 13) {
|
|
|
+ heating_status_counter = 0;
|
|
|
+ }
|
|
|
+ lcd_set_cursor(7, 3);
|
|
|
+ lcd_space(13);
|
|
|
|
|
|
- for (unsigned int dots = 0; dots < heating_status_counter; dots++)
|
|
|
- {
|
|
|
- lcd_putc_at(7 + dots, 3, '.');
|
|
|
- }
|
|
|
- switch (heating_status)
|
|
|
- {
|
|
|
- case 1:
|
|
|
- lcd_puts_at_P(0, 3, _T(MSG_HEATING));
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- lcd_puts_at_P(0, 3, _T(MSG_HEATING_COMPLETE));
|
|
|
- heating_status = 0;
|
|
|
- heating_status_counter = 0;
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- lcd_puts_at_P(0, 3, _T(MSG_BED_HEATING));
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- lcd_puts_at_P(0, 3, _T(MSG_BED_DONE));
|
|
|
- heating_status = 0;
|
|
|
- heating_status_counter = 0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- else if ((IS_SD_PRINTING) && (custom_message_type == CustomMsg::Status))
|
|
|
- {
|
|
|
+ for (unsigned int dots = 0; dots < heating_status_counter; dots++) {
|
|
|
+ lcd_putc_at(7 + dots, 3, '.');
|
|
|
+ }
|
|
|
+ switch (heating_status) {
|
|
|
+ case 1:
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_HEATING));
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_HEATING_COMPLETE));
|
|
|
+ heating_status = 0;
|
|
|
+ heating_status_counter = 0;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_BED_HEATING));
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_BED_DONE));
|
|
|
+ heating_status = 0;
|
|
|
+ heating_status_counter = 0;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if ((IS_SD_PRINTING) && (custom_message_type == CustomMsg::Status)) {
|
|
|
const char* longFilenameOLD = (card.longFilename[0] ? card.longFilename : card.filename);
|
|
|
- if(strlen(longFilenameOLD) > LCD_WIDTH)
|
|
|
- {
|
|
|
- int inters = 0;
|
|
|
- int gh = scrollstuff;
|
|
|
- while (((gh - scrollstuff) < LCD_WIDTH) && (inters == 0))
|
|
|
- {
|
|
|
- if (longFilenameOLD[gh] == '\0')
|
|
|
- {
|
|
|
- lcd_set_cursor(gh - scrollstuff, 3);
|
|
|
- lcd_print(longFilenameOLD[gh - 1]);
|
|
|
- scrollstuff = 0;
|
|
|
- gh = scrollstuff;
|
|
|
- inters = 1;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- lcd_set_cursor(gh - scrollstuff, 3);
|
|
|
- lcd_print(longFilenameOLD[gh - 1]);
|
|
|
- gh++;
|
|
|
- }
|
|
|
- }
|
|
|
- scrollstuff++;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- lcd_printf_P(PSTR("%-20s"), longFilenameOLD);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- switch (custom_message_type)
|
|
|
- {
|
|
|
- case CustomMsg::Status:
|
|
|
- lcd_print(lcd_status_message);
|
|
|
- break;
|
|
|
- case CustomMsg::MeshBedLeveling:
|
|
|
- if (custom_message_state > 10)
|
|
|
- {
|
|
|
- lcd_set_cursor(0, 3);
|
|
|
- lcd_space(20);
|
|
|
- lcd_puts_at_P(0, 3, _T(MSG_CALIBRATE_Z_AUTO));
|
|
|
- lcd_puts_P(PSTR(" : "));
|
|
|
- lcd_print(custom_message_state-10);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (custom_message_state == 3)
|
|
|
- {
|
|
|
- lcd_puts_P(_T(WELCOME_MSG));
|
|
|
- lcd_setstatuspgm(_T(WELCOME_MSG));
|
|
|
- custom_message_type = CustomMsg::Status;
|
|
|
- }
|
|
|
- if (custom_message_state > 3 && custom_message_state <= 10 )
|
|
|
- {
|
|
|
- lcd_set_cursor(0, 3);
|
|
|
- lcd_space(19);
|
|
|
- lcd_puts_at_P(0, 3, _i("Calibration done"));
|
|
|
- custom_message_state--;
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case CustomMsg::FilamentLoading:
|
|
|
- lcd_print(lcd_status_message);
|
|
|
- break;
|
|
|
- case CustomMsg::PidCal:
|
|
|
- lcd_print(lcd_status_message);
|
|
|
- if (pid_cycle <= pid_number_of_cycles && custom_message_state > 0)
|
|
|
- {
|
|
|
- lcd_set_cursor(10, 3);
|
|
|
- lcd_print(itostr3(pid_cycle));
|
|
|
- lcd_print('/');
|
|
|
- lcd_print(itostr3left(pid_number_of_cycles));
|
|
|
- }
|
|
|
- break;
|
|
|
- case CustomMsg::TempCal:
|
|
|
- {
|
|
|
- char statusLine[LCD_WIDTH + 1];
|
|
|
- sprintf_P(statusLine, PSTR("%-20S"), _T(MSG_TEMP_CALIBRATION));
|
|
|
- char progress[4];
|
|
|
- sprintf_P(progress, PSTR("%d/6"), custom_message_state);
|
|
|
- memcpy(statusLine + 12, progress, sizeof(progress) - 1);
|
|
|
- lcd_set_cursor(0, 3);
|
|
|
- lcd_print(statusLine);
|
|
|
- }
|
|
|
- break;
|
|
|
- case CustomMsg::TempCompPreheat:
|
|
|
- lcd_puts_at_P(0, 3, _i("PINDA Heating"));
|
|
|
- if (custom_message_state <= PINDA_HEAT_T)
|
|
|
- {
|
|
|
- lcd_puts_P(PSTR(": "));
|
|
|
- lcd_print(custom_message_state);
|
|
|
- lcd_print(' ');
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ if(strlen(longFilenameOLD) > LCD_WIDTH) {
|
|
|
+ int inters = 0;
|
|
|
+ int gh = scrollstuff;
|
|
|
+ while (((gh - scrollstuff) < LCD_WIDTH) && (inters == 0)) {
|
|
|
+ if (longFilenameOLD[gh] == '\0') {
|
|
|
+ lcd_set_cursor(gh - scrollstuff, 3);
|
|
|
+ lcd_print(longFilenameOLD[gh - 1]);
|
|
|
+ scrollstuff = 0;
|
|
|
+ gh = scrollstuff;
|
|
|
+ inters = 1;
|
|
|
+ } else {
|
|
|
+ lcd_set_cursor(gh - scrollstuff, 3);
|
|
|
+ lcd_print(longFilenameOLD[gh - 1]);
|
|
|
+ gh++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ scrollstuff++;
|
|
|
+ } else {
|
|
|
+ lcd_printf_P(PSTR("%-20s"), longFilenameOLD);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ switch (custom_message_type) {
|
|
|
+ case CustomMsg::MsgUpdate:
|
|
|
+ case CustomMsg::Status:
|
|
|
+ case CustomMsg::M0Wait:
|
|
|
+ lcd_print(lcd_status_message);
|
|
|
+ break;
|
|
|
+ case CustomMsg::MeshBedLeveling:
|
|
|
+ if (custom_message_state > 10) {
|
|
|
+ lcd_set_cursor(0, 3);
|
|
|
+ lcd_space(20);
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_CALIBRATE_Z_AUTO));
|
|
|
+ lcd_puts_P(PSTR(" : "));
|
|
|
+ lcd_print(custom_message_state-10);
|
|
|
+ } else {
|
|
|
+ if (custom_message_state == 3)
|
|
|
+ {
|
|
|
+ lcd_puts_P(_T(WELCOME_MSG));
|
|
|
+ lcd_setstatuspgm(_T(WELCOME_MSG));
|
|
|
+ custom_message_type = CustomMsg::Status;
|
|
|
+ }
|
|
|
+ if (custom_message_state > 3 && custom_message_state <= 10 ) {
|
|
|
+ lcd_set_cursor(0, 3);
|
|
|
+ lcd_space(19);
|
|
|
+ lcd_puts_at_P(0, 3, _i("Calibration done"));
|
|
|
+ custom_message_state--;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case CustomMsg::FilamentLoading:
|
|
|
+ lcd_print(lcd_status_message);
|
|
|
+ break;
|
|
|
+ case CustomMsg::PidCal:
|
|
|
+ lcd_print(lcd_status_message);
|
|
|
+ if (pid_cycle <= pid_number_of_cycles && custom_message_state > 0) {
|
|
|
+ lcd_set_cursor(10, 3);
|
|
|
+ lcd_print(itostr3(pid_cycle));
|
|
|
+ lcd_print('/');
|
|
|
+ lcd_print(itostr3left(pid_number_of_cycles));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case CustomMsg::TempCal:
|
|
|
+ char statusLine[LCD_WIDTH + 1];
|
|
|
+ sprintf_P(statusLine, PSTR("%-20S"), _T(MSG_TEMP_CALIBRATION));
|
|
|
+ char progress[4];
|
|
|
+ sprintf_P(progress, PSTR("%d/6"), custom_message_state);
|
|
|
+ memcpy(statusLine + 12, progress, sizeof(progress) - 1);
|
|
|
+ lcd_set_cursor(0, 3);
|
|
|
+ lcd_print(statusLine);
|
|
|
+ break;
|
|
|
+ case CustomMsg::TempCompPreheat:
|
|
|
+ lcd_puts_at_P(0, 3, _i("PINDA Heating"));
|
|
|
+ if (custom_message_state <= PINDA_HEAT_T) {
|
|
|
+ lcd_puts_P(PSTR(": "));
|
|
|
+ lcd_print(custom_message_state);
|
|
|
+ lcd_print(' ');
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case CustomMsg::Resuming:
|
|
|
+ lcd_puts_at_P(0, 3, _T(MSG_RESUMING_PRINT));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- for(int fillspace = 0; fillspace < 20; fillspace++)
|
|
|
- if ((lcd_status_message[fillspace] <= 31 ))
|
|
|
- lcd_print(' ');
|
|
|
+ for(int fillspace = 0; fillspace < 20; fillspace++)
|
|
|
+ if ((lcd_status_message[fillspace] <= 31 ))
|
|
|
+ lcd_print(' ');
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1346,17 +1384,22 @@ void lcd_return_to_status()
|
|
|
eFilamentAction = FilamentAction::None;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
void lcd_pause_print()
|
|
|
{
|
|
|
- SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
|
|
stop_and_save_print_to_ram(0.0, -default_retraction);
|
|
|
lcd_return_to_status();
|
|
|
isPrintPaused = true;
|
|
|
- if (LcdCommands::Idle == lcd_commands_type)
|
|
|
- {
|
|
|
+ if (LcdCommands::Idle == lcd_commands_type) {
|
|
|
lcd_commands_type = LcdCommands::LongPause;
|
|
|
}
|
|
|
+ SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+void lcd_pause_usb_print()
|
|
|
+{
|
|
|
+ SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1404,8 +1447,8 @@ static void pgmtext_with_colon(const char *ipgmLabel, char *dst, uint8_t dstSize
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1419,40 +1462,14 @@ void lcd_menu_extruder_info()
|
|
|
char nozzle[maxChars], print[maxChars];
|
|
|
pgmtext_with_colon(_i("Nozzle FAN"), nozzle, maxChars);
|
|
|
pgmtext_with_colon(_i("Print FAN"), print, maxChars);
|
|
|
- lcd_printf_P(_N("%s %4d RPM\n" "%s %4d RPM\n"), nozzle, 60*fan_speed[0], print, 60*fan_speed[1] );
|
|
|
-
|
|
|
-#ifdef PAT9125
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if (mmu_enabled == false)
|
|
|
- {
|
|
|
- if (!fsensor_enabled)
|
|
|
- lcd_puts_P(_N("Filament sensor\n" "is disabled."));
|
|
|
- else
|
|
|
- {
|
|
|
- if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
- pat9125_update();
|
|
|
- lcd_printf_P(_N(
|
|
|
- "Fil. Xd:%3d Yd:%3d\n"
|
|
|
- "Int: %3d "
|
|
|
- "Shut: %3d"
|
|
|
- ),
|
|
|
- pat9125_x, pat9125_y,
|
|
|
- pat9125_b, pat9125_s
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
-#endif
|
|
|
-
|
|
|
+ lcd_printf_P(_N("%s %4d RPM\n" "%s %4d RPM\n"), nozzle, 60*fan_speed[0], print, 60*fan_speed[1] );
|
|
|
menu_back_if_clicked();
|
|
|
}
|
|
|
|
|
|
+static uint16_t __attribute__((noinline)) clamp999(uint16_t v){
|
|
|
+ return v > 999 ? 999 : v;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1477,8 +1494,8 @@ static void lcd_menu_fails_stats_mmu()
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1486,13 +1503,11 @@ static void lcd_menu_fails_stats_mmu()
|
|
|
static void lcd_menu_fails_stats_mmu_print()
|
|
|
{
|
|
|
lcd_timeoutToStatus.stop();
|
|
|
- uint8_t fails = eeprom_read_byte((uint8_t*)EEPROM_MMU_FAIL);
|
|
|
- uint16_t load_fails = eeprom_read_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL);
|
|
|
lcd_home();
|
|
|
lcd_printf_P(PSTR("%S\n" " %-16.16S%-3d\n" " %-16.16S%-3d"),
|
|
|
_T(MSG_LAST_PRINT_FAILURES),
|
|
|
- _T(MSG_MMU_FAILS), fails,
|
|
|
- _T(MSG_MMU_LOAD_FAILS), load_fails);
|
|
|
+ _T(MSG_MMU_FAILS), clamp999( eeprom_read_byte((uint8_t*)EEPROM_MMU_FAIL) ),
|
|
|
+ _T(MSG_MMU_LOAD_FAILS), clamp999( eeprom_read_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL) ));
|
|
|
menu_back_if_clicked_fb();
|
|
|
}
|
|
|
|
|
@@ -1501,9 +1516,9 @@ static void lcd_menu_fails_stats_mmu_print()
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1511,14 +1526,12 @@ static void lcd_menu_fails_stats_mmu_total()
|
|
|
{
|
|
|
mmu_command(MmuCmd::S3);
|
|
|
lcd_timeoutToStatus.stop();
|
|
|
- uint8_t fails = eeprom_read_byte((uint8_t*)EEPROM_MMU_FAIL_TOT);
|
|
|
- uint16_t load_fails = eeprom_read_byte((uint8_t*)EEPROM_MMU_LOAD_FAIL_TOT);
|
|
|
lcd_home();
|
|
|
lcd_printf_P(PSTR("%S\n" " %-16.16S%-3d\n" " %-16.16S%-3d\n" " %-16.16S%-3d"),
|
|
|
_T(MSG_TOTAL_FAILURES),
|
|
|
- _T(MSG_MMU_FAILS), fails,
|
|
|
- _T(MSG_MMU_LOAD_FAILS), load_fails,
|
|
|
- _i("MMU power fails"), mmu_power_failures);
|
|
|
+ _T(MSG_MMU_FAILS), clamp999( eeprom_read_word((uint16_t*)EEPROM_MMU_FAIL_TOT) ),
|
|
|
+ _T(MSG_MMU_LOAD_FAILS), clamp999( eeprom_read_word((uint16_t*)EEPROM_MMU_LOAD_FAIL_TOT) ),
|
|
|
+ _i("MMU power fails"), clamp999( mmu_power_failures ));
|
|
|
menu_back_if_clicked_fb();
|
|
|
}
|
|
|
|
|
@@ -1530,8 +1543,8 @@ static const char failStatsFmt[] PROGMEM = "%S\n" " %-16.16S%-3d\n" " %-16.16S%-
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1539,16 +1552,14 @@ static const char failStatsFmt[] PROGMEM = "%S\n" " %-16.16S%-3d\n" " %-16.16S%-
|
|
|
static void lcd_menu_fails_stats_total()
|
|
|
{
|
|
|
lcd_timeoutToStatus.stop();
|
|
|
- uint16_t power = eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT);
|
|
|
- uint16_t filam = eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT);
|
|
|
- uint16_t crashX = eeprom_read_word((uint16_t*)EEPROM_CRASH_COUNT_X_TOT);
|
|
|
- uint16_t crashY = eeprom_read_word((uint16_t*)EEPROM_CRASH_COUNT_Y_TOT);
|
|
|
- lcd_home();
|
|
|
+ lcd_home();
|
|
|
lcd_printf_P(failStatsFmt,
|
|
|
_T(MSG_TOTAL_FAILURES),
|
|
|
- _T(MSG_POWER_FAILURES), power,
|
|
|
- _T(MSG_FIL_RUNOUTS), filam,
|
|
|
- _T(MSG_CRASH), crashX, crashY);
|
|
|
+ _T(MSG_POWER_FAILURES), clamp999( eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT) ),
|
|
|
+ _T(MSG_FIL_RUNOUTS), clamp999( eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) ),
|
|
|
+ _T(MSG_CRASH),
|
|
|
+ clamp999( eeprom_read_word((uint16_t*)EEPROM_CRASH_COUNT_X_TOT) ),
|
|
|
+ clamp999( eeprom_read_word((uint16_t*)EEPROM_CRASH_COUNT_Y_TOT) ));
|
|
|
menu_back_if_clicked_fb();
|
|
|
}
|
|
|
|
|
@@ -1557,11 +1568,22 @@ static void lcd_menu_fails_stats_total()
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
static void lcd_menu_fails_stats_print()
|
|
|
{
|
|
@@ -1574,8 +1596,8 @@ static void lcd_menu_fails_stats_print()
|
|
|
#ifndef PAT9125
|
|
|
lcd_printf_P(failStatsFmt,
|
|
|
_T(MSG_LAST_PRINT_FAILURES),
|
|
|
- _T(MSG_POWER_FAILURES), power,
|
|
|
- _T(MSG_FIL_RUNOUTS), filam,
|
|
|
+ _T(MSG_POWER_FAILURES), power,
|
|
|
+ _T(MSG_FIL_RUNOUTS), filam,
|
|
|
_T(MSG_CRASH), crashX, crashY);
|
|
|
#else
|
|
|
|
|
@@ -1584,7 +1606,7 @@ static void lcd_menu_fails_stats_print()
|
|
|
" %-7.7S H %-3d S %-3d\n"
|
|
|
" %-7.7S X %-3d Y %-3d"),
|
|
|
_T(MSG_LAST_PRINT_FAILURES),
|
|
|
- _T(MSG_POWER_FAILURES), power,
|
|
|
+ _T(MSG_POWER_FAILURES), power,
|
|
|
_i("Runouts"), filam, fsensor_softfail,
|
|
|
_T(MSG_CRASH), crashX, crashY);
|
|
|
#endif
|
|
@@ -1627,9 +1649,9 @@ static const char failStatsFmt[] PROGMEM = "%S\n" " %-16.16S%-3d\n" "%S\n" " %-1
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1637,13 +1659,13 @@ static void lcd_menu_fails_stats()
|
|
|
{
|
|
|
lcd_timeoutToStatus.stop();
|
|
|
uint8_t filamentLast = eeprom_read_byte((uint8_t*)EEPROM_FERROR_COUNT);
|
|
|
- uint16_t filamentTotal = eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT);
|
|
|
+ uint16_t filamentTotal = clamp999( eeprom_read_word((uint16_t*)EEPROM_FERROR_COUNT_TOT) );
|
|
|
lcd_home();
|
|
|
lcd_printf_P(failStatsFmt,
|
|
|
_T(MSG_LAST_PRINT_FAILURES),
|
|
|
- _T(MSG_FIL_RUNOUTS), filamentLast,
|
|
|
+ _T(MSG_FIL_RUNOUTS), filamentLast,
|
|
|
_T(MSG_TOTAL_FAILURES),
|
|
|
- _T(MSG_FIL_RUNOUTS), filamentTotal);
|
|
|
+ _T(MSG_FIL_RUNOUTS), filamentTotal);
|
|
|
|
|
|
menu_back_if_clicked();
|
|
|
}
|
|
@@ -3731,6 +3753,16 @@ static void lcd_print_state(uint8_t state)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
static void lcd_show_sensors_state()
|
|
|
{
|
|
|
|
|
@@ -3743,21 +3775,56 @@ static void lcd_show_sensors_state()
|
|
|
{
|
|
|
finda_state = mmu_finda;
|
|
|
}
|
|
|
+
|
|
|
+ lcd_puts_at_P(0, 0, _i("PINDA"));
|
|
|
+ lcd_set_cursor(LCD_WIDTH - 14, 0);
|
|
|
+ lcd_print_state(pinda_state);
|
|
|
+
|
|
|
+ if (mmu_enabled == true)
|
|
|
+ {
|
|
|
+ lcd_puts_at_P(10, 0, _i("FINDA"));
|
|
|
+ lcd_set_cursor(LCD_WIDTH - 3, 0);
|
|
|
+ lcd_print_state(finda_state);
|
|
|
+ }
|
|
|
+
|
|
|
if (ir_sensor_detected) {
|
|
|
idler_state = !READ(IR_SENSOR_PIN);
|
|
|
+ lcd_puts_at_P(0, 1, _i("Fil. sensor"));
|
|
|
+ lcd_set_cursor(LCD_WIDTH - 3, 1);
|
|
|
+ lcd_print_state(idler_state);
|
|
|
}
|
|
|
- lcd_puts_at_P(0, 0, _i("Sensor state"));
|
|
|
- lcd_puts_at_P(1, 1, _i("PINDA:"));
|
|
|
- lcd_set_cursor(LCD_WIDTH - 4, 1);
|
|
|
- lcd_print_state(pinda_state);
|
|
|
-
|
|
|
- lcd_puts_at_P(1, 2, _i("FINDA:"));
|
|
|
- lcd_set_cursor(LCD_WIDTH - 4, 2);
|
|
|
- lcd_print_state(finda_state);
|
|
|
|
|
|
- lcd_puts_at_P(1, 3, _i("IR:"));
|
|
|
- lcd_set_cursor(LCD_WIDTH - 4, 3);
|
|
|
- lcd_print_state(idler_state);
|
|
|
+
|
|
|
+#ifdef PAT9125
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (mmu_enabled == false)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
+ pat9125_update();
|
|
|
+ lcd_set_cursor(0, 2);
|
|
|
+ lcd_printf_P(_N(
|
|
|
+ "Xd: %3d "
|
|
|
+ "Yd: %3d\n"
|
|
|
+ "Int: %3d "
|
|
|
+ "Shut: %3d"
|
|
|
+ ),
|
|
|
+ pat9125_x, pat9125_y,
|
|
|
+ pat9125_b, pat9125_s
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void lcd_menu_show_sensors_state()
|
|
@@ -4726,7 +4793,7 @@ void lcd_wizard(WizState state)
|
|
|
{
|
|
|
using S = WizState;
|
|
|
bool end = false;
|
|
|
- int wizard_event;
|
|
|
+ int8_t wizard_event;
|
|
|
const char *msg = NULL;
|
|
|
|
|
|
|
|
@@ -4750,14 +4817,18 @@ void lcd_wizard(WizState state)
|
|
|
|
|
|
saved_printing = false;
|
|
|
|
|
|
- wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"), false, true);
|
|
|
- if (wizard_event) {
|
|
|
+ if( eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)==2){
|
|
|
+ lcd_show_fullscreen_message_and_wait_P(MSG_WIZARD_WELCOME_SHIPPING);
|
|
|
state = S::Restore;
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1);
|
|
|
- }
|
|
|
- else {
|
|
|
- eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
|
|
|
- end = true;
|
|
|
+ } else {
|
|
|
+ wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(MSG_WIZARD_WELCOME, false, true);
|
|
|
+ if (wizard_event) {
|
|
|
+ state = S::Restore;
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1);
|
|
|
+ } else {
|
|
|
+ eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 0);
|
|
|
+ end = true;
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case S::Restore:
|
|
@@ -5900,15 +5971,15 @@ uint8_t choose_menu_P(const char *header, const char *item, const char *last_ite
|
|
|
char reset_menu() {
|
|
|
const uint8_t items_no =
|
|
|
#ifdef SNMM
|
|
|
- 5;
|
|
|
+ 6;
|
|
|
#else
|
|
|
- 4;
|
|
|
+ 5;
|
|
|
#endif
|
|
|
static int8_t first = 0;
|
|
|
int8_t enc_dif = 0;
|
|
|
char cursor_pos = 0;
|
|
|
|
|
|
- const char *const item[items_no] PROGMEM = {PSTR("Language"), PSTR("Statistics"), PSTR("Shipping prep"), PSTR("All Data")
|
|
|
+ const char *const item[items_no] PROGMEM = {PSTR("Language"), PSTR("Statistics"), PSTR("Shipping prep"), PSTR("All Data"), PSTR("Service prep")
|
|
|
#ifdef SNMM
|
|
|
, PSTR("Bowden length")
|
|
|
#endif
|
|
@@ -6286,25 +6357,33 @@ static bool fan_error_selftest()
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
void lcd_resume_print()
|
|
|
{
|
|
|
lcd_return_to_status();
|
|
|
lcd_reset_alert_level();
|
|
|
- if (fan_error_selftest()) return;
|
|
|
+ if (fan_error_selftest()) {
|
|
|
+ if (is_usb_printing) SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
|
|
+ return;
|
|
|
+ }
|
|
|
cmdqueue_serial_disabled = false;
|
|
|
-
|
|
|
lcd_setstatuspgm(_T(MSG_FINISHING_MOVEMENTS));
|
|
|
st_synchronize();
|
|
|
-
|
|
|
- lcd_setstatuspgm(_T(MSG_RESUMING_PRINT));
|
|
|
+ custom_message_type = CustomMsg::Resuming;
|
|
|
isPrintPaused = false;
|
|
|
restore_print_from_ram_and_continue(default_retraction);
|
|
|
pause_time += (_millis() - start_pause_print);
|
|
|
refresh_cmd_timeout();
|
|
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUMED);
|
|
|
+ custom_message_type = CustomMsg::Status;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+void lcd_resume_usb_print()
|
|
|
+{
|
|
|
+ SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUME);
|
|
|
}
|
|
|
|
|
|
static void change_sheet()
|
|
@@ -6403,174 +6482,183 @@ static void lcd_sheet_menu()
|
|
|
MENU_END();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
static void lcd_main_menu()
|
|
|
{
|
|
|
|
|
|
- MENU_BEGIN();
|
|
|
+ MENU_BEGIN();
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
- MENU_ITEM_BACK_P(_T(MSG_WATCH));
|
|
|
+ MENU_ITEM_BACK_P(_T(MSG_WATCH));
|
|
|
|
|
|
#ifdef RESUME_DEBUG
|
|
|
- if (!saved_printing)
|
|
|
- MENU_ITEM_FUNCTION_P(PSTR("tst - Save"), lcd_menu_test_save);
|
|
|
- else
|
|
|
- MENU_ITEM_FUNCTION_P(PSTR("tst - Restore"), lcd_menu_test_restore);
|
|
|
+ if (!saved_printing)
|
|
|
+ MENU_ITEM_FUNCTION_P(PSTR("tst - Save"), lcd_menu_test_save);
|
|
|
+ else
|
|
|
+ MENU_ITEM_FUNCTION_P(PSTR("tst - Restore"), lcd_menu_test_restore);
|
|
|
#endif
|
|
|
|
|
|
#ifdef TMC2130_DEBUG
|
|
|
- MENU_ITEM_FUNCTION_P(PSTR("recover print"), recover_print);
|
|
|
- MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
|
|
|
+ MENU_ITEM_FUNCTION_P(PSTR("recover print"), recover_print);
|
|
|
+ MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
|
|
|
#endif
|
|
|
-
|
|
|
- if ( ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal)) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) && !homing_flag && !mesh_bed_leveling_flag)
|
|
|
- {
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);
|
|
|
- }
|
|
|
-
|
|
|
- if (farm_mode)
|
|
|
- MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);
|
|
|
|
|
|
- if ( moves_planned() || IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal))
|
|
|
- {
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Tune"), lcd_tune_menu);
|
|
|
- } else
|
|
|
- {
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Preheat"), lcd_preheat_menu);
|
|
|
- }
|
|
|
+ if ( ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal)) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) && !homing_flag && !mesh_bed_leveling_flag) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);
|
|
|
+ }
|
|
|
|
|
|
+ if (farm_mode)
|
|
|
+ MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);
|
|
|
|
|
|
- if(isPrintPaused && saved_printing_type == PRINTING_TYPE_USB)
|
|
|
- {
|
|
|
-#ifdef FANCHECK
|
|
|
- if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
|
|
|
-#else
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
|
|
|
-#endif
|
|
|
- }
|
|
|
+ if ( moves_planned() || PRINTER_ACTIVE ) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Tune"), lcd_tune_menu);
|
|
|
+ } else {
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Preheat"), lcd_preheat_menu);
|
|
|
+ }
|
|
|
|
|
|
-#ifdef SDSUPPORT
|
|
|
- if (card.cardOK || lcd_commands_type == LcdCommands::Layer1Cal)
|
|
|
- {
|
|
|
- if (card.isFileOpen())
|
|
|
+ if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused) {
|
|
|
+ if (is_usb_printing) {
|
|
|
+ MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_usb_print);
|
|
|
+ } else if (IS_SD_PRINTING) {
|
|
|
+ MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_print);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(isPrintPaused)
|
|
|
{
|
|
|
- if (mesh_bed_leveling_flag == false && homing_flag == false) {
|
|
|
- if (card.sdprinting)
|
|
|
- {
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Pause print"), lcd_pause_print);
|
|
|
- }
|
|
|
- else if(isPrintPaused)
|
|
|
- {
|
|
|
- #ifdef FANCHECK
|
|
|
- if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
|
|
|
- #else
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
|
|
|
- #endif
|
|
|
-
|
|
|
- }
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
|
|
|
- }
|
|
|
- }
|
|
|
- else if (lcd_commands_type == LcdCommands::Layer1Cal && mesh_bed_leveling_flag == false && homing_flag == false) {
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
- {
|
|
|
-
|
|
|
- {
|
|
|
+#ifdef FANCHECK
|
|
|
+ if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))
|
|
|
+#endif
|
|
|
+ {
|
|
|
+ if (is_usb_printing) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_usb_print);
|
|
|
+ } else {
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if((IS_SD_PRINTING || is_usb_printing || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling)) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
|
|
|
+ }
|
|
|
+#ifdef SDSUPPORT
|
|
|
+ if (card.cardOK || lcd_commands_type == LcdCommands::Layer1Cal) {
|
|
|
+ if (!card.isFileOpen()) {
|
|
|
+ if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+
|
|
|
+ {
|
|
|
bMain=true;
|
|
|
MENU_ITEM_SUBMENU_P(_T(MSG_CARD_MENU), lcd_sdcard_menu);
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
#if SDCARDDETECT < 1
|
|
|
- MENU_ITEM_GCODE_P(_i("Change SD card"), PSTR("M21"));
|
|
|
-#endif
|
|
|
- }
|
|
|
-
|
|
|
- } else
|
|
|
- {
|
|
|
- bMain=true;
|
|
|
- MENU_ITEM_SUBMENU_P(_i("No SD card"), lcd_sdcard_menu);
|
|
|
+ MENU_ITEM_GCODE_P(_i("Change SD card"), PSTR("M21"));
|
|
|
+#endif
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ bMain=true;
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("No SD card"), lcd_sdcard_menu);
|
|
|
#if SDCARDDETECT < 1
|
|
|
- MENU_ITEM_GCODE_P(_i("Init. SD card"), PSTR("M21"));
|
|
|
-#endif
|
|
|
- }
|
|
|
-#endif
|
|
|
-
|
|
|
- if(!isPrintPaused && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
- {
|
|
|
- if (!farm_mode)
|
|
|
- {
|
|
|
- const int8_t sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet));
|
|
|
- const int8_t nextSheet = eeprom_next_initialized_sheet(sheet);
|
|
|
- if ((nextSheet >= 0) && (sheet != nextSheet))
|
|
|
- {
|
|
|
- MENU_ITEM_FUNCTION_E(EEPROM_Sheets_base->s[sheet], eeprom_switch_to_next_sheet);
|
|
|
+ MENU_ITEM_GCODE_P(_i("Init. SD card"), PSTR("M21"));
|
|
|
+#endif
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
+ if(!isPrintPaused && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+ if (!farm_mode) {
|
|
|
+ const int8_t sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet));
|
|
|
+ const int8_t nextSheet = eeprom_next_initialized_sheet(sheet);
|
|
|
+ if ((nextSheet >= 0) && (sheet != nextSheet)) {
|
|
|
+ MENU_ITEM_FUNCTION_E(EEPROM_Sheets_base->s[sheet], eeprom_switch_to_next_sheet);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
- if ( ! ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal) ) )
|
|
|
- {
|
|
|
- if (mmu_enabled)
|
|
|
- {
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu);
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu);
|
|
|
+ if ( ! ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal) ) ) {
|
|
|
+ if (mmu_enabled) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu);
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu);
|
|
|
|
|
|
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), mmu_unload_filament);
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_EJECT_FILAMENT), mmu_fil_eject_menu);
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), mmu_unload_filament);
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_EJECT_FILAMENT), mmu_fil_eject_menu);
|
|
|
#ifdef MMU_HAS_CUTTER
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_CUT_FILAMENT), mmu_cut_filament_menu);
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_CUT_FILAMENT), mmu_cut_filament_menu);
|
|
|
#endif
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
+ } else {
|
|
|
#ifdef SNMM
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), fil_unload_menu);
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Change extruder"), change_extr_menu);
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), fil_unload_menu);
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Change extruder"), change_extr_menu);
|
|
|
#endif
|
|
|
#ifdef FILAMENT_SENSOR
|
|
|
- if ((fsensor_autoload_enabled == true) && (fsensor_enabled == true) && (mmu_enabled == false))
|
|
|
- MENU_ITEM_SUBMENU_P(_i("AutoLoad filament"), lcd_menu_AutoLoadFilament);
|
|
|
- else
|
|
|
+ if ((fsensor_autoload_enabled == true) && (fsensor_enabled == true) && (mmu_enabled == false))
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("AutoLoad filament"), lcd_menu_AutoLoadFilament);
|
|
|
+ else
|
|
|
#endif
|
|
|
- {
|
|
|
- bFilamentFirstRun=true;
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
|
|
- }
|
|
|
- bFilamentFirstRun=true;
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
|
|
|
- }
|
|
|
- MENU_ITEM_SUBMENU_P(_T(MSG_SETTINGS), lcd_settings_menu);
|
|
|
+ {
|
|
|
+ bFilamentFirstRun=true;
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
|
|
+ }
|
|
|
+ bFilamentFirstRun=true;
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
|
|
|
+ }
|
|
|
+ MENU_ITEM_SUBMENU_P(_T(MSG_SETTINGS), lcd_settings_menu);
|
|
|
if(!isPrintPaused) MENU_ITEM_SUBMENU_P(_T(MSG_MENU_CALIBRATION), lcd_calibration_menu);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Statistics "), lcd_menu_statistics);
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
- {
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Statistics "), lcd_menu_statistics);
|
|
|
- }
|
|
|
-
|
|
|
#if defined(TMC2130) || defined(FILAMENT_SENSOR)
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Fail stats"), lcd_menu_fails_stats);
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Fail stats"), lcd_menu_fails_stats);
|
|
|
#endif
|
|
|
- if (mmu_enabled) {
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Fail stats MMU"), lcd_menu_fails_stats_mmu);
|
|
|
- }
|
|
|
- MENU_ITEM_SUBMENU_P(_i("Support"), lcd_support_menu);
|
|
|
+ if (mmu_enabled) {
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Fail stats MMU"), lcd_menu_fails_stats_mmu);
|
|
|
+ }
|
|
|
+ MENU_ITEM_SUBMENU_P(_i("Support"), lcd_support_menu);
|
|
|
#ifdef LCD_TEST
|
|
|
MENU_ITEM_SUBMENU_P(_i("W25x20CL init"), lcd_test_menu);
|
|
|
#endif
|
|
|
|
|
|
- MENU_END();
|
|
|
+ MENU_END();
|
|
|
|
|
|
}
|
|
|
|
|
@@ -6735,10 +6823,8 @@ static void lcd_tune_menu()
|
|
|
|
|
|
SETTINGS_CUTTER;
|
|
|
|
|
|
- if(farm_mode)
|
|
|
- {
|
|
|
- MENU_ITEM_TOGGLE_P(_T(MSG_FANS_CHECK), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check);
|
|
|
- }
|
|
|
+ MENU_ITEM_TOGGLE_P(_T(MSG_FANS_CHECK), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check);
|
|
|
+
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
if(!farm_mode)
|
|
@@ -8314,7 +8400,7 @@ static int lcd_selftest_screen(TestScreen screen, int _progress, int _progress_s
|
|
|
if (screen == TestScreen::EndStops) lcd_puts_P(_i("Checking endstops"));
|
|
|
if (screen == TestScreen::AxisX) lcd_puts_P(_T(MSG_CHECKING_X));
|
|
|
if (screen == TestScreen::AxisY) lcd_puts_P(_T(MSG_CHECKING_Y));
|
|
|
- if (screen == TestScreen::AxisZ) lcd_puts_P(_i("Checking Z axis "));
|
|
|
+ if (screen == TestScreen::AxisZ) lcd_puts_P(_i("Checking Z axis"));
|
|
|
if (screen == TestScreen::Bed) lcd_puts_P(_T(MSG_SELFTEST_CHECK_BED));
|
|
|
if (screen == TestScreen::Hotend
|
|
|
|| screen == TestScreen::HotendOk) lcd_puts_P(_i("Checking hotend "));
|