heater_ind_t => heater_id_t

This commit is contained in:
Scott Lahteine
2020-09-13 18:06:14 -05:00
parent a941faccb0
commit 2396b4e27f
6 changed files with 64 additions and 64 deletions

View File

@ -519,13 +519,13 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
}
}
FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const char prefix, const bool blink) {
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
#if HAS_HEATED_BED
const bool isBed = heater < 0;
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater));
const bool isBed = heater_id < 0;
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
#else
const float t1 = thermalManager.degHotend(heater), t2 = thermalManager.degTargetHotend(heater);
const float t1 = thermalManager.degHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
#endif
if (prefix >= 0) lcd_put_wchar(prefix);
@ -540,7 +540,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const char pref
#if HAS_HEATED_BED
isBed ? thermalManager.bed_idle.timed_out :
#endif
thermalManager.hotend_idle[heater].timed_out
thermalManager.hotend_idle[heater_id].timed_out
);
if (!blink && is_idle) {
@ -990,7 +990,7 @@ void MarlinUI::draw_status_screen() {
void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) {
if (row < LCD_HEIGHT) {
lcd_moveto(LCD_WIDTH - 9, row);
_draw_heater_status((heater_ind_t)extruder, LCD_STR_THERMOMETER[0], get_blink());
_draw_heater_status((heater_id_t)extruder, LCD_STR_THERMOMETER[0], get_blink());
}
}

View File

@ -178,17 +178,17 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
#if DO_DRAW_HOTENDS
// Draw hotend bitmap with current and target temperatures
FORCE_INLINE void _draw_hotend_status(const heater_ind_t heater, const bool blink) {
FORCE_INLINE void _draw_hotend_status(const heater_id_t heater_id, const bool blink) {
#if !HEATER_IDLE_HANDLER
UNUSED(blink);
#endif
const bool isHeat = HOTEND_ALT(heater);
const bool isHeat = HOTEND_ALT(heater_id);
const uint8_t tx = STATUS_HOTEND_TEXT_X(heater);
const uint8_t tx = STATUS_HOTEND_TEXT_X(heater_id);
const float temp = thermalManager.degHotend(heater),
target = thermalManager.degTargetHotend(heater);
const float temp = thermalManager.degHotend(heater_id),
target = thermalManager.degTargetHotend(heater_id);
#if DISABLED(STATUS_HOTEND_ANIM)
#define STATIC_HOTEND true
@ -237,24 +237,24 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
#if ANIM_HOTEND
// Draw hotend bitmap, either whole or split by the heating percent
const uint8_t hx = STATUS_HOTEND_X(heater),
bw = STATUS_HOTEND_BYTEWIDTH(heater);
const uint8_t hx = STATUS_HOTEND_X(heater_id),
bw = STATUS_HOTEND_BYTEWIDTH(heater_id);
#if ENABLED(STATUS_HEAT_PERCENT)
if (isHeat && tall <= BAR_TALL) {
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(heater, false));
u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(heater, true) + ph * bw);
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(heater_id, false));
u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(heater_id, true) + ph * bw);
}
else
#endif
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(heater, isHeat));
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(heater_id, isHeat));
#endif
} // PAGE_CONTAINS
if (PAGE_UNDER(7)) {
#if HEATER_IDLE_HANDLER
const bool dodraw = (blink || !thermalManager.hotend_idle[heater].timed_out);
const bool dodraw = (blink || !thermalManager.hotend_idle[heater_id].timed_out);
#else
constexpr bool dodraw = true;
#endif
@ -597,7 +597,7 @@ void MarlinUI::draw_status_screen() {
// Extruders
#if DO_DRAW_HOTENDS
LOOP_L_N(e, MAX_HOTEND_DRAW)
_draw_hotend_status((heater_ind_t)e, blink);
_draw_hotend_status((heater_id_t)e, blink);
#endif
// Laser / Spindle

View File

@ -868,7 +868,7 @@ namespace ExtUI {
}
void startPIDTune(const float temp, extruder_t tool) {
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
thermalManager.PID_autotune(temp, (heater_id_t)tool, 8, true);
}
#endif