Browse Source

Tweak ui.finish_status

Scott Lahteine 5 years ago
parent
commit
d6a4c3079d
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      Marlin/src/lcd/ultralcd.cpp

+ 8
- 4
Marlin/src/lcd/ultralcd.cpp View File

524
     #if PROGRESS_MSG_EXPIRE > 0
524
     #if PROGRESS_MSG_EXPIRE > 0
525
 
525
 
526
       // Handle message expire
526
       // Handle message expire
527
-      if (expire_status_ms > 0) {
527
+      if (expire_status_ms) {
528
 
528
 
529
         // Expire the message if a job is active and the bar has ticks
529
         // Expire the message if a job is active and the bar has ticks
530
         if (get_progress_percent() > 2 && !print_job_timer.isPaused()) {
530
         if (get_progress_percent() > 2 && !print_job_timer.isPaused()) {
1337
       UNUSED(persist);
1337
       UNUSED(persist);
1338
     #endif
1338
     #endif
1339
 
1339
 
1340
+    #if ENABLED(LCD_PROGRESS_BAR) || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
1341
+      const millis_t ms = millis();
1342
+    #endif
1343
+
1340
     #if ENABLED(LCD_PROGRESS_BAR)
1344
     #if ENABLED(LCD_PROGRESS_BAR)
1341
-      progress_bar_ms = millis();
1345
+      progress_bar_ms = ms;
1342
       #if PROGRESS_MSG_EXPIRE > 0
1346
       #if PROGRESS_MSG_EXPIRE > 0
1343
-        expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE;
1347
+        expire_status_ms = persist ? 0 : ms + PROGRESS_MSG_EXPIRE;
1344
       #endif
1348
       #endif
1345
     #endif
1349
     #endif
1346
 
1350
 
1347
     #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
1351
     #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
1348
-      next_filament_display = millis() + 5000UL; // Show status message for 5s
1352
+      next_filament_display = ms + 5000UL; // Show status message for 5s
1349
     #endif
1353
     #endif
1350
 
1354
 
1351
     #if HAS_SPI_LCD && ENABLED(STATUS_MESSAGE_SCROLLING)
1355
     #if HAS_SPI_LCD && ENABLED(STATUS_MESSAGE_SCROLLING)

Loading…
Cancel
Save