Extract fan_error_selftest to function for readability
This commit is contained in:
parent
ff9a6c8177
commit
30f325c81d
@ -6316,17 +6316,10 @@ static void lcd_test_menu()
|
|||||||
}
|
}
|
||||||
#endif //LCD_TEST
|
#endif //LCD_TEST
|
||||||
|
|
||||||
//! @brief Resume paused print
|
static void fan_error_selftest()
|
||||||
//! @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.
|
|
||||||
void lcd_resume_print()
|
|
||||||
{
|
{
|
||||||
lcd_return_to_status();
|
|
||||||
lcd_reset_alert_level();
|
|
||||||
lcd_setstatuspgm(_T(MSG_RESUMING_PRINT));
|
|
||||||
lcd_reset_alert_level(); //for fan speed error
|
|
||||||
|
|
||||||
#ifdef FANCHECK
|
#ifdef FANCHECK
|
||||||
|
|
||||||
fanSpeed = 255;
|
fanSpeed = 255;
|
||||||
#ifdef FAN_SOFT_PWM
|
#ifdef FAN_SOFT_PWM
|
||||||
fanSpeedSoftPwm = 255;
|
fanSpeedSoftPwm = 255;
|
||||||
@ -6356,7 +6349,21 @@ void lcd_resume_print()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //FANCHECK
|
#endif //FANCHECK
|
||||||
|
}
|
||||||
|
|
||||||
|
//! @brief Resume paused print
|
||||||
|
//! @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.
|
||||||
|
void lcd_resume_print()
|
||||||
|
{
|
||||||
|
lcd_return_to_status();
|
||||||
|
lcd_reset_alert_level();
|
||||||
|
lcd_setstatuspgm(_T(MSG_RESUMING_PRINT));
|
||||||
|
lcd_reset_alert_level(); //for fan speed error
|
||||||
|
|
||||||
|
fan_error_selftest();
|
||||||
|
|
||||||
restore_print_from_ram_and_continue(0.0);
|
restore_print_from_ram_and_continue(0.0);
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user