Browse Source

Fix #4614: currentScreen only defined with ULTIPANEL

Scott Lahteine 8 years ago
parent
commit
132322e4d9
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      Marlin/ultralcd.cpp

+ 8
- 4
Marlin/ultralcd.cpp View File

@@ -2686,6 +2686,12 @@ void lcd_update() {
2686 2686
           break;
2687 2687
       }
2688 2688
 
2689
+      #if ENABLED(ULTIPANEL)
2690
+        #define CURRENTSCREEN() (*currentScreen)()
2691
+      #else
2692
+        #define CURRENTSCREEN() lcd_status_screen()
2693
+      #endif
2694
+
2689 2695
       #if ENABLED(DOGLCD)  // Changes due to different driver architecture of the DOGM display
2690 2696
         static int8_t dot_color = 0;
2691 2697
         dot_color = 1 - dot_color;
@@ -2696,12 +2702,10 @@ void lcd_update() {
2696 2702
           u8g.setColorIndex(dot_color); // Set color for the alive dot
2697 2703
           u8g.drawPixel(127, 63); // draw alive dot
2698 2704
           u8g.setColorIndex(1); // black on white
2699
-          (*currentScreen)();
2705
+          CURRENTSCREEN();
2700 2706
         } while (u8g.nextPage());
2701
-      #elif ENABLED(ULTIPANEL)
2702
-        (*currentScreen)();
2703 2707
       #else
2704
-        lcd_status_screen();
2708
+        CURRENTSCREEN();
2705 2709
       #endif
2706 2710
     }
2707 2711
 

Loading…
Cancel
Save