Parcourir la source

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 il y a 10 ans
Parent
révision
b4e287fe8e
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3
    3
      Marlin/cardreader.cpp

+ 3
- 3
Marlin/cardreader.cpp Voir le fichier

@@ -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] != '.')

Chargement…
Annuler
Enregistrer