Fix compile error with 6 hot-ends (#15405)

This commit is contained in:
Ludy 2019-09-28 22:30:41 +02:00 committed by Scott Lahteine
parent 6509dc04f5
commit a628d77798
2 changed files with 3 additions and 3 deletions

View File

@ -884,7 +884,7 @@ namespace ExtUI {
#endif
{
#if HOTENDS
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP);
const int16_t e = heater - H0;
thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e);
#endif
@ -893,7 +893,7 @@ namespace ExtUI {
void setTargetTemp_celsius(float value, const extruder_t extruder) {
#if HOTENDS
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP);
const int16_t e = extruder - E0;
enableHeater(extruder);
thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e);

View File

@ -31,7 +31,7 @@ extern int8_t encoderLine, encoderTopLine, screen_items;
extern bool screen_changed;
#if HOTENDS
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP);
#endif
void scroll_screen(const uint8_t limit, const bool is_menu);