Ver código fonte

Completed SORT_USES_MORE_RAM implementation

For the MORE_RAM option we need to buffer both the short and long
names, even though long names are sometimes redundant. Worst case, all
the names are max length. We can save some RAM by not storing these. We
could save more RAM by only storing the visible part of the long name.
Scott Lahteine 10 anos atrás
pai
commit
b4e287fe8e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      Marlin/cardreader.cpp

+ 3
- 3
Marlin/cardreader.cpp Ver arquivo

@@ -54,7 +54,7 @@ void  CardReader::lsDive(const char *prepend,SdFile parent)
54 54
   dir_t p;
55 55
   uint8_t cnt=0;
56 56
  
57
-  while (parent.readDir(p, longFilename) > 0)
57
+  while (parent.readDir(p, diveFilename) > 0)
58 58
   {
59 59
     if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint
60 60
     {
@@ -91,8 +91,8 @@ void  CardReader::lsDive(const char *prepend,SdFile parent)
91 91
     {
92 92
       if (p.name[0] == DIR_NAME_FREE) break;
93 93
       if (p.name[0] == DIR_NAME_DELETED || p.name[0] == '.'|| p.name[0] == '_') continue;
94
-      if (longFilename[0] != '\0' &&
95
-          (longFilename[0] == '.' || longFilename[0] == '_')) continue;
94
+      if (diveFilename[0] != '\0' &&
95
+          (diveFilename[0] == '.' || diveFilename[0] == '_')) continue;
96 96
       if ( p.name[0] == '.')
97 97
       {
98 98
         if ( p.name[1] != '.')

Carregando…
Cancelar
Salvar