Browse Source

made prepare->autostart independent of current folder.

Bernhard 13 years ago
parent
commit
0183e6332a
1 changed files with 11 additions and 3 deletions
  1. 11
    3
      Marlin/cardreader.cpp

+ 11
- 3
Marlin/cardreader.cpp View File

95
         if ( p.name[1] != '.')
95
         if ( p.name[1] != '.')
96
         continue;
96
         continue;
97
       }
97
       }
98
+      
98
       if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
99
       if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
99
       filenameIsDir=DIR_IS_SUBDIR(&p);
100
       filenameIsDir=DIR_IS_SUBDIR(&p);
100
       
101
       
102
+      
101
       if(!filenameIsDir)
103
       if(!filenameIsDir)
102
       {
104
       {
103
         if(p.name[8]!='G') continue;
105
         if(p.name[8]!='G') continue;
163
     SERIAL_ECHO_START;
165
     SERIAL_ECHO_START;
164
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
166
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
165
   }
167
   }
168
+  workDir=root;
166
   curDir=&root;
169
   curDir=&root;
170
+  /*
167
   if(!workDir.openRoot(&volume))
171
   if(!workDir.openRoot(&volume))
168
   {
172
   {
169
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
173
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
170
   }
174
   }
175
+  */
176
+  
171
 }
177
 }
172
 
178
 
173
 void CardReader::setroot()
179
 void CardReader::setroot()
174
 {
180
 {
175
- curDir=&root;
176
-  if(!workDir.openRoot(&volume))
181
+  /*if(!workDir.openRoot(&volume))
177
   {
182
   {
178
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
183
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
179
-  } 
184
+  }*/
185
+  workDir=root;
186
+  
187
+  curDir=&workDir;
180
 }
188
 }
181
 void CardReader::release()
189
 void CardReader::release()
182
 {
190
 {

Loading…
Cancel
Save