Browse 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 10 years ago
parent
commit
b4e287fe8e
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/cardreader.cpp

+ 3
- 3
Marlin/cardreader.cpp View File

54
   dir_t p;
54
   dir_t p;
55
   uint8_t cnt=0;
55
   uint8_t cnt=0;
56
  
56
  
57
-  while (parent.readDir(p, longFilename) > 0)
57
+  while (parent.readDir(p, diveFilename) > 0)
58
   {
58
   {
59
     if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint
59
     if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint
60
     {
60
     {
91
     {
91
     {
92
       if (p.name[0] == DIR_NAME_FREE) break;
92
       if (p.name[0] == DIR_NAME_FREE) break;
93
       if (p.name[0] == DIR_NAME_DELETED || p.name[0] == '.'|| p.name[0] == '_') continue;
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
       if ( p.name[0] == '.')
96
       if ( p.name[0] == '.')
97
       {
97
       {
98
         if ( p.name[1] != '.')
98
         if ( p.name[1] != '.')

Loading…
Cancel
Save