Browse Source

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

pull/1/head
Ludy 5 years ago
committed by Scott Lahteine
parent
commit
a628d77798
  1. 4
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  2. 2
      Marlin/src/lcd/menu/menu.h

4
Marlin/src/lcd/extensible_ui/ui_api.cpp

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

2
Marlin/src/lcd/menu/menu.h

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

Loading…
Cancel
Save