made prepare->autostart independent of current folder.
This commit is contained in:
parent
1532200435
commit
0183e6332a
@ -95,9 +95,11 @@ void CardReader::lsDive(const char *prepend,SdFile parent)
|
||||
if ( p.name[1] != '.')
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
|
||||
filenameIsDir=DIR_IS_SUBDIR(&p);
|
||||
|
||||
|
||||
if(!filenameIsDir)
|
||||
{
|
||||
if(p.name[8]!='G') continue;
|
||||
@ -163,20 +165,26 @@ void CardReader::initsd()
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
|
||||
}
|
||||
workDir=root;
|
||||
curDir=&root;
|
||||
/*
|
||||
if(!workDir.openRoot(&volume))
|
||||
{
|
||||
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void CardReader::setroot()
|
||||
{
|
||||
curDir=&root;
|
||||
if(!workDir.openRoot(&volume))
|
||||
/*if(!workDir.openRoot(&volume))
|
||||
{
|
||||
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
||||
}
|
||||
}*/
|
||||
workDir=root;
|
||||
|
||||
curDir=&workDir;
|
||||
}
|
||||
void CardReader::release()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user