From 83d7e95de0534061ca6887a711bc611d209a628a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 02:23:55 -0600 Subject: [PATCH] Add MSG_THERMAL_RUNAWAY_BED (#9691) --- Marlin/src/lcd/language/language_en.h | 3 +++ Marlin/src/module/temperature.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 8812de9b82..1dd12a4325 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -789,6 +789,9 @@ #ifndef MSG_THERMAL_RUNAWAY #define MSG_THERMAL_RUNAWAY _UxGT("THERMAL RUNAWAY") #endif +#ifndef MSG_THERMAL_RUNAWAY_BED + #define MSG_THERMAL_RUNAWAY_BED _UxGT("BED THERMAL RUNAWAY") +#endif #ifndef MSG_ERR_MAXTEMP #define MSG_ERR_MAXTEMP _UxGT("Err: MAXTEMP") #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 975e8892fb..ec3797e6a1 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -435,7 +435,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], _temp_error(hotend, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); } else if (current < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? - _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY)); + _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), + hotend >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) + ); #endif } // every 2 seconds @@ -1414,7 +1416,9 @@ void Temperature::init() { else if (PENDING(millis(), *timer)) break; *state = TRRunaway; case TRRunaway: - _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY)); + _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), + heater_id >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) + ); } }