|
@@ -450,7 +450,7 @@ void lcdui_print_feedrate(void)
|
|
|
// Print percent done in form "USB---%", " SD---%", " ---%" (7 chars total)
|
|
|
void lcdui_print_percent_done(void)
|
|
|
{
|
|
|
- const char* src = is_usb_printing?_N("USB"):(IS_SD_PRINTING?_N(" SD"):_N(" "));
|
|
|
+ const char* src = usb_timer.running()?_N("USB"):(IS_SD_PRINTING?_N(" SD"):_N(" "));
|
|
|
char per[4];
|
|
|
bool num = IS_SD_PRINTING || (PRINTER_ACTIVE && (print_percent_done_normal != PRINT_PERCENT_DONE_INIT));
|
|
|
if (!num || heating_status != HeatingStatus::NO_HEATING) // either not printing or heating
|
|
@@ -3824,7 +3824,7 @@ static void lcd_show_sensors_state()
|
|
|
if (mmu_enabled == false)
|
|
|
{
|
|
|
// pat9125_update is already called while printing: only update manually when idling
|
|
|
- if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
+ if (!moves_planned() && !IS_SD_PRINTING && !usb_timer.running() && (lcd_commands_type != LcdCommands::Layer1Cal))
|
|
|
pat9125_update();
|
|
|
|
|
|
lcd_set_cursor(0, 2);
|
|
@@ -4308,7 +4308,7 @@ static void crash_mode_switch()
|
|
|
{
|
|
|
lcd_crash_detect_enable();
|
|
|
}
|
|
|
- if (IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal)) menu_goto(lcd_tune_menu, 9, true, true);
|
|
|
+ if (IS_SD_PRINTING || usb_timer.running() || (lcd_commands_type == LcdCommands::Layer1Cal)) menu_goto(lcd_tune_menu, 9, true, true);
|
|
|
else menu_goto(lcd_settings_menu, 9, true, true);
|
|
|
}
|
|
|
#endif //TMC2130
|
|
@@ -6278,7 +6278,7 @@ void lcd_resume_print()
|
|
|
lcd_return_to_status();
|
|
|
lcd_reset_alert_level(); //for fan speed error
|
|
|
if (fan_error_selftest()) {
|
|
|
- if (is_usb_printing) SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
|
|
+ if (usb_timer.running()) SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
|
|
return; //abort if error persists
|
|
|
}
|
|
|
cmdqueue_serial_disabled = false;
|
|
@@ -6455,7 +6455,7 @@ static void lcd_main_menu()
|
|
|
MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
|
|
|
#endif //TMC2130_DEBUG
|
|
|
|
|
|
- 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) {
|
|
|
+ if ( ( IS_SD_PRINTING || usb_timer.running() || (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);//8
|
|
|
}
|
|
|
|
|
@@ -6469,7 +6469,7 @@ static void lcd_main_menu()
|
|
|
}
|
|
|
|
|
|
if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused) {
|
|
|
- if (is_usb_printing) {
|
|
|
+ if (usb_timer.running()) {
|
|
|
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_usb_print);////MSG_PAUSE_PRINT c=18
|
|
|
} else if (IS_SD_PRINTING) {
|
|
|
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_print);////MSG_PAUSE_PRINT c=18
|
|
@@ -6481,20 +6481,20 @@ static void lcd_main_menu()
|
|
|
if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))
|
|
|
#endif //FANCHECK
|
|
|
{
|
|
|
- if (is_usb_printing) {
|
|
|
+ if (usb_timer.running()) {
|
|
|
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_usb_print);////MSG_RESUME_PRINT c=18
|
|
|
} else {
|
|
|
MENU_ITEM_SUBMENU_P(_T(MSG_RESUME_PRINT), lcd_resume_print);////MSG_RESUME_PRINT c=18
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if((IS_SD_PRINTING || is_usb_printing || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling)) {
|
|
|
+ if((IS_SD_PRINTING || usb_timer.running() || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling)) {
|
|
|
MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
|
|
|
}
|
|
|
#ifdef SDSUPPORT //!@todo SDSUPPORT undefined creates several issues in source code
|
|
|
if (card.cardOK || lcd_commands_type == LcdCommands::Layer1Cal) {
|
|
|
if (!card.isFileOpen()) {
|
|
|
- if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+ if (!usb_timer.running() && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
//if (farm_mode) MENU_ITEM_SUBMENU_P(MSG_FARM_CARD_MENU, lcd_farm_sdcard_menu);
|
|
|
/*else*/{
|
|
|
bMain=true; // flag ('fake parameter') for 'lcd_sdcard_menu()' function
|
|
@@ -6514,7 +6514,7 @@ static void lcd_main_menu()
|
|
|
}
|
|
|
#endif //SDSUPPORT
|
|
|
|
|
|
- if(!isPrintPaused && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+ if(!isPrintPaused && !IS_SD_PRINTING && !usb_timer.running() && (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);
|
|
@@ -6524,7 +6524,7 @@ static void lcd_main_menu()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ( ! ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal) ) ) {
|
|
|
+ if ( ! ( IS_SD_PRINTING || usb_timer.running() || (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);////MSG_LOAD_TO_NOZZLE c=18
|
|
@@ -6556,7 +6556,7 @@ static void lcd_main_menu()
|
|
|
if(!isPrintPaused) MENU_ITEM_SUBMENU_P(_T(MSG_MENU_CALIBRATION), lcd_calibration_menu);
|
|
|
}
|
|
|
|
|
|
- if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
+ if (!usb_timer.running() && (lcd_commands_type != LcdCommands::Layer1Cal)) {
|
|
|
MENU_ITEM_SUBMENU_P(_i("Statistics"), lcd_menu_statistics);////MSG_STATISTICS c=18
|
|
|
}
|
|
|
|
|
@@ -8655,7 +8655,7 @@ void menu_lcd_longpress_func(void)
|
|
|
|
|
|
// explicitely listed menus which are allowed to rise the move-z or live-adj-z functions
|
|
|
// The lists are not the same for both functions, so first decide which function is to be performed
|
|
|
- if ( (moves_planned() || IS_SD_PRINTING || is_usb_printing )){ // long press as live-adj-z
|
|
|
+ if ( (moves_planned() || IS_SD_PRINTING || usb_timer.running() )){ // long press as live-adj-z
|
|
|
if(( current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU ) // only allow live-adj-z up to 2mm of print height
|
|
|
&& ( menu_menu == lcd_status_screen // and in listed menus...
|
|
|
|| menu_menu == lcd_main_menu
|