Fix SD card reselect when scrolled (#13624)

- Change encoder position to 16-bit integer.
- Fix `SD_REPRINT_LAST_SELECTED_FILE` when the screen is scrolled.
This commit is contained in:
Scott Lahteine
2019-04-08 21:10:41 -05:00
committed by GitHub
parent 0e3c9e726d
commit 321a5e6580
11 changed files with 50 additions and 40 deletions

View File

@@ -471,7 +471,7 @@ void _lcd_ubl_output_map_lcd() {
ui.encoder_direction_normal();
if (ui.encoderPosition) {
step_scaler += (int32_t)ui.encoderPosition;
step_scaler += int16_t(ui.encoderPosition);
x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
ui.encoderPosition = 0;
ui.refresh(LCDVIEW_REDRAW_NOW);