Merge pull request #2155 from leptun/MK3_SD_scroll_workaround

SD Scroll workaround
This commit is contained in:
DRracer 2019-11-08 16:48:38 +01:00 committed by GitHub
commit ce5efb107a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,7 +313,7 @@ const char STR_SEPARATOR[] PROGMEM = "------------";
static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, char* longFilename)
{
char c;
int enc_dif = lcd_encoder_diff;
int enc_dif = lcd_encoder_diff / ENCODER_PULSES_PER_STEP;
uint8_t n = LCD_WIDTH - 1;
for(uint_least8_t g = 0; g<4;g++){
lcd_set_cursor(0, g);
@ -339,7 +339,7 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, char* longF
n = LCD_WIDTH - 1;
for(int g = 0; g<300 ;g++){
manage_heater();
if(LCD_CLICKED || ( enc_dif != lcd_encoder_diff )){
if(LCD_CLICKED || ( enc_dif != (lcd_encoder_diff / ENCODER_PULSES_PER_STEP))){
longFilenameTMP = longFilename;
*(longFilenameTMP + LCD_WIDTH - 2) = '\0';
i = 1;