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

View File

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