Re-introduce redundant disable_heaters() calls
Partially revert 285b505c73a54e9af01816e3a614de73ad181851 so that we ensure heaters are disabled ASAP in case of potential bugs in the max_*_error functions.
This commit is contained in:
parent
a60ed81a35
commit
e1c79c342d
1 changed files with 7 additions and 1 deletions
|
@ -1452,6 +1452,7 @@ enum { LCDALERT_NONE = 0, LCDALERT_HEATERMINTEMP, LCDALERT_BEDMINTEMP, LCDALERT_
|
||||||
uint8_t last_alert_sent_to_lcd = LCDALERT_NONE;
|
uint8_t last_alert_sent_to_lcd = LCDALERT_NONE;
|
||||||
|
|
||||||
void max_temp_error(uint8_t e) {
|
void max_temp_error(uint8_t e) {
|
||||||
|
disable_heater();
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLN((int)e);
|
SERIAL_ERRORLN((int)e);
|
||||||
|
@ -1479,6 +1480,7 @@ void min_temp_error(uint8_t e) {
|
||||||
#ifdef DEBUG_DISABLE_MINTEMP
|
#ifdef DEBUG_DISABLE_MINTEMP
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
disable_heater();
|
||||||
//if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
//if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
||||||
static const char err[] PROGMEM = "Err: MINTEMP";
|
static const char err[] PROGMEM = "Err: MINTEMP";
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
|
@ -1504,6 +1506,7 @@ void min_temp_error(uint8_t e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void bed_max_temp_error(void) {
|
void bed_max_temp_error(void) {
|
||||||
|
disable_heater();
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLNPGM("Heaters switched off. MAXTEMP BED triggered !");
|
SERIAL_ERRORLNPGM("Heaters switched off. MAXTEMP BED triggered !");
|
||||||
|
@ -1518,7 +1521,8 @@ void bed_min_temp_error(void) {
|
||||||
#ifdef DEBUG_DISABLE_MINTEMP
|
#ifdef DEBUG_DISABLE_MINTEMP
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
static const char err[] PROGMEM = "Err: MINTEMP BED";
|
disable_heater();
|
||||||
|
static const char err[] PROGMEM = "MINTEMP BED";
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLNPGM("Heaters switched off. MINTEMP BED triggered !");
|
SERIAL_ERRORLNPGM("Heaters switched off. MINTEMP BED triggered !");
|
||||||
|
@ -1537,6 +1541,7 @@ void bed_min_temp_error(void) {
|
||||||
|
|
||||||
#ifdef AMBIENT_THERMISTOR
|
#ifdef AMBIENT_THERMISTOR
|
||||||
void ambient_max_temp_error(void) {
|
void ambient_max_temp_error(void) {
|
||||||
|
disable_heater();
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLNPGM("Heaters switched off. MAXTEMP AMBIENT triggered !");
|
SERIAL_ERRORLNPGM("Heaters switched off. MAXTEMP AMBIENT triggered !");
|
||||||
|
@ -1551,6 +1556,7 @@ void ambient_min_temp_error(void) {
|
||||||
#ifdef DEBUG_DISABLE_MINTEMP
|
#ifdef DEBUG_DISABLE_MINTEMP
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
disable_heater();
|
||||||
if(IsStopped() == false) {
|
if(IsStopped() == false) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLNPGM("Heaters switched off. MINTEMP AMBIENT triggered !");
|
SERIAL_ERRORLNPGM("Heaters switched off. MINTEMP AMBIENT triggered !");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue