|
@@ -273,22 +273,22 @@ static void lcd_status_screen() {
|
273
|
273
|
#endif
|
274
|
274
|
#if PROGRESS_MSG_EXPIRE > 0
|
275
|
275
|
// Handle message expire
|
276
|
|
- if (expireStatusMillis > 0) {
|
|
276
|
+ if (expire_status_ms > 0) {
|
277
|
277
|
if (card.isFileOpen()) {
|
278
|
278
|
// Expire the message when printing is active
|
279
|
279
|
if (IS_SD_PRINTING) {
|
280
|
280
|
// Expire the message when printing is active
|
281
|
|
- if (ms >= expireStatusMillis) {
|
|
281
|
+ if (ms >= expire_status_ms) {
|
282
|
282
|
lcd_status_message[0] = '\0';
|
283
|
|
- expireStatusMillis = 0;
|
|
283
|
+ expire_status_ms = 0;
|
284
|
284
|
}
|
285
|
285
|
}
|
286
|
286
|
else {
|
287
|
|
- expireStatusMillis += LCD_UPDATE_INTERVAL;
|
|
287
|
+ expire_status_ms += LCD_UPDATE_INTERVAL;
|
288
|
288
|
}
|
289
|
289
|
}
|
290
|
290
|
else {
|
291
|
|
- expireStatusMillis = 0;
|
|
291
|
+ expire_status_ms = 0;
|
292
|
292
|
}
|
293
|
293
|
}
|
294
|
294
|
#endif
|
|
@@ -1394,7 +1394,7 @@ void lcd_finishstatus(bool persist=false) {
|
1394
|
1394
|
#ifdef LCD_PROGRESS_BAR
|
1395
|
1395
|
progressBarTick = millis();
|
1396
|
1396
|
#if PROGRESS_MSG_EXPIRE > 0
|
1397
|
|
- expireStatusMillis = persist ? 0 : progressBarTick + PROGRESS_MSG_EXPIRE;
|
|
1397
|
+ expire_status_ms = persist ? 0 : progressBarTick + PROGRESS_MSG_EXPIRE;
|
1398
|
1398
|
#endif
|
1399
|
1399
|
#endif
|
1400
|
1400
|
lcdDrawUpdate = 2;
|
|
@@ -1405,7 +1405,7 @@ void lcd_finishstatus(bool persist=false) {
|
1405
|
1405
|
}
|
1406
|
1406
|
|
1407
|
1407
|
#if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
|
1408
|
|
- void dontExpireStatus() { expireStatusMillis = 0; }
|
|
1408
|
+ void dontExpireStatus() { expire_status_ms = 0; }
|
1409
|
1409
|
#endif
|
1410
|
1410
|
|
1411
|
1411
|
void set_utf_strlen(char *s, uint8_t n) {
|
|
@@ -1418,6 +1418,8 @@ void set_utf_strlen(char *s, uint8_t n) {
|
1418
|
1418
|
s[i] = 0;
|
1419
|
1419
|
}
|
1420
|
1420
|
|
|
1421
|
+bool lcd_hasstatus() { return (lcd_status_message[0] != '\0'); }
|
|
1422
|
+
|
1421
|
1423
|
void lcd_setstatus(const char* message, bool persist) {
|
1422
|
1424
|
if (lcd_status_message_level > 0) return;
|
1423
|
1425
|
strncpy(lcd_status_message, message, 3*LCD_WIDTH);
|