Merge pull request #1856 from ondratu/pause_print_on_funcheck_fix

pause printer by flag
This commit is contained in:
Marek Běl 2019-05-23 13:48:58 +02:00 committed by GitHub
commit e6b79e6696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);