blink for char-lcds

Implement and test blinking for char-lcds

# Conflicts:
#	Marlin/ultralcd_implementation_hitachi_HD44780.h
solved
This commit is contained in:
AnHardt
2015-10-08 20:55:46 +02:00
parent d118e3f985
commit e736779d7e
3 changed files with 15 additions and 17 deletions

View File

@ -1732,21 +1732,23 @@ void lcd_update() {
}
#if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display
if (lcdDrawUpdate) {
blink++; // Variable for fan animation and alive dot
blink++; // Variable for animation and alive dot
u8g.firstPage();
do {
lcd_setFont(FONT_MENU);
u8g.setPrintPos(125, 0);
if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
if (blink & 1) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
u8g.drawPixel(127, 63); // draw alive dot
u8g.setColorIndex(1); // black on white
(*currentMenu)();
} while (u8g.nextPage());
}
#else
if (lcdDrawUpdate)
if (lcdDrawUpdate) {
blink++; // Variable for animation
(*currentMenu)();
#endif
}
#endif
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
lcd_implementation_update_indicators();