Cooler (for Laser) - M143, M193 (#21255)
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
HEATBIT_HOTEND,
|
||||
HEATBIT_BED = HOTENDS,
|
||||
HEATBIT_CHAMBER,
|
||||
HEATBIT_COOLER,
|
||||
HEATBIT_CUTTER
|
||||
};
|
||||
IF<(HEATBIT_CUTTER > 7), uint16_t, uint8_t>::type heat_bits;
|
||||
@@ -111,6 +112,11 @@
|
||||
#else
|
||||
#define CUTTER_ALT() false
|
||||
#endif
|
||||
#if ANIM_COOLER
|
||||
#define COOLER_ALT(N) TEST(heat_bits, HEATBIT_COOLER)
|
||||
#else
|
||||
#define COOLER_ALT() false
|
||||
#endif
|
||||
|
||||
#if DO_DRAW_HOTENDS
|
||||
#define MAX_HOTEND_DRAW _MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
|
||||
@@ -361,18 +367,22 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
|
||||
#endif // DO_DRAW_BED
|
||||
|
||||
#if DO_DRAW_CHAMBER
|
||||
|
||||
FORCE_INLINE void _draw_chamber_status() {
|
||||
#if HAS_HEATED_CHAMBER
|
||||
if (PAGE_UNDER(7))
|
||||
_draw_centered_temp(thermalManager.degTargetChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 7);
|
||||
#endif
|
||||
|
||||
if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
|
||||
_draw_centered_temp(thermalManager.degChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 28);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // DO_DRAW_CHAMBER
|
||||
#if DO_DRAW_COOLER
|
||||
FORCE_INLINE void _draw_cooler_status() {
|
||||
if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
|
||||
_draw_centered_temp(thermalManager.degCooler(), STATUS_COOLER_TEXT_X, 28);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Before homing, blink '123' <-> '???'.
|
||||
@@ -447,6 +457,9 @@ void MarlinUI::draw_status_screen() {
|
||||
#if DO_DRAW_CHAMBER && HAS_HEATED_CHAMBER
|
||||
if (thermalManager.isHeatingChamber()) SBI(new_bits, HEATBIT_CHAMBER);
|
||||
#endif
|
||||
#if DO_DRAW_COOLER && HAS_COOLER
|
||||
if (thermalManager.isLaserCooling()) SBI(new_bits, HEATBIT_COOLER);
|
||||
#endif
|
||||
if (TERN0(ANIM_CUTTER, cutter.enabled())) SBI(new_bits, HEATBIT_CUTTER);
|
||||
heat_bits = new_bits;
|
||||
#endif
|
||||
@@ -631,12 +644,28 @@ void MarlinUI::draw_status_screen() {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Laser Cooler
|
||||
#if DO_DRAW_COOLER
|
||||
#if ANIM_COOLER
|
||||
#define COOLER_BITMAP(S) ((S) ? status_cooler_bmp : status_cooler_on_bmp)
|
||||
#else
|
||||
#define COOLER_BITMAP(S) status_cooler_bmp
|
||||
#endif
|
||||
const uint8_t coolery = STATUS_COOLER_Y(COOLER_ALT()),
|
||||
coolerh = STATUS_COOLER_HEIGHT(COOLER_ALT());
|
||||
if (PAGE_CONTAINS(coolery, coolery + coolerh - 1))
|
||||
u8g.drawBitmapP(STATUS_COOLER_X, coolery, STATUS_COOLER_BYTEWIDTH, coolerh, COOLER_BITMAP(COOLER_ALT()));
|
||||
#endif
|
||||
|
||||
// Heated Bed
|
||||
TERN_(DO_DRAW_BED, _draw_bed_status(blink));
|
||||
|
||||
// Heated Chamber
|
||||
TERN_(DO_DRAW_CHAMBER, _draw_chamber_status());
|
||||
|
||||
// Cooler
|
||||
TERN_(DO_DRAW_COOLER, _draw_cooler_status());
|
||||
|
||||
// Fan, if a bitmap was provided
|
||||
#if DO_DRAW_FAN
|
||||
if (PAGE_CONTAINS(STATUS_FAN_TEXT_Y - INFO_FONT_ASCENT, STATUS_FAN_TEXT_Y - 1)) {
|
||||
|
||||
Reference in New Issue
Block a user