From: Arthur Wolf Date: Mon, 23 May 2016 21:08:44 +0000 (+0200) Subject: added check so that we dont re-enter halt X-Git-Url: http://git.hcoop.net/clinton/Smoothieware.git/commitdiff_plain/e39c48c1a13c7252582b810c4de6006c5d84435d added check so that we dont re-enter halt --- diff --git a/src/modules/tools/temperaturecontrol/TemperatureControl.cpp b/src/modules/tools/temperaturecontrol/TemperatureControl.cpp index 72f85c3f..cd40b4ba 100644 --- a/src/modules/tools/temperaturecontrol/TemperatureControl.cpp +++ b/src/modules/tools/temperaturecontrol/TemperatureControl.cpp @@ -516,6 +516,8 @@ void TemperatureControl::on_second_tick(void *argument) THEKERNEL->streams->printf("%s:%3.1f /%3.1f @%d\n", designator.c_str(), get_temperature(), ((target_temperature <= 0) ? 0.0 : target_temperature), o); // Check whether or not there is a temperature runaway issue, if so stop everything and report it + if(THEKERNEL->is_halted()) return; + if( this->target_temperature <= 0 ){ // If we are not trying to heat, state is 0 this->runaway_state = 0; this->runaway_timer = 0; @@ -533,12 +535,12 @@ void TemperatureControl::on_second_tick(void *argument) break; case 2: // If we are in state 2 ( target temperature reached ), check for thermal runaway // If the temperature is outside the acceptable range - if( fabs( this->get_temperature() - this->target_temperature ) > 10 ){ // 10 degrees, should be a configurable value + if( fabs( this->get_temperature() - this->target_temperature ) > 20 ){ // 10 degrees, should be a configurable value // Increase the timer, aka « One more second with a problem maybe occuring » this->runaway_timer++; // If the timer has a too large value ( we have been too long outside the desired temperature range ) - if( this->runaway_timer > 15 ){ // 15 seconds, should be a configurable value + if( this->runaway_timer > 10 ){ // 15 seconds, should be a configurable value THEKERNEL->streams->printf("Error: Temperature runaway ! Check whether the heater controller is failing HIGH, or the temperature sensor is detached. IMMEDIATELY TURN OFF POWER\n"); THEKERNEL->streams->printf("HALT asserted - reset or M999 required\n");