Browse Source

Fix an issue with shifted LCD lines

pull/1/head
Scott Lahteine 8 years ago
parent
commit
ff6b23cb0f
  1. 2
      Marlin/ultralcd.cpp

2
Marlin/ultralcd.cpp

@ -223,7 +223,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
static int8_t _countedItems = 0; \ static int8_t _countedItems = 0; \
int8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \ int8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \
if (_countedItems > 0 && encoderLine >= _countedItems - LIMIT) { \ if (_countedItems > 0 && encoderLine >= _countedItems - LIMIT) { \
encoderLine = _countedItems - LIMIT; \ encoderLine = max(0, _countedItems - LIMIT); \
encoderPosition = encoderLine * (ENCODER_STEPS_PER_MENU_ITEM); \ encoderPosition = encoderLine * (ENCODER_STEPS_PER_MENU_ITEM); \
} }

Loading…
Cancel
Save