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

View File

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

View File

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