Fix Fan error issues.
This commit is contained in:
parent
c2637d9430
commit
59c2b7e795
|
|
@ -1857,7 +1857,7 @@ void loop()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FANCHECK
|
#ifdef FANCHECK
|
||||||
if (fan_check_error && isPrintPaused)
|
if (fan_check_error && isPrintPaused && !IS_SD_PRINTING)
|
||||||
{
|
{
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
host_keepalive(); //prevent timeouts since usb processing is disabled until print is resumed. This is for a crude way of pausing a print on all hosts.
|
host_keepalive(); //prevent timeouts since usb processing is disabled until print is resumed. This is for a crude way of pausing a print on all hosts.
|
||||||
|
|
@ -3763,12 +3763,14 @@ There are reasons why some G Codes aren't in numerical order.
|
||||||
void process_commands()
|
void process_commands()
|
||||||
{
|
{
|
||||||
#ifdef FANCHECK
|
#ifdef FANCHECK
|
||||||
if(fan_check_error == EFCE_DETECTED){
|
if(fan_check_error == EFCE_DETECTED)
|
||||||
fan_check_error = EFCE_REPORTED;
|
{
|
||||||
// SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
fan_check_error = EFCE_REPORTED;
|
||||||
lcd_pause_print();
|
if (is_usb_printing)
|
||||||
cmdqueue_serial_disabled = true;
|
lcd_pause_usb_print();
|
||||||
}
|
else
|
||||||
|
lcd_pause_print();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!buflen) return; //empty command
|
if (!buflen) return; //empty command
|
||||||
|
|
@ -8154,11 +8156,17 @@ Sigma_Exit:
|
||||||
/*!
|
/*!
|
||||||
### M602 - Resume print <a href="https://reprap.org/wiki/G-code#M602:_Resume_print">M602: Resume print</a>
|
### M602 - Resume print <a href="https://reprap.org/wiki/G-code#M602:_Resume_print">M602: Resume print</a>
|
||||||
*/
|
*/
|
||||||
case 602: {
|
case 602:
|
||||||
if (isPrintPaused)
|
{
|
||||||
lcd_resume_print();
|
if (isPrintPaused)
|
||||||
}
|
{
|
||||||
break;
|
if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))
|
||||||
|
lcd_resume_print();
|
||||||
|
else
|
||||||
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED); //inform octoprint of pause
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
### M603 - Stop print <a href="https://reprap.org/wiki/G-code#M603:_Stop_print">M603: Stop print</a>
|
### M603 - Stop print <a href="https://reprap.org/wiki/G-code#M603:_Stop_print">M603: Stop print</a>
|
||||||
|
|
|
||||||
|
|
@ -1526,10 +1526,9 @@ void lcd_return_to_status()
|
||||||
eFilamentAction = FilamentAction::None; // i.e. non-autoLoad
|
eFilamentAction = FilamentAction::None; // i.e. non-autoLoad
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Pause print, disable nozzle heater, move to park position
|
//! @brief Pause print, disable nozzle heater, move to park position, send host action "paused"
|
||||||
void lcd_pause_print()
|
void lcd_pause_print()
|
||||||
{
|
{
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED); //pause for octoprint
|
|
||||||
stop_and_save_print_to_ram(0.0, -default_retraction);
|
stop_and_save_print_to_ram(0.0, -default_retraction);
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
isPrintPaused = true;
|
isPrintPaused = true;
|
||||||
|
|
@ -1537,12 +1536,13 @@ void lcd_pause_print()
|
||||||
{
|
{
|
||||||
lcd_commands_type = LcdCommands::LongPause;
|
lcd_commands_type = LcdCommands::LongPause;
|
||||||
}
|
}
|
||||||
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Pause USB/host print, disable nozzle heater, move to park position
|
//! @brief Send host action "pause"
|
||||||
void lcd_pause_usb_print()
|
void lcd_pause_usb_print()
|
||||||
{
|
{
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE); //pause for octoprint
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6482,7 +6482,7 @@ static bool fan_error_selftest()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Resume paused print
|
//! @brief Resume paused print, send host action "resumed"
|
||||||
//! @todo It is not good to call restore_print_from_ram_and_continue() from function called by lcd_update(),
|
//! @todo It is not good to call restore_print_from_ram_and_continue() from function called by lcd_update(),
|
||||||
//! as restore_print_from_ram_and_continue() calls lcd_update() internally.
|
//! as restore_print_from_ram_and_continue() calls lcd_update() internally.
|
||||||
void lcd_resume_print()
|
void lcd_resume_print()
|
||||||
|
|
@ -6490,23 +6490,23 @@ void lcd_resume_print()
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
lcd_reset_alert_level(); //for fan speed error
|
lcd_reset_alert_level(); //for fan speed error
|
||||||
if (fan_error_selftest()) return; //abort if error persists
|
if (fan_error_selftest()) return; //abort if error persists
|
||||||
cmdqueue_serial_disabled = false;
|
cmdqueue_serial_disabled = false;
|
||||||
|
|
||||||
lcd_setstatuspgm(_T(MSG_FINISHING_MOVEMENTS));
|
lcd_setstatuspgm(_T(MSG_FINISHING_MOVEMENTS));
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
lcd_setstatuspgm(_T(MSG_RESUMING_PRINT)); ////MSG_RESUMING_PRINT c=20
|
lcd_setstatuspgm(_T(MSG_RESUMING_PRINT)); ////MSG_RESUMING_PRINT c=20
|
||||||
isPrintPaused = false;
|
|
||||||
restore_print_from_ram_and_continue(default_retraction);
|
restore_print_from_ram_and_continue(default_retraction);
|
||||||
pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
|
pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUMED); //resume octoprint
|
isPrintPaused = false;
|
||||||
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUMED); //trigger octoprint to resume print
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Resume paused USB/host print
|
//! @brief Resume paused USB/host print, send host action "resume"
|
||||||
void lcd_resume_usb_print()
|
void lcd_resume_usb_print()
|
||||||
{
|
{
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUME); //resume octoprint
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUME); //resume octoprint
|
||||||
}
|
}
|
||||||
|
|
||||||
static void change_sheet()
|
static void change_sheet()
|
||||||
|
|
@ -6673,7 +6673,7 @@ static void lcd_main_menu()
|
||||||
if (farm_mode)
|
if (farm_mode)
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);//8
|
MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);//8
|
||||||
|
|
||||||
if ( moves_planned() || IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LcdCommands::Layer1Cal))
|
if ( moves_planned() || PRINTER_ACTIVE || isPrintPaused)
|
||||||
{
|
{
|
||||||
MENU_ITEM_SUBMENU_P(_i("Tune"), lcd_tune_menu);////MSG_TUNE
|
MENU_ITEM_SUBMENU_P(_i("Tune"), lcd_tune_menu);////MSG_TUNE
|
||||||
} else
|
} else
|
||||||
|
|
@ -6683,14 +6683,14 @@ static void lcd_main_menu()
|
||||||
|
|
||||||
if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused)
|
if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused)
|
||||||
{
|
{
|
||||||
if (IS_SD_PRINTING)
|
if (is_usb_printing)
|
||||||
{
|
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_print);////MSG_PAUSE_PRINT c=18
|
|
||||||
}
|
|
||||||
else if (is_usb_printing)
|
|
||||||
{
|
{
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_PAUSE_PRINT), lcd_pause_usb_print);////MSG_PAUSE_PRINT c=18
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(isPrintPaused)
|
if(isPrintPaused)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ void lcd_change_success();
|
||||||
void lcd_loading_color();
|
void lcd_loading_color();
|
||||||
void lcd_sdcard_stop();
|
void lcd_sdcard_stop();
|
||||||
void lcd_pause_print();
|
void lcd_pause_print();
|
||||||
|
void lcd_pause_usb_print();
|
||||||
void lcd_resume_print();
|
void lcd_resume_print();
|
||||||
void lcd_print_stop();
|
void lcd_print_stop();
|
||||||
void prusa_statistics(int _message, uint8_t _col_nr = 0);
|
void prusa_statistics(int _message, uint8_t _col_nr = 0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue