|
|
@ -450,31 +450,28 @@ void checkExtruderAutoFans()
|
|
|
|
inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
|
|
|
|
inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
|
|
|
|
if (IsRunning()) {
|
|
|
|
if (IsRunning()) {
|
|
|
|
SERIAL_ERROR_START;
|
|
|
|
SERIAL_ERROR_START;
|
|
|
|
if (e >= 0) SERIAL_ERRORLN((int)e);
|
|
|
|
|
|
|
|
serialprintPGM(serial_msg);
|
|
|
|
serialprintPGM(serial_msg);
|
|
|
|
MYSERIAL.write('\n');
|
|
|
|
SERIAL_ERRORPGM(MSG_STOPPED_HEATER);
|
|
|
|
#ifdef ULTRA_LCD
|
|
|
|
if (e >= 0) SERIAL_ERRORLN((int)e); else SERIAL_ERRORLNPGM(MSG_HEATER_BED);
|
|
|
|
lcd_setalertstatuspgm(lcd_msg);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
|
|
|
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
|
|
|
Stop();
|
|
|
|
kill(lcd_msg);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void max_temp_error(uint8_t e) {
|
|
|
|
void max_temp_error(uint8_t e) {
|
|
|
|
disable_all_heaters();
|
|
|
|
disable_all_heaters();
|
|
|
|
_temp_error(e, PSTR(MSG_MAXTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MAXTEMP));
|
|
|
|
_temp_error(e, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void min_temp_error(uint8_t e) {
|
|
|
|
void min_temp_error(uint8_t e) {
|
|
|
|
disable_all_heaters();
|
|
|
|
disable_all_heaters();
|
|
|
|
_temp_error(e, PSTR(MSG_MINTEMP_EXTRUDER_OFF), PSTR(MSG_ERR_MINTEMP));
|
|
|
|
_temp_error(e, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void bed_max_temp_error(void) {
|
|
|
|
void bed_max_temp_error(void) {
|
|
|
|
#if HAS_HEATER_BED
|
|
|
|
#if HAS_HEATER_BED
|
|
|
|
WRITE_HEATER_BED(0);
|
|
|
|
WRITE_HEATER_BED(0);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
_temp_error(-1, PSTR(MSG_MAXTEMP_BED_OFF), PSTR(MSG_ERR_MAXTEMP_BED));
|
|
|
|
_temp_error(-1, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP_BED));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float get_pid_output(int e) {
|
|
|
|
float get_pid_output(int e) {
|
|
|
@ -628,8 +625,7 @@ void manage_heater() {
|
|
|
|
// Has it failed to increase enough?
|
|
|
|
// Has it failed to increase enough?
|
|
|
|
if (degHotend(e) < watch_target_temp[e]) {
|
|
|
|
if (degHotend(e) < watch_target_temp[e]) {
|
|
|
|
// Stop!
|
|
|
|
// Stop!
|
|
|
|
disable_all_heaters();
|
|
|
|
_temp_error(e, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
|
|
|
|
_temp_error(e, PSTR(MSG_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// Start again if the target is still far off
|
|
|
|
// Start again if the target is still far off
|
|
|
@ -1071,16 +1067,7 @@ void tp_init() {
|
|
|
|
*state = TRRunaway;
|
|
|
|
*state = TRRunaway;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case TRRunaway:
|
|
|
|
case TRRunaway:
|
|
|
|
SERIAL_ERROR_START;
|
|
|
|
_temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY));
|
|
|
|
SERIAL_ERRORLNPGM(MSG_THERMAL_RUNAWAY_STOP);
|
|
|
|
|
|
|
|
if (heater_id < 0) SERIAL_ERRORLNPGM("bed"); else SERIAL_ERRORLN(heater_id);
|
|
|
|
|
|
|
|
LCD_ALERTMESSAGEPGM(MSG_THERMAL_RUNAWAY);
|
|
|
|
|
|
|
|
disable_all_heaters();
|
|
|
|
|
|
|
|
disable_all_steppers();
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
|
|
|
|
manage_heater();
|
|
|
|
|
|
|
|
lcd_update();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|