CHAMBER integration to GLCD (#14981)

This commit is contained in:
Ludy 2019-09-07 11:52:57 +02:00 committed by Scott Lahteine
parent 94948d3dcb
commit 6172cd2528
2 changed files with 257 additions and 179 deletions

View file

@ -29,11 +29,14 @@
*/ */
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#include "ultralcd_DOGM.h"
#define BW(N) ((N + 7) / 8) #define BW(N) ((N + 7) / 8)
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) #if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && DISABLED(STATUS_COMBINE_HEATERS)
#undef STATUS_HEATERS_X
#undef STATUS_BED_X
/** /**
* Custom _Statusscreen.h files can define: * Custom _Statusscreen.h files can define:
* - A custom logo image * - A custom logo image
@ -50,54 +53,26 @@
#endif #endif
#if ENABLED(STATUS_COMBINE_HEATERS)
#undef STATUS_HOTEND_ANIM
#undef STATUS_BED_ANIM
#endif
// //
// Default Status Screen Heater or Hotends bitmaps // Default Status Screen Heater or Hotends bitmaps
// //
#if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH #if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
#if ENABLED(STATUS_COMBINE_HEATERS) #if ENABLED(STATUS_COMBINE_HEATERS)
#undef STATUS_HOTEND_ANIM
#undef STATUS_BED_ANIM
#define STATUS_HEATERS_XSPACE 24
// //
// Status Screen Combined Heater bitmaps // Status Screen Combined Heater bitmaps
// //
#if HAS_HEATED_BED && HOTENDS <= 4
#if HAS_HEATED_BED && HOTENDS == 0 #if HOTENDS == 1
#define STATUS_HEATERS_X 80
#endif
#if HAS_HEATED_BED && HOTENDS <= 3 #define STATUS_HEATERS_WIDTH 96
#define STATUS_BED_TEXT_X (STATUS_HEATERS_WIDTH - 10)
#define STATUS_BED_WIDTH 21
#if HOTENDS == 0
#define STATUS_HEATERS_WIDTH 21
const unsigned char status_heaters_bmp[] PROGMEM = {
B00000100,B00010000,B01000000,
B00000010,B00001000,B00100000,
B00000010,B00001000,B00100000,
B00000100,B00010000,B01000000,
B00001000,B00100000,B10000000,
B00010000,B01000001,B00000000,
B00010000,B01000001,B00000000,
B00001000,B00100000,B10000000,
B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
#elif HOTENDS == 1
#define STATUS_HEATERS_WIDTH 90
#define STATUS_BED_X 80
const unsigned char status_heaters_bmp[] PROGMEM = { const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000, B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
@ -116,7 +91,8 @@
#elif HOTENDS == 2 #elif HOTENDS == 2
#define STATUS_HEATERS_WIDTH 90 #define STATUS_HEATERS_WIDTH 96
#define STATUS_BED_TEXT_X (STATUS_HEATERS_WIDTH - 10)
const unsigned char status_heaters_bmp[] PROGMEM = { const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000, B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
@ -133,9 +109,10 @@
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000 B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000
}; };
#else // HOTENDS > 2 #elif HOTENDS == 3
#define STATUS_HEATERS_WIDTH 90 #define STATUS_HEATERS_WIDTH 96
#define STATUS_BED_TEXT_X (STATUS_HEATERS_WIDTH - 10)
const unsigned char status_heaters_bmp[] PROGMEM = { const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000100,B00010000,B01000000, B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000100,B00010000,B01000000,
@ -152,13 +129,33 @@
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00011111,B11111111,B11111000 B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00011111,B11111111,B11111000
}; };
#else // HOTENDS > 3
#define STATUS_HEATERS_WIDTH 120
#define STATUS_BED_TEXT_X (STATUS_HEATERS_WIDTH - 10)
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000100,B00010000,B01000000,
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,B00000000,B00000100,B00010000,B01000000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,B00000000,B00001000,B00100000,B10000000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,B00000000,B00001000,B00100000,B10000000,
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000100,B00010000,B01000000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00011111,B11111111,B11111000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00011111,B11111111,B11111000
};
#endif // HOTENDS #endif // HOTENDS
#else // !HAS_HEATED_BED || HOTENDS > 3 #else // !HAS_HEATED_BED || HOTENDS > 3
#if HOTENDS == 1 #if HOTENDS == 1
#define STATUS_HEATERS_WIDTH 11 #define STATUS_HEATERS_WIDTH 12
const unsigned char status_heaters_bmp[] PROGMEM = { const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000, B00011111,B11100000,
@ -213,7 +210,7 @@
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000 B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
}; };
#elif HOTENDS > 3 #elif HOTENDS == 4
#define STATUS_HEATERS_WIDTH 84 #define STATUS_HEATERS_WIDTH 84
@ -232,6 +229,25 @@
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000 B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
}; };
#elif HOTENDS > 4
#define STATUS_HEATERS_WIDTH 108
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111000,B01110000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B11110000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,B00000000,B00111000,B11110000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,B00000000,B00011111,B01100000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,B00000000,B00011111,B01100000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,B00000000,B00111100,B11110000,
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
};
#endif // HOTENDS #endif // HOTENDS
#endif // !HAS_HEATED_BED || HOTENDS > 3 #endif // !HAS_HEATED_BED || HOTENDS > 3
@ -241,10 +257,16 @@
// //
// Status Screen Hotends bitmaps // Status Screen Hotends bitmaps
// //
#if HOTENDS #if HOTENDS
#define STATUS_HOTEND1_WIDTH 12 #define STATUS_HOTEND1_WIDTH 16
#define MAX_HOTEND_BITMAPS 5
#if HOTENDS > MAX_HOTEND_BITMAPS
#define STATUS_HOTEND_BITMAPS MAX_HOTEND_BITMAPS
#else
#define STATUS_HOTEND_BITMAPS HOTENDS
#endif
#if HOTENDS == 1 || ENABLED(STATUS_HOTEND_NUMBERLESS) #if HOTENDS == 1 || ENABLED(STATUS_HOTEND_NUMBERLESS)
@ -286,17 +308,6 @@
#if HOTENDS >= 2 #if HOTENDS >= 2
#if HAS_HEATED_BED
#define MAX_HOTEND_BITMAPS 3
#else
#define MAX_HOTEND_BITMAPS 4
#endif
#if HOTENDS > MAX_HOTEND_BITMAPS
#define STATUS_HOTEND_BITMAPS MAX_HOTEND_BITMAPS
#else
#define STATUS_HOTEND_BITMAPS HOTENDS
#endif
#ifdef STATUS_HOTEND_ANIM #ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend1_a_bmp[] PROGMEM = { const unsigned char status_hotend1_a_bmp[] PROGMEM = {
@ -450,7 +461,7 @@
#endif #endif
#if STATUS_HOTEND_BITMAPS >= 4 && !HAS_HEATED_BED #if STATUS_HOTEND_BITMAPS >= 4
#ifdef STATUS_HOTEND_ANIM #ifdef STATUS_HOTEND_ANIM
@ -505,7 +516,7 @@
#endif #endif
#if STATUS_HOTEND_BITMAPS >= 5 && !HAS_HEATED_BED #if STATUS_HOTEND_BITMAPS >= 5
#ifdef STATUS_HOTEND_ANIM #ifdef STATUS_HOTEND_ANIM
@ -571,17 +582,16 @@
// //
// Default Status Screen Bed bitmaps // Default Status Screen Bed bitmaps
// //
#if !STATUS_BED_WIDTH && HAS_HEATED_BED && DISABLED(STATUS_COMBINE_HEATERS)
#if !STATUS_BED_WIDTH && DISABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
#if ENABLED(STATUS_ALT_BED_BITMAP) #if ENABLED(STATUS_ALT_BED_BITMAP)
#define STATUS_BED_ANIM #define STATUS_BED_ANIM
#define STATUS_BED_WIDTH 24 #define STATUS_BED_WIDTH 24
#ifndef STATUS_BED_X #ifndef STATUS_BED_X
#define STATUS_BED_X 72 #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif #endif
#define STATUS_BED_TEXT_X (STATUS_BED_X + 13) #define STATUS_BED_TEXT_X (STATUS_BED_X + 11)
const unsigned char status_bed_bmp[] PROGMEM = { const unsigned char status_bed_bmp[] PROGMEM = {
B11111111,B11111111,B11000000, B11111111,B11111111,B11000000,
@ -612,7 +622,7 @@
#define STATUS_BED_WIDTH 21 #define STATUS_BED_WIDTH 21
#ifndef STATUS_BED_X #ifndef STATUS_BED_X
#define STATUS_BED_X 80 #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif #endif
#ifdef STATUS_BED_ANIM #ifdef STATUS_BED_ANIM
@ -657,81 +667,104 @@
#endif #endif
#endif #endif
#else
#define STATUS_BED_WIDTH 0
#endif
#endif // !STATUS_BED_WIDTH && !STATUS_COMBINE_HEATERS && HAS_HEATED_BED && HOTENDS < 4 #if !STATUS_CHAMBER_WIDTH && HAS_HEATED_CHAMBER && ((HOTENDS <= 4 && !HAS_HEATED_BED) || (HOTENDS <= 3 && HAS_HEATED_BED))
#if HAS_HEATED_CHAMBER #define STATUS_CHAMBER_WIDTH 21
#define STATUS_CHAMBER_WIDTH 16 #if STATUS_HEATERS_WIDTH
#if ENABLED(STATUS_COMBINE_HEATERS)
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - 2 - (STATUS_CHAMBER_BYTEWIDTH) * 8)
#elif HAS_FAN0 && HAS_HEATED_BED && HOTENDS <= 2
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - 2 - (STATUS_HEATERS_BYTEWIDTH - STATUS_CHAMBER_BYTEWIDTH) * 8)
#elif HAS_FAN0 && !HAS_HEATED_BED
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#else
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH) * 8)
#endif
#endif
#ifdef STATUS_CHAMBER_ANIM #ifdef STATUS_CHAMBER_ANIM
const unsigned char status_chamber_bmp[] PROGMEM = { const unsigned char status_chamber_bmp[] PROGMEM = {
B11111111,B11111111, B00011111,B11111111,B11111000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B11111111,B11111111, B00011111,B11111111,B11111000,
B11111111,B11111111 B00011111,B11111111,B11111000
}; };
const unsigned char status_chamber_on_bmp[] PROGMEM = { const unsigned char status_chamber_on_bmp[] PROGMEM = {
B11111111,B11111111, B00011111,B11111111,B11111000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10000010,B00010001, B00010000,B01000010,B00001000,
B10000010,B00010001, B00010000,B01000010,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10001000,B01000001, B00010001,B00001000,B00001000,
B10001000,B01000001, B00010001,B00001000,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B11111111,B11111111, B00011111,B11111111,B11111000,
B11111111,B11111111 B00011111,B11111111,B11111000
}; };
#else #else
const unsigned char status_chamber_bmp[] PROGMEM = { const unsigned char status_chamber_bmp[] PROGMEM = {
B11111111,B11111111, B00011111,B11111111,B11111000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10000010,B00010001, B00010000,B01000010,B00001000,
B10000010,B00010001, B00010000,B01000010,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10001000,B01000001, B00010001,B00001000,B00001000,
B10001000,B01000001, B00010001,B00001000,B00001000,
B10000100,B00100001, B00010000,B10000100,B00001000,
B10000000,B00000001, B00010000,B00000000,B00001000,
B11111111,B11111111, B00011111,B11111111,B11111000,
B11111111,B11111111 B00011111,B11111111,B11111000
}; };
#endif #endif
#else // HAS_HEATED_CHAMBER
#define STATUS_CHAMBER_WIDTH 0
#endif
#endif // HAS_HEATED_CHAMBER #define BED_CHAM (HAS_HEATED_BED || HAS_HEATED_CHAMBER)
#define BED_CHAM_FAN (BED_CHAM || HAS_FAN0)
// Can also be overridden in Configuration.h // Can also be overridden in Configuration_adv.h
// If you can afford it, try the 3-frame fan animation! // If you can afford it, try the 3-frame fan animation!
// Don't compile in the fan animation with no fan // Don't compile in the fan animation with no fan
#if !HAS_FAN0 #if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_CHAM) || (ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_CHAMBER))
#undef STATUS_FAN_FRAMES #undef STATUS_FAN_FRAMES
#elif !defined(STATUS_FAN_FRAMES) #elif !STATUS_FAN_FRAMES
#define STATUS_FAN_FRAMES 2 #define STATUS_FAN_FRAMES 2
#elif STATUS_FAN_FRAMES > 4 #elif STATUS_FAN_FRAMES > 4
#error "A maximum of 4 fan animation frames is currently supported." #error "A maximum of 4 fan animation frames is currently supported."
#endif #endif
#if HOTENDS > 4
#undef STATUS_LOGO_WIDTH
#undef STATUS_HEATERS_XSPACE
#define STATUS_HEATERS_XSPACE 24
#endif
// //
// Provide default Fan Bitmaps // Provide default Fan Bitmaps
// //
#if !defined(STATUS_FAN_WIDTH) && STATUS_FAN_FRAMES > 0 #if !STATUS_FAN_WIDTH && STATUS_FAN_FRAMES > 0
// Provide a fan animation if none exists // Provide a fan animation if none exists
@ -836,7 +869,7 @@
#elif STATUS_FAN_FRAMES == 3 #elif STATUS_FAN_FRAMES == 3
#define STATUS_FAN_WIDTH 21 #define STATUS_FAN_WIDTH 20
#if ENABLED(STATUS_ALT_FAN_BITMAP) #if ENABLED(STATUS_ALT_FAN_BITMAP)
@ -974,7 +1007,7 @@
#elif STATUS_FAN_FRAMES == 4 #elif STATUS_FAN_FRAMES == 4
#define STATUS_FAN_WIDTH 21 #define STATUS_FAN_WIDTH 20
#if ENABLED(STATUS_ALT_FAN_BITMAP) #if ENABLED(STATUS_ALT_FAN_BITMAP)
@ -1153,6 +1186,35 @@
#endif // !STATUS_ALT_FAN_BITMAP #endif // !STATUS_ALT_FAN_BITMAP
#endif #endif
#else
#undef STATUS_FAN_FRAMES
#define STATUS_FAN_WIDTH 0
#endif
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
#if STATUS_HOTEND1_WIDTH
#define HAS_SPACES ((LCD_PIXEL_WIDTH - (HOTENDS * STATUS_HOTEND1_WIDTH) - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH - 24) < STATUS_LOGO_WIDTH ? true : false)
#elif STATUS_HEATERS_WIDTH
#define HAS_SPACES (((LCD_PIXEL_WIDTH - STATUS_HEATERS_WIDTH - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH - 20) < STATUS_LOGO_WIDTH) ? true : false)
#endif
#if HAS_SPACES
#undef STATUS_LOGO_WIDTH
#endif
#if (HOTENDS > 1 && STATUS_LOGO_WIDTH && BED_CHAM_FAN) || ( HOTENDS >= 3 && !BED_CHAM_FAN)
#define _STATUS_HEATERS_X(H,S,N) (((LCD_PIXEL_WIDTH - (H * (S + N)) - STATUS_LOGO_WIDTH - STATUS_BED_WIDTH - STATUS_CHAMBER_WIDTH - STATUS_FAN_WIDTH) / 2) + STATUS_LOGO_WIDTH)
#if STATUS_HOTEND1_WIDTH
#if HOTENDS > 2
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6)
#else
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 4)
#endif
#else
#define STATUS_HEATERS_X _STATUS_HEATERS_X(1, STATUS_HEATERS_WIDTH, 4)
#endif
#endif
#endif #endif
@ -1187,16 +1249,27 @@
#if STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH #if STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH
#ifndef STATUS_HEATERS_XSPACE #ifndef STATUS_HEATERS_XSPACE
#define STATUS_HEATERS_XSPACE 24 // Like the included bitmaps #if (HOTENDS == 3 || HOTENDS == 4) && ENABLED(STATUS_COMBINE_HEATERS)
#define STATUS_HEATERS_XSPACE 24
#else
#define STATUS_HEATERS_XSPACE 26 // Like the included bitmaps
#endif
#endif #endif
#ifndef STATUS_HEATERS_X #ifndef STATUS_HEATERS_X
#if STATUS_LOGO_BYTEWIDTH #if STATUS_LOGO_BYTEWIDTH
#define STATUS_HEATERS_X ((STATUS_LOGO_BYTEWIDTH + 0) * 8) #define STATUS_HEATERS_X (STATUS_LOGO_BYTEWIDTH * 8)
#elif ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH) && (STATUS_BED_WIDTH && STATUS_HOTEND_BITMAPS == 3)) || \
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
#define STATUS_HEATERS_X 5
#else
#if ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS <= 4
#define STATUS_HEATERS_X 5
#else #else
#define STATUS_HEATERS_X 8 // Like the included bitmaps #define STATUS_HEATERS_X 8 // Like the included bitmaps
#endif #endif
#endif #endif
#endif
#endif #endif
@ -1205,7 +1278,6 @@
// //
// Hotend images. A base hotend image and optional "ON" state image. // Hotend images. A base hotend image and optional "ON" state image.
// //
#ifndef STATUS_HOTEND_BITMAPS #ifndef STATUS_HOTEND_BITMAPS
#define STATUS_HOTEND_BITMAPS 1 #define STATUS_HOTEND_BITMAPS 1
#endif #endif
@ -1257,6 +1329,8 @@
#ifndef STATUS_HOTEND2_X #ifndef STATUS_HOTEND2_X
#define STATUS_HOTEND2_X STATUS_HOTEND1_X + STATUS_HEATERS_XSPACE #define STATUS_HOTEND2_X STATUS_HOTEND1_X + STATUS_HEATERS_XSPACE
#endif #endif
#if HOTENDS > 2
#ifndef STATUS_HOTEND3_X #ifndef STATUS_HOTEND3_X
#define STATUS_HOTEND3_X STATUS_HOTEND2_X + STATUS_HEATERS_XSPACE #define STATUS_HOTEND3_X STATUS_HOTEND2_X + STATUS_HEATERS_XSPACE
#endif #endif
@ -1270,7 +1344,6 @@
#define STATUS_HOTEND6_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE #define STATUS_HOTEND6_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE
#endif #endif
#if HOTENDS > 2
constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X); constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X);
#define STATUS_HOTEND_X(N) status_hotend_x[N] #define STATUS_HOTEND_X(N) status_hotend_x[N]
#elif HOTENDS > 1 #elif HOTENDS > 1
@ -1303,7 +1376,7 @@
#endif #endif
#endif #endif
#if STATUS_HOTEND_BITMAPS > 1 #if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS)
#define TEST_BITMAP_OFF status_hotend1_a_bmp #define TEST_BITMAP_OFF status_hotend1_a_bmp
#define TEST_BITMAP_ON status_hotend1_b_bmp #define TEST_BITMAP_ON status_hotend1_b_bmp
#else #else
@ -1341,7 +1414,11 @@
#define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE)) #define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE))
#endif #endif
#ifndef STATUS_HOTEND_TEXT_X #ifndef STATUS_HOTEND_TEXT_X
#if HOTENDS == 4 && STATUS_LOGO_WIDTH
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE)) #define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#else
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#endif #endif
#ifndef STATUS_HEATERS_BYTEWIDTH #ifndef STATUS_HEATERS_BYTEWIDTH
#define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH) #define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH)
@ -1363,16 +1440,13 @@
// //
// Chamber Bitmap Properties // Chamber Bitmap Properties
// //
#ifndef STATUS_CHAMBER_WIDTH
#define STATUS_CHAMBER_WIDTH 0
#endif
#ifndef STATUS_CHAMBER_BYTEWIDTH #ifndef STATUS_CHAMBER_BYTEWIDTH
#define STATUS_CHAMBER_BYTEWIDTH BW(STATUS_CHAMBER_WIDTH) #define STATUS_CHAMBER_BYTEWIDTH BW(STATUS_CHAMBER_WIDTH)
#endif #endif
#if STATUS_CHAMBER_WIDTH && !STATUS_HEATERS_WIDTH #if STATUS_CHAMBER_WIDTH
#ifndef STATUS_CHAMBER_X #ifndef STATUS_CHAMBER_X
#define STATUS_CHAMBER_X (128 - (STATUS_FAN_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH) * 8) #define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif #endif
#ifndef STATUS_CHAMBER_HEIGHT #ifndef STATUS_CHAMBER_HEIGHT
@ -1388,7 +1462,7 @@
#endif #endif
#ifndef STATUS_CHAMBER_TEXT_X #ifndef STATUS_CHAMBER_TEXT_X
#define STATUS_CHAMBER_TEXT_X (STATUS_CHAMBER_X + 7) #define STATUS_CHAMBER_TEXT_X (STATUS_CHAMBER_X + 11)
#endif #endif
static_assert( static_assert(
@ -1407,16 +1481,13 @@
// //
// Bed Bitmap Properties // Bed Bitmap Properties
// //
#ifndef STATUS_BED_WIDTH
#define STATUS_BED_WIDTH 0
#endif
#ifndef STATUS_BED_BYTEWIDTH #ifndef STATUS_BED_BYTEWIDTH
#define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH) #define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH)
#endif #endif
#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH #if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
#ifndef STATUS_BED_X #ifndef STATUS_BED_X
#define STATUS_BED_X (128 - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8) #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8)
#endif #endif
#ifndef STATUS_BED_HEIGHT #ifndef STATUS_BED_HEIGHT
@ -1432,7 +1503,7 @@
#endif #endif
#ifndef STATUS_BED_TEXT_X #ifndef STATUS_BED_TEXT_X
#define STATUS_BED_TEXT_X (STATUS_BED_X + 11) #define STATUS_BED_TEXT_X (STATUS_BED_X + 9)
#endif #endif
static_assert( static_assert(
@ -1445,27 +1516,23 @@
"Status bed bitmap (status_bed_on_bmp) dimensions don't match data." "Status bed bitmap (status_bed_on_bmp) dimensions don't match data."
); );
#endif #endif
#endif #endif
// //
// Fan Bitmap Properties // Fan Bitmap Properties
// //
#ifndef STATUS_FAN_WIDTH
#define STATUS_FAN_WIDTH 0
#endif
#ifndef STATUS_FAN_BYTEWIDTH #ifndef STATUS_FAN_BYTEWIDTH
#define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH) #define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH)
#endif #endif
#if STATUS_FAN_FRAMES #if STATUS_FAN_FRAMES
#ifndef STATUS_FAN_X #ifndef STATUS_FAN_X
#define STATUS_FAN_X (128 - (STATUS_FAN_BYTEWIDTH) * 8) #define STATUS_FAN_X (LCD_PIXEL_WIDTH - (STATUS_FAN_BYTEWIDTH) * 8)
#endif #endif
#ifndef STATUS_FAN_Y #ifndef STATUS_FAN_Y
#define STATUS_FAN_Y 1 #define STATUS_FAN_Y 1
#endif #endif
#ifndef STATUS_FAN_TEXT_X #ifndef STATUS_FAN_TEXT_X
#define STATUS_FAN_TEXT_X 103 #define STATUS_FAN_TEXT_X (STATUS_FAN_X - 1)
#endif #endif
#ifndef STATUS_FAN_TEXT_Y #ifndef STATUS_FAN_TEXT_Y
#define STATUS_FAN_TEXT_Y 28 #define STATUS_FAN_TEXT_Y 28

View file

@ -63,13 +63,18 @@
#define EXTRAS_BASELINE (40 + INFO_FONT_ASCENT) #define EXTRAS_BASELINE (40 + INFO_FONT_ASCENT)
#define STATUS_BASELINE (LCD_PIXEL_HEIGHT - INFO_FONT_DESCENT) #define STATUS_BASELINE (LCD_PIXEL_HEIGHT - INFO_FONT_DESCENT)
#define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH && HOTENDS <= 3 && DISABLED(STATUS_COMBINE_HEATERS)) #define DO_DRAW_LOGO (STATUS_LOGO_WIDTH && ENABLED(CUSTOM_STATUS_SCREEN_IMAGE))
#define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && STATUS_FAN_FRAMES) #define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH && HOTENDS <= 4)
#define DO_DRAW_CHAMBER (HAS_HEATED_CHAMBER && STATUS_CHAMBER_WIDTH && HOTENDS <= 4)
#define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES))
#define ANIM_HOTEND (HOTENDS && ENABLED(STATUS_HOTEND_ANIM)) #define ANIM_HOTEND (HOTENDS && ENABLED(STATUS_HOTEND_ANIM))
#define ANIM_BED (DO_DRAW_BED && ENABLED(STATUS_BED_ANIM)) #define ANIM_BED (DO_DRAW_BED && ENABLED(STATUS_BED_ANIM))
#define ANIM_CHAMBER (HAS_HEATED_CHAMBER && ENABLED(STATUS_CHAMBER_ANIM)) #define ANIM_CHAMBER (DO_DRAW_CHAMBER && ENABLED(STATUS_CHAMBER_ANIM))
#if ANIM_HOTEND || ANIM_BED #define ANIM_HBC (ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER)
#if ANIM_HBC
uint8_t heat_bits; uint8_t heat_bits;
#endif #endif
#if ANIM_HOTEND #if ANIM_HOTEND
@ -109,7 +114,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
UNUSED(blink); UNUSED(blink);
#endif #endif
#if HAS_HEATED_BED #if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS) || (HAS_HEATED_BED && ENABLED(STATUS_COMBINE_HEATERS) && HOTENDS <= 4)
const bool isBed = heater < 0; const bool isBed = heater < 0;
#define IFBED(A,B) (isBed ? (A) : (B)) #define IFBED(A,B) (isBed ? (A) : (B))
#else #else
@ -125,8 +130,8 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
const uint8_t tx = IFBED(STATUS_BED_TEXT_X, STATUS_HOTEND_TEXT_X(heater)); const uint8_t tx = IFBED(STATUS_BED_TEXT_X, STATUS_HOTEND_TEXT_X(heater));
#if ENABLED(MARLIN_DEV_MODE) #if ENABLED(MARLIN_DEV_MODE)
const float temp = 20 + (millis() >> 8) % IFBED(100, 200); const float temp = 20 + (millis() >> 8) % IFBED(100, 200),
const float target = IFBED(100, 200); target = IFBED(100, 200);
#else #else
const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)), const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)),
target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater)); target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater));
@ -140,7 +145,7 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
#define HOTEND_DOT false #define HOTEND_DOT false
#endif #endif
#if HAS_HEATED_BED && DISABLED(STATUS_BED_ANIM) #if DO_DRAW_BED && DISABLED(STATUS_BED_ANIM)
#define STATIC_BED true #define STATIC_BED true
#define BED_DOT isHeat #define BED_DOT isHeat
#else #else
@ -148,7 +153,13 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
#define BED_DOT false #define BED_DOT false
#endif #endif
#if ANIM_HOTEND && ENABLED(STATUS_HOTEND_INVERTED) #if ANIM_HOTEND && BOTH(STATUS_HOTEND_INVERTED, STATUS_HOTEND_NUMBERLESS)
#define OFF_BMP(N) status_hotend_b_bmp
#define ON_BMP(N) status_hotend_a_bmp
#elif ANIM_HOTEND && DISABLED(STATUS_HOTEND_INVERTED) && ENABLED(STATUS_HOTEND_NUMBERLESS)
#define OFF_BMP(N) status_hotend_a_bmp
#define ON_BMP(N) status_hotend_b_bmp
#elif ANIM_HOTEND && ENABLED(STATUS_HOTEND_INVERTED)
#define OFF_BMP(N) status_hotend##N##_b_bmp #define OFF_BMP(N) status_hotend##N##_b_bmp
#define ON_BMP(N) status_hotend##N##_a_bmp #define ON_BMP(N) status_hotend##N##_a_bmp
#else #else
@ -179,10 +190,11 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f); uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f);
NOMORE(tall, BAR_TALL); NOMORE(tall, BAR_TALL);
#ifdef STATUS_HOTEND_ANIM #if ANIM_HOTEND
// Draw hotend bitmap, either whole or split by the heating percent // Draw hotend bitmap, either whole or split by the heating percent
if (IFBED(0, 1)) { if (IFBED(0, 1)) {
const uint8_t hx = STATUS_HOTEND_X(heater), bw = STATUS_HOTEND_BYTEWIDTH(heater); const uint8_t hx = STATUS_HOTEND_X(heater),
bw = STATUS_HOTEND_BYTEWIDTH(heater);
#if ENABLED(STATUS_HEAT_PERCENT) #if ENABLED(STATUS_HEAT_PERCENT)
if (isHeat && tall <= BAR_TALL) { if (isHeat && tall <= BAR_TALL) {
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall; const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
@ -196,10 +208,10 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
#endif #endif
// Draw a heating progress bar, if specified // Draw a heating progress bar, if specified
#if ENABLED(STATUS_HEAT_PERCENT) #if DO_DRAW_BED && ENABLED(STATUS_HEAT_PERCENT)
if (IFBED(true, STATIC_HOTEND) && isHeat) { if (IFBED(true, STATIC_HOTEND) && isHeat) {
const uint8_t bx = IFBED(STATUS_BED_X + STATUS_BED_WIDTH, STATUS_HOTEND_X(heater) + STATUS_HOTEND_WIDTH(heater)) + 1; const uint8_t bx = IFBED(STATUS_BED_X + STATUS_BED_WIDTH - 1, STATUS_HOTEND_X(heater) + STATUS_HOTEND_WIDTH(heater)) + 1;
u8g.drawFrame(bx, STATUS_HEATERS_Y, 3, STATUS_HEATERS_HEIGHT); u8g.drawFrame(bx, STATUS_HEATERS_Y, 3, STATUS_HEATERS_HEIGHT);
if (tall) { if (tall) {
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall; const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
@ -233,11 +245,16 @@ FORCE_INLINE void _draw_heater_status(const heater_ind_t heater, const bool blin
} }
#if HAS_HEATED_CHAMBER #if DO_DRAW_CHAMBER
FORCE_INLINE void _draw_chamber_status(const bool blink) { FORCE_INLINE void _draw_chamber_status(const bool blink) {
#if ENABLED(MARLIN_DEV_MODE)
const float temp = 10 + (millis() >> 8) % CHAMBER_MAXTEMP,
target = CHAMBER_MAXTEMP;
#else
const float temp = thermalManager.degChamber(), const float temp = thermalManager.degChamber(),
target = thermalManager.degTargetChamber(); target = thermalManager.degTargetChamber();
#endif
#if !HEATER_IDLE_HANDLER #if !HEATER_IDLE_HANDLER
UNUSED(blink); UNUSED(blink);
#endif #endif
@ -299,7 +316,7 @@ void MarlinUI::draw_status_screen() {
// At the first page, generate new display values // At the first page, generate new display values
if (first_page) { if (first_page) {
#if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER #if ANIM_HBC
uint8_t new_bits = 0; uint8_t new_bits = 0;
#if ANIM_HOTEND #if ANIM_HOTEND
HOTEND_LOOP() if (thermalManager.isHeatingHotend(e) ^ SHOW_ON_STATE) SBI(new_bits, e); HOTEND_LOOP() if (thermalManager.isHeatingHotend(e) ^ SHOW_ON_STATE) SBI(new_bits, e);
@ -307,14 +324,14 @@ void MarlinUI::draw_status_screen() {
#if ANIM_BED #if ANIM_BED
if (thermalManager.isHeatingBed() ^ SHOW_ON_STATE) SBI(new_bits, 7); if (thermalManager.isHeatingBed() ^ SHOW_ON_STATE) SBI(new_bits, 7);
#endif #endif
#if ANIM_CHAMBER #if DO_DRAW_CHAMBER
if (thermalManager.isHeatingChamber() ^ SHOW_ON_STATE) SBI(new_bits, 6); if (thermalManager.isHeatingChamber() ^ SHOW_ON_STATE) SBI(new_bits, 6);
#endif #endif
heat_bits = new_bits; heat_bits = new_bits;
#endif #endif
strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS]))); strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])));
strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS]))); strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
strcpy(zstring, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS]))); strcpy(zstring, ftostr52sp( LOGICAL_Z_POSITION(current_position[Z_AXIS])));
#if ENABLED(FILAMENT_LCD_DISPLAY) #if ENABLED(FILAMENT_LCD_DISPLAY)
strcpy(wstring, ftostr12ns(filament_width_meas)); strcpy(wstring, ftostr12ns(filament_width_meas));
strcpy(mstring, i16tostr3(100.0 * ( strcpy(mstring, i16tostr3(100.0 * (
@ -335,7 +352,7 @@ void MarlinUI::draw_status_screen() {
TCNT5 = 0; TCNT5 = 0;
#endif #endif
#if STATUS_LOGO_WIDTH #if DO_DRAW_LOGO
if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1)) if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp); u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp);
#endif #endif
@ -346,13 +363,14 @@ void MarlinUI::draw_status_screen() {
u8g.drawBitmapP(STATUS_HEATERS_X, STATUS_HEATERS_Y, STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT, status_heaters_bmp); u8g.drawBitmapP(STATUS_HEATERS_X, STATUS_HEATERS_Y, STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT, status_heaters_bmp);
#endif #endif
#if DO_DRAW_BED #if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS)
#if ANIM_BED #if ANIM_BED
#define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp) #define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp)
#else #else
#define BED_BITMAP(S) status_bed_bmp #define BED_BITMAP(S) status_bed_bmp
#endif #endif
const uint8_t bedy = STATUS_BED_Y(BED_ALT()), bedh = STATUS_BED_HEIGHT(BED_ALT()); const uint8_t bedy = STATUS_BED_Y(BED_ALT()),
bedh = STATUS_BED_HEIGHT(BED_ALT());
if (PAGE_CONTAINS(bedy, bedy + bedh - 1)) if (PAGE_CONTAINS(bedy, bedy + bedh - 1))
u8g.drawBitmapP(STATUS_BED_X, bedy, STATUS_BED_BYTEWIDTH, bedh, BED_BITMAP(BED_ALT())); u8g.drawBitmapP(STATUS_BED_X, bedy, STATUS_BED_BYTEWIDTH, bedh, BED_BITMAP(BED_ALT()));
#endif #endif
@ -363,12 +381,10 @@ void MarlinUI::draw_status_screen() {
#else #else
#define CHAMBER_BITMAP(S) status_chamber_bmp #define CHAMBER_BITMAP(S) status_chamber_bmp
#endif #endif
if (PAGE_CONTAINS(STATUS_CHAMBER_Y, STATUS_CHAMBER_Y + STATUS_CHAMBER_HEIGHT - 1)) const uint8_t chambery = STATUS_CHAMBER_Y(CHAMBER_ALT()),
u8g.drawBitmapP( chamberh = STATUS_CHAMBER_HEIGHT(CHAMBER_ALT());
STATUS_CHAMBER_X, STATUS_CHAMBER_Y, if (PAGE_CONTAINS(chambery, chambery + chamberh - 1))
STATUS_CHAMBER_BYTEWIDTH, STATUS_CHAMBER_HEIGHT, u8g.drawBitmapP(STATUS_CHAMBER_X, chambery, STATUS_CHAMBER_BYTEWIDTH, chamberh, CHAMBER_BITMAP(CHAMBER_ALT()));
CHAMBER_BITMAP(CHAMBER_ALT())
);
#endif #endif
#if DO_DRAW_FAN #if DO_DRAW_FAN
@ -381,9 +397,7 @@ void MarlinUI::draw_status_screen() {
} }
#endif #endif
if (PAGE_CONTAINS(STATUS_FAN_Y, STATUS_FAN_Y + STATUS_FAN_HEIGHT - 1)) if (PAGE_CONTAINS(STATUS_FAN_Y, STATUS_FAN_Y + STATUS_FAN_HEIGHT - 1))
u8g.drawBitmapP( u8g.drawBitmapP(STATUS_FAN_X, STATUS_FAN_Y, STATUS_FAN_BYTEWIDTH, STATUS_FAN_HEIGHT,
STATUS_FAN_X, STATUS_FAN_Y,
STATUS_FAN_BYTEWIDTH, STATUS_FAN_HEIGHT,
#if STATUS_FAN_FRAMES > 2 #if STATUS_FAN_FRAMES > 2
fan_frame == 1 ? status_fan1_bmp : fan_frame == 1 ? status_fan1_bmp :
fan_frame == 2 ? status_fan2_bmp : fan_frame == 2 ? status_fan2_bmp :
@ -400,18 +414,17 @@ void MarlinUI::draw_status_screen() {
// //
// Temperature Graphics and Info // Temperature Graphics and Info
// //
if (PAGE_UNDER(6 + 1 + 12 + 1 + 6 + 1)) { if (PAGE_UNDER(6 + 1 + 12 + 1 + 6 + 1)) {
// Extruders // Extruders
for (uint8_t e = 0; e < MAX_HOTEND_DRAW; ++e) for (uint8_t e = 0; e < MAX_HOTEND_DRAW; ++e)
_draw_heater_status((heater_ind_t)e, blink); _draw_heater_status((heater_ind_t)e, blink);
// Heated bed // Heated bed
#if HAS_HEATED_BED && HOTENDS < 4 #if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS) || (HAS_HEATED_BED && ENABLED(STATUS_COMBINE_HEATERS) && HOTENDS <= 4)
_draw_heater_status(H_BED, blink); _draw_heater_status(H_BED, blink);
#endif #endif
#if HAS_HEATED_CHAMBER #if DO_DRAW_CHAMBER
_draw_chamber_status(blink); _draw_chamber_status(blink);
#endif #endif
@ -575,7 +588,6 @@ void MarlinUI::draw_status_screen() {
// //
// Feedrate // Feedrate
// //
#define EXTRAS_2_BASELINE (EXTRAS_BASELINE + 3) #define EXTRAS_2_BASELINE (EXTRAS_BASELINE + 3)
if (PAGE_CONTAINS(EXTRAS_2_BASELINE - INFO_FONT_ASCENT, EXTRAS_2_BASELINE - 1)) { if (PAGE_CONTAINS(EXTRAS_2_BASELINE - INFO_FONT_ASCENT, EXTRAS_2_BASELINE - 1)) {
@ -602,7 +614,6 @@ void MarlinUI::draw_status_screen() {
// //
// Status line // Status line
// //
if (PAGE_CONTAINS(STATUS_BASELINE - INFO_FONT_ASCENT, STATUS_BASELINE + INFO_FONT_DESCENT)) { if (PAGE_CONTAINS(STATUS_BASELINE - INFO_FONT_ASCENT, STATUS_BASELINE + INFO_FONT_DESCENT)) {
lcd_moveto(0, STATUS_BASELINE); lcd_moveto(0, STATUS_BASELINE);