Scott Lahteine 5 years ago
parent
commit
5edd5d1e1f
No account linked to committer's email address
1 changed files with 13 additions and 12 deletions
  1. 13
    12
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 13
- 12
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

596
 
596
 
597
     if (PAGE_CONTAINS(EXTRAS_BASELINE - INFO_FONT_ASCENT, EXTRAS_BASELINE - 1)) {
597
     if (PAGE_CONTAINS(EXTRAS_BASELINE - INFO_FONT_ASCENT, EXTRAS_BASELINE - 1)) {
598
 
598
 
599
-      #if ENABLED(DOGM_SD_PERCENT) && ENABLED(SHOW_REMAINING_TIME) && ENABLED(ROTATE_PROGRESS_DISPLAY)
599
+      #if ALL(DOGM_SD_PERCENT, SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY)
600
+
600
         if (prev_blink != blink) {
601
         if (prev_blink != blink) {
601
           prev_blink = blink;
602
           prev_blink = blink;
602
-          progress_state++;
603
-          if (progress_state >=3) progress_state = 0;
603
+          if (++progress_state >= 3) progress_state = 0;
604
         }
604
         }
605
 
605
 
606
         if (progress_state == 0) {
606
         if (progress_state == 0) {
607
-          if (progress_string[0] != '\0') {
607
+          if (progress_string[0]) {
608
             lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, PROGRESS_TIME_PREFIX);
608
             lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, PROGRESS_TIME_PREFIX);
609
             lcd_put_u8str(progress_x_pos, EXTRAS_BASELINE, progress_string);
609
             lcd_put_u8str(progress_x_pos, EXTRAS_BASELINE, progress_string);
610
             lcd_put_wchar('%');
610
             lcd_put_wchar('%');
611
           }
611
           }
612
         }
612
         }
613
-        else if (progress_state == 2  && estimation_string[0] != '\0') {
613
+        else if (progress_state == 2 && estimation_string[0]) {
614
           lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
614
           lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
615
           lcd_put_u8str(estimation_x_pos, EXTRAS_BASELINE, estimation_string);
615
           lcd_put_u8str(estimation_x_pos, EXTRAS_BASELINE, estimation_string);
616
         }
616
         }
617
-        else if (elapsed_string[0] != '\0'){
617
+        else if (elapsed_string[0]) {
618
           lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, ELAPSED_TIME_PREFIX);
618
           lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, ELAPSED_TIME_PREFIX);
619
           lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
619
           lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
620
         }
620
         }
621
-      #else
621
+
622
+      #else // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY
622
 
623
 
623
         //
624
         //
624
         // SD Percent Complete
625
         // SD Percent Complete
625
         //
626
         //
626
 
627
 
627
         #if ENABLED(DOGM_SD_PERCENT)
628
         #if ENABLED(DOGM_SD_PERCENT)
628
-          if (progress_string[0] != '\0') {
629
-            // Percent complete
630
-            lcd_put_u8str(55, 48, progress_string);
629
+          if (progress_string[0]) {
630
+            lcd_put_u8str(55, 48, progress_string); // Percent complete
631
             lcd_put_wchar('%');
631
             lcd_put_wchar('%');
632
           }
632
           }
633
         #endif
633
         #endif
637
         //
637
         //
638
 
638
 
639
         #if ENABLED(SHOW_REMAINING_TIME)
639
         #if ENABLED(SHOW_REMAINING_TIME)
640
-          if (blink && (estimation_string[0] != '\0')) {
640
+          if (blink && estimation_string[0]) {
641
             lcd_put_wchar(estimation_x_pos, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
641
             lcd_put_wchar(estimation_x_pos, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
642
             lcd_put_u8str(estimation_string);
642
             lcd_put_u8str(estimation_string);
643
           }
643
           }
645
         #endif
645
         #endif
646
             lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
646
             lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
647
 
647
 
648
-      #endif
648
+      #else // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY
649
     }
649
     }
650
+
650
   #endif // HAS_PRINT_PROGRESS
651
   #endif // HAS_PRINT_PROGRESS
651
 
652
 
652
   //
653
   //

Loading…
Cancel
Save