chiark / gitweb /
bug fix for scrolling of main menu when using SMALL_DISPLAY (2 lines only)
authorMaikStohn <git@stohn.de>
Fri, 11 May 2012 13:23:10 +0000 (15:23 +0200)
committerMaikStohn <git@stohn.de>
Fri, 11 May 2012 13:23:10 +0000 (15:23 +0200)
Marlin/ultralcd.pde

index 060b7208dc8da3e4aead4ce0f9182fbd93a33f90..69364acb063d7286a02746467235b33a80ad9023 100644 (file)
@@ -2108,9 +2108,10 @@ void MainMenu::showMainMenu()
     }
   } 
   clearIfNecessary();
-  for(int8_t line=0;line<LCD_HEIGHT;line++)
+  uint8_t line=0;
+  for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
   {
-    switch(line)
+    switch(i)
     { 
       case ItemM_watch:
         MENUITEM(  lcdprintPGM(MSG_WATCH)  ,  BLOCK;status=Main_Status;beepshort(); ) ;
@@ -2164,6 +2165,7 @@ void MainMenu::showMainMenu()
         SERIAL_ERRORLNPGM(MSG_SERIAL_ERROR_MENU_STRUCTURE);
       break;
     }
+    line++;
   }
   updateActiveLines(3,encoderpos);
 }