SD Scroll workaround

This commit is contained in:
leptun 2019-08-31 17:00:39 +03:00
parent a789a8995f
commit 10cdcb3ae3

View File

@ -305,7 +305,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);
@ -331,7 +331,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;