Invert hotend bitmaps, by default
This commit is contained in:
parent
c5642a894f
commit
ee423dcdd0
2 changed files with 93 additions and 29 deletions
|
@ -49,8 +49,9 @@
|
|||
|
||||
#else // !CUSTOM_STATUS_SCREEN_IMAGE
|
||||
|
||||
//#define COMBINED_HEATER_BITMAP
|
||||
//#define STATUS_COMBINE_HEATERS
|
||||
//#define STATUS_HOTEND_NUMBERLESS
|
||||
#define STATUS_HOTEND_INVERTED
|
||||
#define STATUS_HOTEND_ANIM
|
||||
#define STATUS_BED_ANIM
|
||||
//#define ALTERNATE_BED_BITMAP
|
||||
|
@ -63,7 +64,7 @@
|
|||
|
||||
#if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
|
||||
|
||||
#ifdef COMBINED_HEATER_BITMAP
|
||||
#ifdef STATUS_COMBINE_HEATERS
|
||||
|
||||
//
|
||||
// Status Screen Combined Heater bitmaps
|
||||
|
@ -235,7 +236,7 @@
|
|||
|
||||
#endif // !HAS_HEATED_BED || HOTENDS > 3
|
||||
|
||||
#else // !COMBINED_HEATER_BITMAP
|
||||
#else // !STATUS_COMBINE_HEATERS
|
||||
|
||||
//
|
||||
// Status Screen Hotends bitmaps
|
||||
|
@ -247,7 +248,7 @@
|
|||
|
||||
#if HOTENDS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
|
||||
|
||||
const unsigned char status_hotend_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111111,B11110000,
|
||||
|
@ -264,7 +265,7 @@
|
|||
|
||||
#ifdef STATUS_HOTEND_ANIM
|
||||
|
||||
const unsigned char status_hotend_on_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100000,B00010000,
|
||||
|
@ -298,7 +299,7 @@
|
|||
|
||||
#ifdef STATUS_HOTEND_ANIM
|
||||
|
||||
const unsigned char status_hotend1_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend1_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111110,B11110000,
|
||||
|
@ -313,7 +314,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend1_on_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend1_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100001,B00010000,
|
||||
|
@ -328,7 +329,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend2_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend2_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111100,B11110000,
|
||||
|
@ -343,7 +344,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend2_on_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend2_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100011,B00010000,
|
||||
|
@ -360,7 +361,7 @@
|
|||
|
||||
#else
|
||||
|
||||
const unsigned char status_hotend1_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend1_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111110,B11110000,
|
||||
B00111100,B11110000,
|
||||
|
@ -375,7 +376,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend2_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend2_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111100,B11110000,
|
||||
B00111011,B01110000,
|
||||
|
@ -394,11 +395,11 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if HOTENDS >= 3
|
||||
#if STATUS_HOTEND_BITMAPS >= 3
|
||||
|
||||
#ifdef STATUS_HOTEND_ANIM
|
||||
|
||||
const unsigned char status_hotend3_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend3_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111100,B11110000,
|
||||
|
@ -413,7 +414,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend3_on_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend3_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100011,B00010000,
|
||||
|
@ -430,7 +431,7 @@
|
|||
|
||||
#else
|
||||
|
||||
const unsigned char status_hotend3_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend3_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111100,B11110000,
|
||||
B00111011,B01110000,
|
||||
|
@ -449,11 +450,11 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if HOTENDS >= 4 && !HAS_HEATED_BED
|
||||
#if STATUS_HOTEND_BITMAPS >= 4 && !HAS_HEATED_BED
|
||||
|
||||
#ifdef STATUS_HOTEND_ANIM
|
||||
|
||||
const unsigned char status_hotend4_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend4_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111011,B01110000,
|
||||
|
@ -468,7 +469,7 @@
|
|||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend4_on_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend4_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100100,B10010000,
|
||||
|
@ -485,7 +486,7 @@
|
|||
|
||||
#else
|
||||
|
||||
const unsigned char status_hotend4_bmp[] PROGMEM = {
|
||||
const unsigned char status_hotend4_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111011,B01110000,
|
||||
B00111011,B01110000,
|
||||
|
@ -504,6 +505,61 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if STATUS_HOTEND_BITMAPS >= 5 && !HAS_HEATED_BED
|
||||
|
||||
#ifdef STATUS_HOTEND_ANIM
|
||||
|
||||
const unsigned char status_hotend5_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111111,B11110000,
|
||||
B00111000,B01110000,
|
||||
B00111011,B11110000,
|
||||
B00011000,B11100000,
|
||||
B00011111,B01100000,
|
||||
B00111111,B01110000,
|
||||
B00111011,B01110000,
|
||||
B00111100,B11110000,
|
||||
B00001111,B11000000,
|
||||
B00000111,B10000000,
|
||||
B00000011,B00000000
|
||||
};
|
||||
|
||||
const unsigned char status_hotend5_b_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00100000,B00010000,
|
||||
B00100111,B10010000,
|
||||
B00100100,B00010000,
|
||||
B00010111,B00100000,
|
||||
B00010000,B10100000,
|
||||
B00100000,B10010000,
|
||||
B00100100,B10010000,
|
||||
B00110011,B00110000,
|
||||
B00001000,B01000000,
|
||||
B00000100,B10000000,
|
||||
B00000011,B00000000
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
const unsigned char status_hotend5_a_bmp[] PROGMEM = {
|
||||
B00011111,B11100000,
|
||||
B00111000,B01110000,
|
||||
B00111011,B11110000,
|
||||
B00111000,B11110000,
|
||||
B00011111,B01100000,
|
||||
B00011111,B01100000,
|
||||
B00111011,B01110000,
|
||||
B00111100,B11110000,
|
||||
B00111111,B11110000,
|
||||
B00001111,B11000000,
|
||||
B00000111,B10000000,
|
||||
B00000011,B00000000
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -516,7 +572,7 @@
|
|||
// Default Status Screen Bed bitmaps
|
||||
//
|
||||
|
||||
#if !STATUS_BED_WIDTH && !defined(COMBINED_HEATER_BITMAP) && HAS_HEATED_BED && HOTENDS < 4
|
||||
#if !STATUS_BED_WIDTH && !defined(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
|
||||
|
||||
#ifdef ALTERNATE_BED_BITMAP
|
||||
|
||||
|
@ -602,7 +658,7 @@
|
|||
|
||||
#endif
|
||||
|
||||
#endif // !STATUS_BED_WIDTH && !COMBINED_HEATER_BITMAP && HAS_HEATED_BED && HOTENDS < 4
|
||||
#endif // !STATUS_BED_WIDTH && !STATUS_COMBINE_HEATERS && HAS_HEATED_BED && HOTENDS < 4
|
||||
|
||||
// Can also be overridden in Configuration.h
|
||||
// If you can afford it, try the 3-frame fan animation!
|
||||
|
@ -982,11 +1038,11 @@
|
|||
#endif
|
||||
|
||||
#if STATUS_HOTEND_BITMAPS > 1
|
||||
#define TEST_BITMAP_OFF status_hotend1_bmp
|
||||
#define TEST_BITMAP_ON status_hotend1_on_bmp
|
||||
#define TEST_BITMAP_OFF status_hotend1_a_bmp
|
||||
#define TEST_BITMAP_ON status_hotend1_b_bmp
|
||||
#else
|
||||
#define TEST_BITMAP_OFF status_hotend_bmp
|
||||
#define TEST_BITMAP_ON status_hotend_on_bmp
|
||||
#define TEST_BITMAP_OFF status_hotend_a_bmp
|
||||
#define TEST_BITMAP_ON status_hotend_b_bmp
|
||||
#endif
|
||||
#ifndef STATUS_HEATERS_HEIGHT
|
||||
#define STATUS_HEATERS_HEIGHT (sizeof(TEST_BITMAP_OFF) / (STATUS_HOTEND1_BYTEWIDTH))
|
||||
|
|
|
@ -305,18 +305,26 @@ void MarlinUI::draw_status_screen() {
|
|||
|
||||
#else
|
||||
|
||||
#if ANIM_END && defined(STATUS_HOTEND_INVERTED)
|
||||
#define OFF_BMP(N) status_hotend##N##_b_bmp
|
||||
#define ON_BMP(N) status_hotend##N##_a_bmp
|
||||
#else
|
||||
#define OFF_BMP(N) status_hotend##N##_a_bmp
|
||||
#define ON_BMP(N) status_hotend##N##_b_bmp
|
||||
#endif
|
||||
|
||||
#if STATUS_HOTEND_BITMAPS > 1
|
||||
static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, status_hotend1_bmp, status_hotend2_bmp, status_hotend3_bmp, status_hotend4_bmp, status_hotend5_bmp, status_hotend6_bmp);
|
||||
static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, OFF_BMP(1), OFF_BMP(2), OFF_BMP(3), OFF_BMP(4), OFF_BMP(5), OFF_BMP(6));
|
||||
#if ANIM_END
|
||||
static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, status_hotend1_on_bmp, status_hotend2_on_bmp, status_hotend3_on_bmp, status_hotend4_on_bmp, status_hotend5_on_bmp, status_hotend6_on_bmp);
|
||||
static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, ON_BMP(1), ON_BMP(2), ON_BMP(3), ON_BMP(4), ON_BMP(5), ON_BMP(6));
|
||||
#define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
|
||||
#else
|
||||
#define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
|
||||
#endif
|
||||
#elif ANIM_END
|
||||
#define HOTEND_BITMAP(N,S) ((S) ? status_hotend_on_bmp : status_hotend_bmp)
|
||||
#define HOTEND_BITMAP(N,S) ((S) ? ON_BMP() : OFF_BMP())
|
||||
#else
|
||||
#define HOTEND_BITMAP(N,S) status_hotend_bmp
|
||||
#define HOTEND_BITMAP(N,S) status_hotend_a_bmp
|
||||
#endif
|
||||
|
||||
#define MAX_HOTEND_DRAW MIN(HOTENDS, ((128 - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
|
||||
|
|
Reference in a new issue