Skip to content

Commit

Permalink
🎨 Clean up TFT Color UI display items (MarlinFirmware#25712)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
2 people authored and Andy-Big committed Jul 14, 2023
1 parent 3c2984e commit 4d133b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions Marlin/src/lcd/tft/ui_1024x600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() {
for (i = 0 ; i < ITEMS_COUNT; i++) {
x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT);
switch (i) {
#ifdef ITEM_E0
#if HAS_EXTRUDERS
case ITEM_E0: draw_heater_status(x, y, H_E0); break;
#endif
#ifdef ITEM_E1
#if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
#ifdef ITEM_E2
#if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
#ifdef ITEM_BED
#if HAS_HEATED_BED
case ITEM_BED: draw_heater_status(x, y, H_BED); break;
#endif
#ifdef ITEM_CHAMBER
#if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
#ifdef ITEM_COOLER
#if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
#ifdef ITEM_FAN
#if HAS_FAN
case ITEM_FAN: draw_fan_status(x, y, blink); break;
#endif
}
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/lcd/tft/ui_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,25 +230,25 @@ void MarlinUI::draw_status_screen() {
for (i = 0 ; i < ITEMS_COUNT; i++) {
x = (TFT_WIDTH / ITEMS_COUNT - 64) / 2 + (TFT_WIDTH * i / ITEMS_COUNT);
switch (i) {
#ifdef ITEM_E0
#if HAS_EXTRUDERS
case ITEM_E0: draw_heater_status(x, y, H_E0); break;
#endif
#ifdef ITEM_E1
#if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
#ifdef ITEM_E2
#if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
#ifdef ITEM_BED
#if HAS_HEATED_BED
case ITEM_BED: draw_heater_status(x, y, H_BED); break;
#endif
#ifdef ITEM_CHAMBER
#if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
#ifdef ITEM_COOLER
#if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
#ifdef ITEM_FAN
#if HAS_FAN
case ITEM_FAN: draw_fan_status(x, y, blink); break;
#endif
}
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/tft/ui_480x320.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ void MarlinUI::draw_status_screen() {
x += sw + ITEM_WIDTH1;
break;
#endif
#ifdef ITEM_E1
#if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
#ifdef ITEM_E2
#if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
#ifdef ITEM_BED
Expand All @@ -409,10 +409,10 @@ void MarlinUI::draw_status_screen() {
x += sw + ITEM_WIDTH1;
break;
#endif
#ifdef ITEM_CHAMBER
#if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
#ifdef ITEM_COOLER
#if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
#ifdef ITEM_FAN
Expand Down

0 comments on commit 4d133b1

Please sign in to comment.