Преглед изворни кода

LCD_PROGRESS_BAR w/out SDSUPPORT for character LCD

Scott Lahteine пре 7 година
родитељ
комит
f6cc89ec7c
2 измењених фајлова са 15 додато и 17 уклоњено
  1. 2
    2
      Marlin/src/inc/SanityCheck.h
  2. 13
    15
      Marlin/src/lcd/ultralcd_impl_HD44780.h

+ 2
- 2
Marlin/src/inc/SanityCheck.h Прегледај датотеку

@@ -327,8 +327,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
327 327
  * Progress Bar
328 328
  */
329 329
 #if ENABLED(LCD_PROGRESS_BAR)
330
-  #if DISABLED(SDSUPPORT)
331
-    #error "LCD_PROGRESS_BAR requires SDSUPPORT."
330
+  #if DISABLED(SDSUPPORT) && DISABLED(LCD_SET_PROGRESS_MANUALLY)
331
+    #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
332 332
   #elif DISABLED(ULTRA_LCD)
333 333
     #error "LCD_PROGRESS_BAR requires a character LCD."
334 334
   #elif ENABLED(DOGLCD)

+ 13
- 15
Marlin/src/lcd/ultralcd_impl_HD44780.h Прегледај датотеку

@@ -426,23 +426,21 @@ static void lcd_set_custom_characters(
426 426
           createChar_P(LCD_FEEDRATE_CHAR, feedrate);
427 427
           createChar_P(LCD_CLOCK_CHAR, clock);
428 428
 
429
-          #if ENABLED(SDSUPPORT)
430
-            #if ENABLED(LCD_PROGRESS_BAR)
431
-              if (screen_charset == CHARSET_INFO) { // 3 Progress bar characters for info screen
432
-                for (int16_t i = 3; i--;)
433
-                  createChar_P(LCD_STR_PROGRESS[i], progress[i]);
434
-              }
435
-              else
436
-            #endif
437
-              { // SD Card sub-menu special characters
438
-                createChar_P(LCD_UPLEVEL_CHAR, uplevel);
429
+          #if ENABLED(LCD_PROGRESS_BAR)
430
+            if (screen_charset == CHARSET_INFO) { // 3 Progress bar characters for info screen
431
+              for (int16_t i = 3; i--;)
432
+                createChar_P(LCD_STR_PROGRESS[i], progress[i]);
433
+            }
434
+            else
435
+          #endif
436
+            {
437
+              createChar_P(LCD_UPLEVEL_CHAR, uplevel);
438
+              #if ENABLED(SDSUPPORT)
439
+                // SD Card sub-menu special characters
439 440
                 createChar_P(LCD_STR_REFRESH[0], refresh);
440 441
                 createChar_P(LCD_STR_FOLDER[0], folder);
441
-              }
442
-          #else
443
-            // With no SD support, only need the uplevel character
444
-            createChar_P(LCD_UPLEVEL_CHAR, uplevel);
445
-          #endif
442
+              #endif
443
+            }
446 444
         }
447 445
   }
448 446
 }

Loading…
Откажи
Сачувај