Optimize SD card reader, sorting (#15395)

This commit is contained in:
Scott Lahteine
2019-09-28 15:28:05 -05:00
committed by GitHub
parent 1834d86df5
commit 2277c6dffc
5 changed files with 295 additions and 220 deletions

View File

@ -39,7 +39,7 @@
#endif
void lcd_sd_updir() {
ui.encoderPosition = card.updir() ? ENCODER_STEPS_PER_MENU_ITEM : 0;
ui.encoderPosition = card.cdup() ? ENCODER_STEPS_PER_MENU_ITEM : 0;
encoderTopLine = 0;
screen_changed = true;
ui.refresh();
@ -115,7 +115,7 @@ class MenuItem_sdfile {
class MenuItem_sdfolder {
public:
static void action(CardReader &theCard) {
card.chdir(theCard.filename);
card.cd(theCard.filename);
encoderTopLine = 0;
ui.encoderPosition = 2 * (ENCODER_STEPS_PER_MENU_ITEM);
screen_changed = true;