Add heating progress bars (#12543)

2.0.x
Scott Lahteine 6 years ago committed by GitHub
parent 929a513a6b
commit 4f9ec9ab45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -816,6 +816,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -789,6 +789,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -816,6 +816,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -825,6 +825,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -821,6 +821,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -822,6 +822,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -825,6 +825,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -830,6 +830,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -819,6 +819,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -817,6 +817,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -818,6 +818,7 @@
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#endif // HAS_GRAPHICAL_LCD

@ -31,6 +31,8 @@
#include "../../inc/MarlinConfig.h"
#define BW(N) ((N + 7) / 8)
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
/**
@ -49,13 +51,18 @@
#endif
#if ENABLED(STATUS_COMBINE_HEATERS)
#undef STATUS_HOTEND_ANIM
#undef STATUS_BED_ANIM
#endif
//
// Default Status Screen Heater or Hotends bitmaps
//
#if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
#ifdef STATUS_COMBINE_HEATERS
#if ENABLED(STATUS_COMBINE_HEATERS)
//
// Status Screen Combined Heater bitmaps
@ -67,6 +74,8 @@
#if HAS_HEATED_BED && HOTENDS <= 3
#define STATUS_BED_WIDTH 18
#if HOTENDS == 0
#define STATUS_HEATERS_WIDTH 18
@ -89,6 +98,7 @@
#elif HOTENDS == 1
#define STATUS_HEATERS_WIDTH 90
#define STATUS_BED_X 80
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B10000010,B00000000,
@ -237,7 +247,7 @@
#define STATUS_HOTEND1_WIDTH 12
#if HOTENDS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
#if HOTENDS == 1 || ENABLED(STATUS_HOTEND_NUMBERLESS)
const unsigned char status_hotend_a_bmp[] PROGMEM = {
B00011111,B11100000,
@ -563,9 +573,9 @@
// Default Status Screen Bed bitmaps
//
#if !STATUS_BED_WIDTH && !defined(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
#if !STATUS_BED_WIDTH && DISABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
#ifdef STATUS_ALT_BED_BITMAP
#if ENABLED(STATUS_ALT_BED_BITMAP)
#define STATUS_BED_ANIM
#define STATUS_BED_WIDTH 24
@ -886,7 +896,7 @@
#define STATUS_LOGO_WIDTH 0
#endif
#ifndef STATUS_LOGO_BYTEWIDTH
#define STATUS_LOGO_BYTEWIDTH ((STATUS_LOGO_WIDTH + 7) / 8)
#define STATUS_LOGO_BYTEWIDTH BW(STATUS_LOGO_WIDTH)
#endif
#if STATUS_LOGO_WIDTH
#ifndef STATUS_LOGO_X
@ -953,22 +963,22 @@
#define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
#ifndef STATUS_HOTEND1_BYTEWIDTH
#define STATUS_HOTEND1_BYTEWIDTH ((STATUS_HOTEND1_WIDTH + 7) / 8)
#define STATUS_HOTEND1_BYTEWIDTH BW(STATUS_HOTEND1_WIDTH)
#endif
#ifndef STATUS_HOTEND2_BYTEWIDTH
#define STATUS_HOTEND2_BYTEWIDTH ((STATUS_HOTEND2_WIDTH + 7) / 8)
#define STATUS_HOTEND2_BYTEWIDTH BW(STATUS_HOTEND2_WIDTH)
#endif
#ifndef STATUS_HOTEND3_BYTEWIDTH
#define STATUS_HOTEND3_BYTEWIDTH ((STATUS_HOTEND3_WIDTH + 7) / 8)
#define STATUS_HOTEND3_BYTEWIDTH BW(STATUS_HOTEND3_WIDTH)
#endif
#ifndef STATUS_HOTEND4_BYTEWIDTH
#define STATUS_HOTEND4_BYTEWIDTH ((STATUS_HOTEND4_WIDTH + 7) / 8)
#define STATUS_HOTEND4_BYTEWIDTH BW(STATUS_HOTEND4_WIDTH)
#endif
#ifndef STATUS_HOTEND5_BYTEWIDTH
#define STATUS_HOTEND5_BYTEWIDTH ((STATUS_HOTEND5_WIDTH + 7) / 8)
#define STATUS_HOTEND5_BYTEWIDTH BW(STATUS_HOTEND5_WIDTH)
#endif
#ifndef STATUS_HOTEND6_BYTEWIDTH
#define STATUS_HOTEND6_BYTEWIDTH ((STATUS_HOTEND6_WIDTH + 7) / 8)
#define STATUS_HOTEND6_BYTEWIDTH BW(STATUS_HOTEND6_WIDTH)
#endif
constexpr uint8_t status_hotend_bytewidth[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_BYTEWIDTH, STATUS_HOTEND2_BYTEWIDTH, STATUS_HOTEND3_BYTEWIDTH, STATUS_HOTEND4_BYTEWIDTH, STATUS_HOTEND5_BYTEWIDTH, STATUS_HOTEND6_BYTEWIDTH);
@ -1054,11 +1064,20 @@
#elif STATUS_HEATERS_WIDTH
#ifndef STATUS_HEATERS_XSPACE
#define STATUS_HEATERS_XSPACE 24
#endif
#ifndef STATUS_HOTEND_WIDTH
#define STATUS_HOTEND_WIDTH(N) 10
#endif
#ifndef STATUS_HOTEND_X
#define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#ifndef STATUS_HOTEND_TEXT_X
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#ifndef STATUS_HEATERS_BYTEWIDTH
#define STATUS_HEATERS_BYTEWIDTH ((STATUS_HEATERS_WIDTH + 7) / 8)
#define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH)
#endif
#ifndef STATUS_HEATERS_HEIGHT
#define STATUS_HEATERS_HEIGHT (sizeof(status_heaters_bmp) / (STATUS_HEATERS_BYTEWIDTH))
@ -1081,9 +1100,9 @@
#define STATUS_BED_WIDTH 0
#endif
#ifndef STATUS_BED_BYTEWIDTH
#define STATUS_BED_BYTEWIDTH ((STATUS_BED_WIDTH + 7) / 8)
#define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH)
#endif
#if STATUS_BED_WIDTH
#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
#ifndef STATUS_BED_X
#define STATUS_BED_X (128 - (STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8)
@ -1125,7 +1144,7 @@
#define STATUS_FAN_WIDTH 0
#endif
#ifndef STATUS_FAN_BYTEWIDTH
#define STATUS_FAN_BYTEWIDTH ((STATUS_FAN_WIDTH + 7) / 8)
#define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH)
#endif
#if STATUS_FAN_FRAMES
#ifndef STATUS_FAN_X

@ -51,87 +51,151 @@
#include "../../module/printcounter.h"
#endif
FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) {
FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) {
const char *str = itostr3(temp);
const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1;
lcd_moveto(x - len * (INFO_FONT_WIDTH) / 2 + 1, y);
lcd_moveto(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty);
lcd_put_u8str(&str[3-len]);
lcd_put_wchar(LCD_STR_DEGREE[0]);
}
#if ENABLED(MARLIN_DEV_MODE)
#define SHOW_ON_STATE READ(X_MIN_PIN)
#define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH && HOTENDS <= 3 && DISABLED(STATUS_COMBINE_HEATERS))
#define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && STATUS_FAN_FRAMES)
#define ANIM_HOTEND (HOTENDS && ENABLED(STATUS_HOTEND_ANIM))
#define ANIM_BED (DO_DRAW_BED && ENABLED(STATUS_BED_ANIM))
#if ANIM_HOTEND || ANIM_BED
uint8_t heat_bits;
#endif
#if ANIM_HOTEND
#define HOTEND_ALT(N) TEST(heat_bits, N)
#else
#define HOTEND_ALT(N) false
#endif
#if ANIM_BED
#define BED_ALT() TEST(heat_bits, 7)
#else
#define SHOW_ON_STATE false
#define BED_ALT() false
#endif
FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
#define MAX_HOTEND_DRAW MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
FORCE_INLINE void _draw_heater_status(const int8_t heater, const bool blink) {
#if !HEATER_IDLE_HANDLER
UNUSED(blink);
#endif
#if HAS_HEATED_BED
const bool isBed = heater < 0;
#define IFBED(A,B) (isBed ? (A) : (B))
#else
constexpr bool isBed = false;
#define IFBED(A,B) (B)
#endif
if (PAGE_UNDER(7)) {
#if HEATER_IDLE_HANDLER
const bool is_idle = (
#if HAS_HEATED_BED
isBed ? thermalManager.is_bed_idle() :
#endif
thermalManager.is_heater_idle(heater)
);
const bool isHeat = IFBED(BED_ALT(), HOTEND_ALT(heater));
const uint8_t ix = IFBED(STATUS_BED_X, STATUS_HOTEND_X(heater)),
tx = IFBED(STATUS_BED_TEXT_X, STATUS_HOTEND_TEXT_X(heater));
const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)),
target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater));
if (blink || !is_idle)
#endif
_draw_centered_temp(0.5 + (
#if HAS_HEATED_BED
isBed ? thermalManager.degTargetBed() :
#endif
thermalManager.degTargetHotend(heater)
), x, 7
);
}
#if DISABLED(STATUS_HOTEND_ANIM)
#define STATIC_HOTEND true
#define HOTEND_DOT isHeat
#else
#define STATIC_HOTEND false
#define HOTEND_DOT false
#endif
if (PAGE_CONTAINS(21, 28))
_draw_centered_temp(0.5f + (
#if HAS_HEATED_BED
isBed ? thermalManager.degBed() :
#endif
thermalManager.degHotend(heater)
), x, 28
);
#if HAS_HEATED_BED && DISABLED(STATUS_BED_ANIM)
#define STATIC_BED true
#define BED_DOT isHeat
#else
#define STATIC_BED false
#define BED_DOT false
#endif
#ifndef STATUS_HOTEND_ANIM
#define INDICATE_HOTEND true
#define INDICATE_HOTEND_ON (thermalManager.isHeatingHotend(heater) ^ SHOW_ON_STATE)
#if ANIM_HOTEND && ENABLED(STATUS_HOTEND_INVERTED)
#define OFF_BMP(N) status_hotend##N##_b_bmp
#define ON_BMP(N) status_hotend##N##_a_bmp
#else
#define INDICATE_HOTEND false
#define INDICATE_HOTEND_ON false
#define OFF_BMP(N) status_hotend##N##_a_bmp
#define ON_BMP(N) status_hotend##N##_b_bmp
#endif
#if HAS_HEATED_BED && !defined(STATUS_BED_ANIM)
#define INDICATE_BED true
#define INDICATE_BED_ON (thermalManager.isHeatingBed() ^ SHOW_ON_STATE)
#if STATUS_HOTEND_BITMAPS > 1
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_HOTEND
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_HOTEND
#define HOTEND_BITMAP(N,S) ((S) ? ON_BMP() : OFF_BMP())
#else
#define INDICATE_BED false
#define INDICATE_BED_ON false
#define HOTEND_BITMAP(N,S) status_hotend_a_bmp
#endif
if (isBed ? INDICATE_BED : INDICATE_HOTEND) {
if (PAGE_CONTAINS(17, 20)) {
const uint8_t y = 20 - (isBed ? 2 : 3);
if (isBed ? INDICATE_BED_ON : INDICATE_HOTEND_ON) {
u8g.setColorIndex(0); // set to white on black
u8g.drawBox(x, y, 2, 2);
u8g.setColorIndex(1); // restore black on white
if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) {
#define BAR_TALL (STATUS_HEATERS_HEIGHT - 2)
const float prop = target - 20,
perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0;
uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f);
NOMORE(tall, BAR_TALL);
#ifdef STATUS_HOTEND_ANIM
// Draw hotend bitmap, either whole or split by the heating percent
if (IFBED(0, 1)) {
const uint8_t hx = STATUS_HOTEND_X(heater), bw = STATUS_HOTEND_BYTEWIDTH(heater);
#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);
}
else
#endif
u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(heater, isHeat));
}
else
u8g.drawBox(x, y, 2, 2);
}
#endif
// Draw a heating progress bar, if specified
#if ENABLED(STATUS_HEAT_PERCENT)
if (IFBED(true, STATIC_HOTEND) && isHeat) {
const uint8_t bx = ix + IFBED(STATUS_BED_WIDTH, STATUS_HOTEND_WIDTH(heater)) + 1;
u8g.drawFrame(bx, STATUS_HEATERS_Y, 3, STATUS_HEATERS_HEIGHT);
if (tall) {
const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall;
if (PAGE_OVER(STATUS_HEATERS_Y + ph))
u8g.drawVLine(bx + 1, STATUS_HEATERS_Y + ph, tall);
}
}
#endif
} // PAGE_CONTAINS
if (PAGE_UNDER(7)) {
#if HEATER_IDLE_HANDLER
const bool is_idle = IFBED(thermalManager.is_bed_idle(), thermalManager.is_heater_idle(heater)),
dodraw = (blink || !is_idle);
#else
constexpr bool dodraw = true;
#endif
if (dodraw) _draw_centered_temp(target + 0.5, tx, 7);
}
if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
_draw_centered_temp(temp + 0.5f, tx, 28);
if (IFBED(STATIC_BED && BED_DOT, STATIC_HOTEND && HOTEND_DOT) && PAGE_CONTAINS(17, 19)) {
u8g.setColorIndex(0); // set to white on black
u8g.drawBox(tx, IFBED(20-2, 20-3), 2, 2);
u8g.setColorIndex(1); // restore black on white
}
}
@ -158,94 +222,8 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
}
}
void MarlinUI::draw_status_message(const bool blink) {
// Get the UTF8 character count of the string
uint8_t slen = utf8_strlen(status_message);
#if ENABLED(STATUS_MESSAGE_SCROLLING)
static bool last_blink = false;
if (slen <= LCD_WIDTH) {
// The string fits within the line. Print with no scrolling
lcd_put_u8str(status_message);
for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
}
else {
// String is longer than the available space
// Get a pointer to the next valid UTF8 character
const char *stat = status_message + status_scroll_offset;
// Get the string remaining length
const uint8_t rlen = utf8_strlen(stat);
if (rlen >= LCD_WIDTH) {
// The remaining string fills the screen - Print it
lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);
}
else {
// The remaining string does not completely fill the screen
lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH); // The string leaves space
uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters
lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot
if (--chars) { // Draw a second dot if there's space
lcd_put_wchar('.');
if (--chars) {
// Print a second copy of the message
lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH - (rlen + 2) * (MENU_FONT_WIDTH));
}
}
}
if (last_blink != blink) {
last_blink = blink;
// Adjust by complete UTF8 characters
if (status_scroll_offset < slen) {
status_scroll_offset++;
while (!START_OF_UTF8_CHAR(status_message[status_scroll_offset]))
status_scroll_offset++;
}
else
status_scroll_offset = 0;
}
}
#else // !STATUS_MESSAGE_SCROLLING
UNUSED(blink);
// Just print the string to the LCD
lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH);
// Fill the rest with spaces
for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
#endif // !STATUS_MESSAGE_SCROLLING
}
void MarlinUI::draw_status_screen() {
#define DO_DRAW_BED (HAS_HEATED_BED && STATUS_BED_WIDTH)
#define DO_DRAW_FAN (HAS_FAN0 && STATUS_FAN_WIDTH && STATUS_FAN_FRAMES)
#define ANIM_END (HOTENDS && defined(STATUS_HOTEND_ANIM))
#define ANIM_BED (DO_DRAW_BED && defined(STATUS_BED_ANIM))
#if ANIM_END || ANIM_BED
static uint8_t heat_bits;
#endif
#if ANIM_END
#define HOTEND_ALT(N) TEST(heat_bits, N)
#else
#define HOTEND_ALT(N) false
#endif
#if ANIM_BED
#define BED_ALT TEST(heat_bits, 7)
#else
#define BED_ALT false
#endif
static char xstring[5], ystring[5], zstring[8];
#if ENABLED(FILAMENT_LCD_DISPLAY)
static char wstring[5], mstring[4];
@ -253,14 +231,15 @@ void MarlinUI::draw_status_screen() {
// At the first page, generate new display values
if (first_page) {
#if ANIM_END || ANIM_BED
heat_bits = 0;
#if ANIM_END
HOTEND_LOOP() if (thermalManager.isHeatingHotend(e) ^ SHOW_ON_STATE) SBI(heat_bits, e);
#if ANIM_HOTEND || ANIM_BED
uint8_t new_bits = 0;
#if ANIM_HOTEND
HOTEND_LOOP() if (thermalManager.isHeatingHotend(e)) SBI(new_bits, e);
#endif
#if ANIM_BED
if (thermalManager.isHeatingBed() ^ SHOW_ON_STATE) SBI(heat_bits, 7);
if (thermalManager.isHeatingBed()) SBI(new_bits, 7);
#endif
heat_bits = new_bits;
#endif
strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])));
strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])));
@ -283,65 +262,13 @@ void MarlinUI::draw_status_screen() {
#if STATUS_LOGO_WIDTH
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
#if STATUS_HEATERS_WIDTH || STATUS_HOTEND1_WIDTH
if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)) {
#if STATUS_HEATERS_WIDTH
// Draw all heaters (and maybe the bed) in one go
u8g.drawBitmapP(
STATUS_HEATERS_X, STATUS_HEATERS_Y,
STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT,
status_heaters_bmp
);
#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, 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, 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) ? ON_BMP() : OFF_BMP())
#else
#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)))
// Draw hotends from one or more individual hotend bitmaps
for (uint8_t h = 0; h < MAX_HOTEND_DRAW; ++h) {
u8g.drawBitmapP(
STATUS_HOTEND_X(h), STATUS_HEATERS_Y,
STATUS_HOTEND_BYTEWIDTH(h), STATUS_HEATERS_HEIGHT,
HOTEND_BITMAP(h, HOTEND_ALT(h))
);
}
#endif
} // PAGE_CONTAINS
#if STATUS_HEATERS_WIDTH
// Draw all heaters (and maybe the bed) in one go
if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1))
u8g.drawBitmapP(STATUS_HEATERS_X, STATUS_HEATERS_Y, STATUS_HEATERS_BYTEWIDTH, STATUS_HEATERS_HEIGHT, status_heaters_bmp);
#endif
#if DO_DRAW_BED
@ -350,14 +277,9 @@ void MarlinUI::draw_status_screen() {
#else
#define BED_BITMAP(S) status_bed_bmp
#endif
const uint8_t bedy = STATUS_BED_Y(BED_ALT), bedh = STATUS_BED_HEIGHT(BED_ALT);
if (PAGE_CONTAINS(bedy, bedy + bedh - 1)) {
u8g.drawBitmapP(
STATUS_BED_X, bedy,
STATUS_BED_BYTEWIDTH, bedh,
BED_BITMAP(BED_ALT)
);
}
const uint8_t bedy = STATUS_BED_Y(BED_ALT()), bedh = STATUS_BED_HEIGHT(BED_ALT());
if (PAGE_CONTAINS(bedy, bedy + bedh - 1))
u8g.drawBitmapP(STATUS_BED_X, bedy, STATUS_BED_BYTEWIDTH, bedh, BED_BITMAP(BED_ALT()));
#endif
#if DO_DRAW_FAN
@ -390,13 +312,14 @@ void MarlinUI::draw_status_screen() {
// Temperature Graphics and Info
//
if (PAGE_UNDER(28)) {
if (PAGE_UNDER(6 + 1 + 12 + 1 + 6 + 1)) {
// Extruders
HOTEND_LOOP() _draw_heater_status(STATUS_HOTEND_TEXT_X(e), e, blink);
for (uint8_t e = 0; e < MAX_HOTEND_DRAW; ++e)
_draw_heater_status(e, blink);
// Heated bed
#if HOTENDS < 4 && HAS_HEATED_BED
_draw_heater_status(STATUS_BED_TEXT_X, -1, blink);
#if HAS_HEATED_BED && HOTENDS < 4
_draw_heater_status(-1, blink);
#endif
// Fan, if a bitmap was provided
@ -435,11 +358,8 @@ void MarlinUI::draw_status_screen() {
#define PROGRESS_BAR_X 54
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
if (PAGE_CONTAINS(49, 52)) // 49-52 (or 49-51)
u8g.drawFrame(
PROGRESS_BAR_X, 49,
PROGRESS_BAR_WIDTH, 4
);
if (PAGE_CONTAINS(49, 52))
u8g.drawFrame(PROGRESS_BAR_X, 49, PROGRESS_BAR_WIDTH, 4);
const uint8_t progress = get_progress();
@ -601,4 +521,72 @@ void MarlinUI::draw_status_screen() {
}
}
void MarlinUI::draw_status_message(const bool blink) {
// Get the UTF8 character count of the string
uint8_t slen = utf8_strlen(status_message);
#if ENABLED(STATUS_MESSAGE_SCROLLING)
static bool last_blink = false;
if (slen <= LCD_WIDTH) {
// The string fits within the line. Print with no scrolling
lcd_put_u8str(status_message);
for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
}
else {
// String is longer than the available space
// Get a pointer to the next valid UTF8 character
const char *stat = status_message + status_scroll_offset;
// Get the string remaining length
const uint8_t rlen = utf8_strlen(stat);
if (rlen >= LCD_WIDTH) {
// The remaining string fills the screen - Print it
lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH);
}
else {
// The remaining string does not completely fill the screen
lcd_put_u8str_max(stat, LCD_PIXEL_WIDTH); // The string leaves space
uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters
lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot
if (--chars) { // Draw a second dot if there's space
lcd_put_wchar('.');
if (--chars) {
// Print a second copy of the message
lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH - (rlen + 2) * (MENU_FONT_WIDTH));
}
}
}
if (last_blink != blink) {
last_blink = blink;
// Adjust by complete UTF8 characters
if (status_scroll_offset < slen) {
status_scroll_offset++;
while (!START_OF_UTF8_CHAR(status_message[status_scroll_offset]))
status_scroll_offset++;
}
else
status_scroll_offset = 0;
}
}
#else // !STATUS_MESSAGE_SCROLLING
UNUSED(blink);
// Just print the string to the LCD
lcd_put_u8str_max(status_message, LCD_PIXEL_WIDTH);
// Fill the rest with spaces
for (; slen < LCD_WIDTH; ++slen) lcd_put_wchar(' ');
#endif // !STATUS_MESSAGE_SCROLLING
}
#endif // HAS_GRAPHICAL_LCD && !LIGHTWEIGHT_UI

@ -133,8 +133,9 @@
#endif
// For selective rendering within a Y range
#define PAGE_UNDER(yb) (u8g.getU8g()->current_page.y0 <= (yb))
#define PAGE_CONTAINS(ya, yb) (PAGE_UNDER(yb) && u8g.getU8g()->current_page.y1 >= (ya))
#define PAGE_OVER(ya) ((ya) <= u8g.getU8g()->current_page.y1) // Does the current page follow a region top?
#define PAGE_UNDER(yb) ((yb) >= u8g.getU8g()->current_page.y0) // Does the current page precede a region bottom?
#define PAGE_CONTAINS(ya, yb) ((yb) >= u8g.getU8g()->current_page.y0 && (ya) <= u8g.getU8g()->current_page.y1) // Do two vertical regions overlap?
// Only Western languages support big / small fonts
#if DISABLED(DISPLAY_CHARSET_ISO10646_1)

@ -257,6 +257,12 @@ void MarlinUI::init() {
#if HAS_ENCODER_ACTION
encoderDiff = 0;
#endif
#if ENABLED(MARLIN_DEV_MODE)
// Start timer 5 at full speed
SET_CS(5, PRESCALER_1);
SET_COM(5, A, NORMAL);
#endif
}
bool MarlinUI::get_blink() {

Loading…
Cancel
Save