|
|
@ -95,9 +95,11 @@ void CardReader::lsDive(const char *prepend,SdFile parent)
|
|
|
|
if ( p.name[1] != '.')
|
|
|
|
if ( p.name[1] != '.')
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
|
|
|
|
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
|
|
|
|
filenameIsDir=DIR_IS_SUBDIR(&p);
|
|
|
|
filenameIsDir=DIR_IS_SUBDIR(&p);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!filenameIsDir)
|
|
|
|
if(!filenameIsDir)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(p.name[8]!='G') continue;
|
|
|
|
if(p.name[8]!='G') continue;
|
|
|
@ -163,20 +165,26 @@ void CardReader::initsd()
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
workDir=root;
|
|
|
|
curDir=&root;
|
|
|
|
curDir=&root;
|
|
|
|
|
|
|
|
/*
|
|
|
|
if(!workDir.openRoot(&volume))
|
|
|
|
if(!workDir.openRoot(&volume))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CardReader::setroot()
|
|
|
|
void CardReader::setroot()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
curDir=&root;
|
|
|
|
/*if(!workDir.openRoot(&volume))
|
|
|
|
if(!workDir.openRoot(&volume))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
|
|
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
workDir=root;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curDir=&workDir;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void CardReader::release()
|
|
|
|
void CardReader::release()
|
|
|
|
{
|
|
|
|
{
|
|
|
|