Sfoglia il codice sorgente

Simplify limiting encoderLine in END_MENU

Scott Lahteine 9 anni fa
parent
commit
8f24475e02
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/ultralcd.cpp Vedi File

@@ -229,7 +229,7 @@ static void lcd_status_screen();
229 229
     #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
230 230
   #endif //!ENCODER_RATE_MULTIPLIER
231 231
   #define END_MENU() \
232
-      if (encoderLine >= _menuItemNr) { encoderPosition = _menuItemNr * (ENCODER_STEPS_PER_MENU_ITEM) - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; }\
232
+      if (encoderLine >= _menuItemNr) { encoderPosition = _menuItemNr * (ENCODER_STEPS_PER_MENU_ITEM) - 1; encoderLine = _menuItemNr - 1; }\
233 233
       if (encoderLine >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = encoderLine - (LCD_HEIGHT) + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
234 234
       } } while(0)
235 235
 

Loading…
Annulla
Salva