pause printer by flag

This commit is contained in:
Ondrej Tuma 2019-05-20 14:52:48 +02:00
parent 7ff50e966d
commit 63235625ab
3 changed files with 14 additions and 2 deletions

View file

@ -156,7 +156,6 @@
//=============================imported variables============================
//===========================================================================
//===========================================================================
//=============================public variables=============================
//===========================================================================
@ -3389,6 +3388,14 @@ extern uint8_t st_backlash_y;
//!@n M999 - Restart after being stopped by error
void process_commands()
{
#ifdef FANCHECK
if (fan_check_error){
fan_check_error = false;
lcd_pause_print();
return;
}
#endif
if (!buflen) return; //empty command
#ifdef FILAMENT_RUNOUT_SUPPORT
SET_INPUT(FR_SENS);

View file

@ -94,6 +94,9 @@ float current_temperature_bed = 0.0;
unsigned char fanSpeedSoftPwm;
#endif
#ifdef FANCHECK
volatile bool fan_check_error = false;
#endif
unsigned char soft_pwm_bed;
@ -527,7 +530,7 @@ void fanSpeedError(unsigned char _fan) {
lcd_print_stop();
}
else {
lcd_pause_print();
fan_check_error = true;
}
}
else {

View file

@ -238,6 +238,8 @@ void checkExtruderAutoFans();
#if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1))
extern volatile bool fan_check_error;
void countFanSpeed();
void checkFanSpeed();
void fanSpeedError(unsigned char _fan);