Fix MSG_HEATING_FAILED_LCD_BED macro evaluation

This commit is contained in:
Scott Lahteine 2018-04-04 18:53:37 -05:00
parent fe91514395
commit 1c36606886

View file

@ -64,19 +64,22 @@ Temperature thermalManager;
* elimination should (hopefully) optimize out the unused strings. * elimination should (hopefully) optimize out the unused strings.
*/ */
#if HAS_TEMP_BED #if HAS_TEMP_BED
#define _BED_ERR_PSTR(MSG, E) (E) == -1 ? PSTR(MSG ## _BED) : #define TEMP_ERR_PSTR(MSG, E) \
(E) == -1 ? PSTR(MSG ## _BED) : \
(HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \
(HOTENDS > 2 && (E) == 2) ? PSTR(MSG_E3 " " MSG) : \
(HOTENDS > 3 && (E) == 3) ? PSTR(MSG_E4 " " MSG) : \
(HOTENDS > 4 && (E) == 4) ? PSTR(MSG_E5 " " MSG) : \
PSTR(MSG_E1 " " MSG)
#else #else
#define _BED_ERR_PSTR(MSG, E) #define TEMP_ERR_PSTR(MSG, E) \
(HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \
(HOTENDS > 2 && (E) == 2) ? PSTR(MSG_E3 " " MSG) : \
(HOTENDS > 3 && (E) == 3) ? PSTR(MSG_E4 " " MSG) : \
(HOTENDS > 4 && (E) == 4) ? PSTR(MSG_E5 " " MSG) : \
PSTR(MSG_E1 " " MSG)
#endif #endif
#define TEMP_ERR_PSTR(MSG, E) \
_BED_ERR_PSTR(MSG, E) \
(HOTENDS > 1 && (E) == 1) ? PSTR(MSG_E2 " " MSG) : \
(HOTENDS > 2 && (E) == 2) ? PSTR(MSG_E3 " " MSG) : \
(HOTENDS > 3 && (E) == 3) ? PSTR(MSG_E4 " " MSG) : \
(HOTENDS > 4 && (E) == 4) ? PSTR(MSG_E5 " " MSG) : \
PSTR(MSG_E1 " " MSG)
// public: // public:
float Temperature::current_temperature[HOTENDS] = { 0.0 }, float Temperature::current_temperature[HOTENDS] = { 0.0 },