Allow ExtUI to use LCD_SET_PROGRESS_MANUALLY (#12628)

This commit is contained in:
Marcio Teixeira
2018-12-12 16:21:37 -07:00
committed by Scott Lahteine
parent 9a4a463ec4
commit 902d5b0f8b
6 changed files with 20 additions and 20 deletions

View File

@ -52,6 +52,10 @@
char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
#endif
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
uint8_t MarlinUI::progress_bar_percent; // = 0
#endif
#if HAS_SPI_LCD
#if HAS_GRAPHICAL_LCD
@ -102,10 +106,6 @@ uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed
millis_t MarlinUI::next_filament_display; // = 0
#endif
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
uint8_t MarlinUI::progress_bar_percent; // = 0
#endif
millis_t next_button_update_ms;
#if HAS_GRAPHICAL_LCD

View File

@ -271,6 +271,16 @@ public:
static uint8_t status_message_level; // Higher levels block lower levels
static inline void reset_alert_level() { status_message_level = 0; }
#if HAS_PRINT_PROGRESS
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
static uint8_t progress_bar_percent;
static void set_progress(const uint8_t progress) { progress_bar_percent = MIN(progress, 100); }
#endif
static uint8_t get_progress();
#else
static constexpr uint8_t get_progress() { return 0; }
#endif
#if HAS_SPI_LCD
static bool detected();
@ -312,16 +322,6 @@ public:
#endif
static uint8_t lcd_status_update_delay;
#if HAS_PRINT_PROGRESS
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
static uint8_t progress_bar_percent;
static void set_progress(const uint8_t progress) { progress_bar_percent = MIN(progress, 100); }
#endif
static uint8_t get_progress();
#else
static constexpr uint8_t get_progress() { return 0; }
#endif
#if HAS_LCD_CONTRAST
static int16_t contrast;
static void set_contrast(const int16_t value);