Extend min/max_temp_error for the bed

master
Scott Lahteine 8 years ago
parent 9afa060ed6
commit 3e8f9ecd1c

@ -517,17 +517,25 @@ void Temperature::_temp_error(int e, const char* serial_msg, const char* lcd_msg
#endif #endif
} }
void Temperature::max_temp_error(uint8_t e) { void Temperature::max_temp_error(int8_t e) {
#if HAS_TEMP_BED
_temp_error(e, PSTR(MSG_T_MAXTEMP), e >= 0 ? PSTR(MSG_ERR_MAXTEMP) : PSTR(MSG_ERR_MAXTEMP_BED));
#else
_temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP));
#if HOTENDS == 1 #if HOTENDS == 1
UNUSED(e); UNUSED(e);
#endif #endif
_temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP)); #endif
} }
void Temperature::min_temp_error(uint8_t e) { void Temperature::min_temp_error(int8_t e) {
#if HAS_TEMP_BED
_temp_error(e, PSTR(MSG_T_MINTEMP), e >= 0 ? PSTR(MSG_ERR_MINTEMP) : PSTR(MSG_ERR_MINTEMP_BED));
#else
_temp_error(HOTEND_INDEX, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
#if HOTENDS == 1 #if HOTENDS == 1
UNUSED(e); UNUSED(e);
#endif #endif
_temp_error(HOTEND_INDEX, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP)); #endif
} }
float Temperature::get_pid_output(int e) { float Temperature::get_pid_output(int e) {

@ -437,8 +437,8 @@ class Temperature {
#endif #endif
static void _temp_error(int e, const char* serial_msg, const char* lcd_msg); static void _temp_error(int e, const char* serial_msg, const char* lcd_msg);
static void min_temp_error(uint8_t e); static void min_temp_error(int8_t e);
static void max_temp_error(uint8_t e); static void max_temp_error(int8_t e);
#if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED

Loading…
Cancel
Save