Pārlūkot izejas kodu

Merge pull request #1656 from AnHardt/menufix

Fix for menus failing to scroll
Scott Lahteine 9 gadus atpakaļ
vecāks
revīzija
b5970492e2
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      Marlin/ultralcd.cpp

+ 2
- 2
Marlin/ultralcd.cpp Parādīt failu

@@ -198,8 +198,8 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
198 198
   #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
199 199
 #endif //!ENCODER_RATE_MULTIPLIER
200 200
 #define END_MENU() \
201
-    if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; \
202
-    if ((uint8_t)(encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
201
+    if (encoderLine >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
202
+    if (encoderLine >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = encoderLine - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
203 203
     } } while(0)
204 204
 
205 205
 /** Used variables to keep track of the menu */

Notiek ielāde…
Atcelt
Saglabāt