Move the 'alive dot' in every displayloop
Result see: https://www.youtube.com/watch?v=tdu7J0i-c4g Loop is executed several times per display update.
This commit is contained in:
parent
3d01492228
commit
4cb7dfc546
@ -318,9 +318,9 @@ static void lcd_implementation_status_screen() {
|
|||||||
lcd_setFont(FONT_STATUSMENU);
|
lcd_setFont(FONT_STATUSMENU);
|
||||||
|
|
||||||
#ifdef USE_SMALL_INFOFONT
|
#ifdef USE_SMALL_INFOFONT
|
||||||
u8g.drawBox(0,30,128,10);
|
u8g.drawBox(0,30,127,10);
|
||||||
#else
|
#else
|
||||||
u8g.drawBox(0,30,128,9);
|
u8g.drawBox(0,30,127,9);
|
||||||
#endif
|
#endif
|
||||||
u8g.setColorIndex(0); // white on black
|
u8g.setColorIndex(0); // white on black
|
||||||
u8g.setPrintPos(2,XYZ_BASELINE);
|
u8g.setPrintPos(2,XYZ_BASELINE);
|
||||||
|
@ -1299,6 +1299,8 @@ void lcd_update() {
|
|||||||
}
|
}
|
||||||
#endif//CARDINSERTED
|
#endif//CARDINSERTED
|
||||||
|
|
||||||
|
static uint8_t dotcounter = 63;
|
||||||
|
|
||||||
uint32_t ms = millis();
|
uint32_t ms = millis();
|
||||||
if (ms > lcd_next_update_millis) {
|
if (ms > lcd_next_update_millis) {
|
||||||
|
|
||||||
@ -1362,11 +1364,12 @@ void lcd_update() {
|
|||||||
blink++; // Variable for fan animation and alive dot
|
blink++; // Variable for fan animation and alive dot
|
||||||
u8g.firstPage();
|
u8g.firstPage();
|
||||||
do {
|
do {
|
||||||
|
if (!dotcounter) dotcounter = 63;
|
||||||
lcd_setFont(FONT_MENU);
|
lcd_setFont(FONT_MENU);
|
||||||
u8g.setPrintPos(125, 0);
|
u8g.setPrintPos(125, 0);
|
||||||
if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
|
// if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
|
||||||
u8g.drawPixel(127, 63); // draw alive dot
|
u8g.drawPixel(127, dotcounter--); // draw alive dot
|
||||||
u8g.setColorIndex(1); // black on white
|
// u8g.setColorIndex(1); // black on white
|
||||||
(*currentMenu)();
|
(*currentMenu)();
|
||||||
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
||||||
} while( u8g.nextPage() );
|
} while( u8g.nextPage() );
|
||||||
|
Loading…
Reference in New Issue
Block a user