|
|
|
@ -86,17 +86,17 @@ Temperature thermalManager;
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if HAS_HEATED_BED
|
|
|
|
|
#define _BED_PSTR(E) (E) == -1 ? PSTR(MSG ## _BED) :
|
|
|
|
|
#define _BED_PSTR(M,E) (E) == -1 ? PSTR(M ## _BED) :
|
|
|
|
|
#else
|
|
|
|
|
#define _BED_PSTR(E)
|
|
|
|
|
#define _BED_PSTR(M,E)
|
|
|
|
|
#endif
|
|
|
|
|
#if HAS_HEATED_CHAMBER
|
|
|
|
|
#define _CHAMBER_PSTR(E) (E) == -2 ? PSTR(MSG ## _CHAMBER) :
|
|
|
|
|
#define _CHAMBER_PSTR(M,E) (E) == -2 ? PSTR(M ## _CHAMBER) :
|
|
|
|
|
#else
|
|
|
|
|
#define _CHAMBER_PSTR(E)
|
|
|
|
|
#define _CHAMBER_PSTR(M,E)
|
|
|
|
|
#endif
|
|
|
|
|
#define _E_PSTR(M,E,N) (HOTENDS >= (N) && (E) == (N)-1) ? PSTR(MSG_E##N " " M) :
|
|
|
|
|
#define TEMP_ERR_PSTR(M,E) _BED_PSTR(E) _CHAMBER_PSTR(E) _E_PSTR(M,E,2) _E_PSTR(M,E,3) _E_PSTR(M,E,4) _E_PSTR(M,E,5) _E_PSTR(M,E,6) PSTR(MSG_E1 " " M)
|
|
|
|
|
#define _E_PSTR(M,E,N) ((HOTENDS) >= (N) && (E) == (N)-1) ? PSTR(MSG_E##N " " M) :
|
|
|
|
|
#define TEMP_ERR_PSTR(M,E) _BED_PSTR(M,E) _CHAMBER_PSTR(M,E) _E_PSTR(M,E,2) _E_PSTR(M,E,3) _E_PSTR(M,E,4) _E_PSTR(M,E,5) _E_PSTR(M,E,6) PSTR(MSG_E1 " " M)
|
|
|
|
|
|
|
|
|
|
// public:
|
|
|
|
|
|
|
|
|
@ -949,6 +949,8 @@ void Temperature::manage_heater() {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
HOTEND_LOOP() {
|
|
|
|
|
if (degHotend(e) > temp_range[e].maxtemp)
|
|
|
|
|
temp_error(e, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, e));
|
|
|
|
|
|
|
|
|
|
#if HEATER_IDLE_HANDLER
|
|
|
|
|
hotend_idle[e].update(ms);
|
|
|
|
@ -1001,6 +1003,9 @@ void Temperature::manage_heater() {
|
|
|
|
|
|
|
|
|
|
#if HAS_HEATED_BED
|
|
|
|
|
|
|
|
|
|
if (degBed() > BED_MAXTEMP)
|
|
|
|
|
temp_error(-1, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, -1));
|
|
|
|
|
|
|
|
|
|
#if WATCH_BED
|
|
|
|
|
// Make sure temperature is increasing
|
|
|
|
|
if (watch_bed.elapsed(ms)) { // Time to check the bed?
|
|
|
|
@ -2647,7 +2652,7 @@ void Temperature::isr() {
|
|
|
|
|
void Temperature::set_heating_message(const uint8_t e) {
|
|
|
|
|
const bool heating = isHeatingHotend(e);
|
|
|
|
|
#if HOTENDS > 1
|
|
|
|
|
ui.status_printf_P(0, heating ? PSTR("E%i " MSG_HEATING) : PSTR("E%i " MSG_COOLING), int(e + 1));
|
|
|
|
|
ui.status_printf_P(0, heating ? PSTR("E%c " MSG_HEATING) : PSTR("E%c " MSG_COOLING), '1' + e);
|
|
|
|
|
#else
|
|
|
|
|
ui.set_status_P(heating ? PSTR("E " MSG_HEATING) : PSTR("E " MSG_COOLING));
|
|
|
|
|
#endif
|
|
|
|
|