Переглянути джерело

Add code to lcd_update() for GLCD

This code selects between the routines for the GLCD or the char.
display.
Dirk Eichel 12 роки тому
джерело
коміт
5f1cd70122
1 змінених файлів з 16 додано та 1 видалено
  1. 16
    1
      Marlin/ultralcd.cpp

+ 16
- 1
Marlin/ultralcd.cpp Переглянути файл

@@ -747,8 +747,23 @@ void lcd_update()
747 747
         if (LCD_CLICKED)
748 748
             timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
749 749
 #endif//ULTIPANEL
750
-        
750
+
751
+#ifdef DOGLCD        // Changes due to different driver architecture of the DOGM display
752
+		blink++;	   // Variable for fan animation and alive dot
753
+		u8g.firstPage();
754
+		do {
755
+				u8g.setFont(u8g_font_6x10_marlin);
756
+				u8g.setPrintPos(125,0);
757
+				if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
758
+				u8g.drawPixel(127,63);	// draw alive dot
759
+				u8g.setColorIndex(1);	// black on white
760
+				(*currentMenu)();
761
+				if (!lcdDrawUpdate)  break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
762
+		   } while( u8g.nextPage() );
763
+#else        
751 764
         (*currentMenu)();
765
+#endif
766
+
752 767
 #ifdef ULTIPANEL
753 768
         if(timeoutToStatus < millis() && currentMenu != lcd_status_screen)
754 769
         {

Завантаження…
Відмінити
Зберегти