|
@@ -448,6 +448,7 @@ void checkExtruderAutoFans()
|
448
|
448
|
// Temperature Error Handlers
|
449
|
449
|
//
|
450
|
450
|
inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
|
|
451
|
+ static bool killed = false;
|
451
|
452
|
if (IsRunning()) {
|
452
|
453
|
SERIAL_ERROR_START;
|
453
|
454
|
serialprintPGM(serial_msg);
|
|
@@ -455,22 +456,23 @@ inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
|
455
|
456
|
if (e >= 0) SERIAL_ERRORLN((int)e); else SERIAL_ERRORLNPGM(MSG_HEATER_BED);
|
456
|
457
|
}
|
457
|
458
|
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
458
|
|
- kill(lcd_msg);
|
|
459
|
+ if (!killed) {
|
|
460
|
+ Running = false;
|
|
461
|
+ killed = true;
|
|
462
|
+ kill(lcd_msg);
|
|
463
|
+ }
|
|
464
|
+ else
|
|
465
|
+ disable_all_heaters(); // paranoia
|
459
|
466
|
#endif
|
460
|
467
|
}
|
461
|
468
|
|
462
|
469
|
void max_temp_error(uint8_t e) {
|
463
|
|
- disable_all_heaters();
|
464
|
470
|
_temp_error(e, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP));
|
465
|
471
|
}
|
466
|
472
|
void min_temp_error(uint8_t e) {
|
467
|
|
- disable_all_heaters();
|
468
|
473
|
_temp_error(e, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
|
469
|
474
|
}
|
470
|
475
|
void bed_max_temp_error(void) {
|
471
|
|
- #if HAS_HEATER_BED
|
472
|
|
- WRITE_HEATER_BED(0);
|
473
|
|
- #endif
|
474
|
476
|
_temp_error(-1, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP_BED));
|
475
|
477
|
}
|
476
|
478
|
|
|
@@ -637,7 +639,6 @@ void manage_heater() {
|
637
|
639
|
|
638
|
640
|
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
|
639
|
641
|
if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
|
640
|
|
- disable_all_heaters();
|
641
|
642
|
_temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP));
|
642
|
643
|
}
|
643
|
644
|
#endif
|
|
@@ -1580,10 +1581,7 @@ ISR(TIMER0_COMPB_vect) {
|
1580
|
1581
|
#else
|
1581
|
1582
|
#define GEBED >=
|
1582
|
1583
|
#endif
|
1583
|
|
- if (current_temperature_bed_raw GEBED bed_maxttemp_raw) {
|
1584
|
|
- target_temperature_bed = 0;
|
1585
|
|
- bed_max_temp_error();
|
1586
|
|
- }
|
|
1584
|
+ if (current_temperature_bed_raw GEBED bed_maxttemp_raw) bed_max_temp_error();
|
1587
|
1585
|
#endif
|
1588
|
1586
|
|
1589
|
1587
|
} // temp_count >= OVERSAMPLENR
|