Move the condition before the loop
Result see: https://youtu.be/AEnBzdu9_tk Dot is moving not so fast -> less executed loops.
This commit is contained in:
parent
4cb7dfc546
commit
6d4b3f0d6a
@ -1363,6 +1363,8 @@ void lcd_update() {
|
||||
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
||||
blink++; // Variable for fan animation and alive dot
|
||||
u8g.firstPage();
|
||||
(*currentMenu)();
|
||||
if (lcdDrawUpdate) {
|
||||
do {
|
||||
if (!dotcounter) dotcounter = 63;
|
||||
lcd_setFont(FONT_MENU);
|
||||
@ -1371,8 +1373,8 @@ void lcd_update() {
|
||||
u8g.drawPixel(127, dotcounter--); // draw alive dot
|
||||
// u8g.setColorIndex(1); // black on white
|
||||
(*currentMenu)();
|
||||
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
||||
} while( u8g.nextPage() );
|
||||
}
|
||||
#else
|
||||
(*currentMenu)();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user