Pārlūkot izejas kodu

Give the "alive dot" its own blink

Scott Lahteine 9 gadus atpakaļ
vecāks
revīzija
7fa2bda1b9
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3
    2
      Marlin/ultralcd.cpp

+ 3
- 2
Marlin/ultralcd.cpp Parādīt failu

2256
       }
2256
       }
2257
 
2257
 
2258
       #if ENABLED(DOGLCD)  // Changes due to different driver architecture of the DOGM display
2258
       #if ENABLED(DOGLCD)  // Changes due to different driver architecture of the DOGM display
2259
-        bool blink = lcd_blink();
2259
+        static int8_t dot_color = 0;
2260
+        dot_color = 1 - dot_color;
2260
         u8g.firstPage();
2261
         u8g.firstPage();
2261
         do {
2262
         do {
2262
           lcd_setFont(FONT_MENU);
2263
           lcd_setFont(FONT_MENU);
2263
           u8g.setPrintPos(125, 0);
2264
           u8g.setPrintPos(125, 0);
2264
-          u8g.setColorIndex(blink ? 1 : 0); // Set color for the alive dot
2265
+          u8g.setColorIndex(dot_color); // Set color for the alive dot
2265
           u8g.drawPixel(127, 63); // draw alive dot
2266
           u8g.drawPixel(127, 63); // draw alive dot
2266
           u8g.setColorIndex(1); // black on white
2267
           u8g.setColorIndex(1); // black on white
2267
           (*currentMenu)();
2268
           (*currentMenu)();

Notiek ielāde…
Atcelt
Saglabāt