Browse Source

Move the condition before the loop

Result see: https://youtu.be/AEnBzdu9_tk
Dot is moving not so fast -> less executed loops.
pull/1/head
AnHardt 10 years ago
parent
commit
6d4b3f0d6a
  1. 4
      Marlin/ultralcd.cpp

4
Marlin/ultralcd.cpp

@ -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…
Cancel
Save