|
@@ -194,9 +194,9 @@
|
194
|
194
|
#include "utf_mapper.h"
|
195
|
195
|
|
196
|
196
|
#ifdef LCD_PROGRESS_BAR
|
197
|
|
- static uint16_t progressBarTick = 0;
|
|
197
|
+ static millis_t progress_bar_ms = 0;
|
198
|
198
|
#if PROGRESS_MSG_EXPIRE > 0
|
199
|
|
- static uint16_t expire_status_ms = 0;
|
|
199
|
+ static millis_t expire_status_ms = 0;
|
200
|
200
|
#endif
|
201
|
201
|
#define LCD_STR_PROGRESS "\x03\x04\x05"
|
202
|
202
|
#endif
|
|
@@ -588,8 +588,9 @@ static void lcd_implementation_status_screen() {
|
588
|
588
|
#ifdef LCD_PROGRESS_BAR
|
589
|
589
|
|
590
|
590
|
if (card.isFileOpen()) {
|
591
|
|
- if (millis() >= progressBarTick + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
|
592
|
|
- // draw the progress bar
|
|
591
|
+ // Draw the progress bar if the message has shown long enough
|
|
592
|
+ // or if there is no message set.
|
|
593
|
+ if (millis() >= progress_bar_ms + PROGRESS_BAR_MSG_TIME || !lcd_status_message[0]) {
|
593
|
594
|
int tix = (int)(card.percentDone() * LCD_WIDTH * 3) / 100,
|
594
|
595
|
cel = tix / 3, rem = tix % 3, i = LCD_WIDTH;
|
595
|
596
|
char msg[LCD_WIDTH+1], b = ' ';
|