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
           break;
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
       #if ENABLED(DOGLCD)  // Changes due to different driver architecture of the DOGM display
2695
       #if ENABLED(DOGLCD)  // Changes due to different driver architecture of the DOGM display
2690
         static int8_t dot_color = 0;
2696
         static int8_t dot_color = 0;
2691
         dot_color = 1 - dot_color;
2697
         dot_color = 1 - dot_color;
2696
           u8g.setColorIndex(dot_color); // Set color for the alive dot
2702
           u8g.setColorIndex(dot_color); // Set color for the alive dot
2697
           u8g.drawPixel(127, 63); // draw alive dot
2703
           u8g.drawPixel(127, 63); // draw alive dot
2698
           u8g.setColorIndex(1); // black on white
2704
           u8g.setColorIndex(1); // black on white
2699
-          (*currentScreen)();
2705
+          CURRENTSCREEN();
2700
         } while (u8g.nextPage());
2706
         } while (u8g.nextPage());
2701
-      #elif ENABLED(ULTIPANEL)
2702
-        (*currentScreen)();
2703
       #else
2707
       #else
2704
-        lcd_status_screen();
2708
+        CURRENTSCREEN();
2705
       #endif
2709
       #endif
2706
     }
2710
     }
2707
 
2711
 

Loading…
Cancel
Save