Browse Source

Improvements, more SORT_USES_MORE_RAM

With this option, always keeps the dir in RAM, doubling as a cache for
getfilename. A board with only 8K of SRAM is cutting it very close.
Scott Lahteine 10 years ago
parent
commit
c9486ebb85
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/cardreader.cpp

+ 3
- 3
Marlin/cardreader.cpp View File

@@ -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, diveFilename) > 0)
57
+  while (parent.readDir(p, longFilename) > 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 (diveFilename[0] != '\0' &&
95
-          (diveFilename[0] == '.' || diveFilename[0] == '_')) continue;
94
+      if (longFilename[0] != '\0' &&
95
+          (longFilename[0] == '.' || longFilename[0] == '_')) continue;
96 96
       if ( p.name[0] == '.')
97 97
       {
98 98
         if ( p.name[1] != '.')

Loading…
Cancel
Save