Extend min/max_temp_error for the bed

This commit is contained in:
Scott Lahteine 2016-08-08 22:21:01 -07:00
parent 9afa060ed6
commit 3e8f9ecd1c
2 changed files with 18 additions and 10 deletions

View file

@ -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 HOTENDS == 1 #if HAS_TEMP_BED
UNUSED(e); _temp_error(e, PSTR(MSG_T_MAXTEMP), e >= 0 ? PSTR(MSG_ERR_MAXTEMP) : PSTR(MSG_ERR_MAXTEMP_BED));
#endif #else
_temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP)); _temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP));
}
void Temperature::min_temp_error(uint8_t e) {
#if HOTENDS == 1 #if HOTENDS == 1
UNUSED(e); UNUSED(e);
#endif #endif
#endif
}
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)); _temp_error(HOTEND_INDEX, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
#if HOTENDS == 1
UNUSED(e);
#endif
#endif
} }
float Temperature::get_pid_output(int e) { float Temperature::get_pid_output(int e) {

View file

@ -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