Add LCD_SET_PROGRESS_MANUALLY
This commit is contained in:
@ -203,9 +203,9 @@ extern volatile uint8_t buttons; //an extended version of the last checked butt
|
||||
#include "utf_mapper.h"
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
static millis_t progress_bar_ms = 0;
|
||||
static millis_t progress_bar_ms = 0; // Start millis of the current progress bar cycle
|
||||
#if PROGRESS_MSG_EXPIRE > 0
|
||||
static millis_t expire_status_ms = 0;
|
||||
static millis_t expire_status_ms = 0; // millis at which to expire the status message
|
||||
#endif
|
||||
#define LCD_STR_PROGRESS "\x03\x04\x05"
|
||||
#endif
|
||||
@ -842,12 +842,13 @@ static void lcd_implementation_status_screen() {
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
|
||||
#if DISABLED(LCD_SET_PROGRESS_MANUALLY)
|
||||
const uint8_t progress_bar_percent = card.percentDone();
|
||||
#endif
|
||||
// Draw the progress bar if the message has shown long enough
|
||||
// or if there is no message set.
|
||||
if (card.isFileOpen() && (ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !lcd_status_message[0])) {
|
||||
const uint8_t percent = card.percentDone();
|
||||
if (percent) return lcd_draw_progress_bar(percent);
|
||||
}
|
||||
if (progress_bar_percent > 2 && (ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !lcd_status_message[0]))
|
||||
return lcd_draw_progress_bar(progress_bar_percent);
|
||||
|
||||
#elif ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
||||
|
||||
|
Reference in New Issue
Block a user