getter function for filesize
This commit is contained in:
parent
ff73fbc562
commit
026e3ecaac
|
|
@ -501,9 +501,9 @@ void CardReader::removeFile(char* name)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardReader::getFileSize()
|
uint32_t CardReader::getFileSize()
|
||||||
{
|
{
|
||||||
public_fileSize = filesize;
|
return filesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardReader::getStatus()
|
void CardReader::getStatus()
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public:
|
||||||
void release();
|
void release();
|
||||||
void startFileprint();
|
void startFileprint();
|
||||||
void pauseSDPrint();
|
void pauseSDPrint();
|
||||||
void getFileSize();
|
uint32_t getFileSize();
|
||||||
void getStatus();
|
void getStatus();
|
||||||
void printingHasFinished();
|
void printingHasFinished();
|
||||||
|
|
||||||
|
|
@ -70,7 +70,6 @@ public:
|
||||||
bool cardOK ;
|
bool cardOK ;
|
||||||
char filename[13];
|
char filename[13];
|
||||||
uint16_t creationTime, creationDate;
|
uint16_t creationTime, creationDate;
|
||||||
uint32_t public_fileSize;
|
|
||||||
char longFilename[LONG_FILENAME_LENGTH];
|
char longFilename[LONG_FILENAME_LENGTH];
|
||||||
bool filenameIsDir;
|
bool filenameIsDir;
|
||||||
int lastnr; //last number of the autostart;
|
int lastnr; //last number of the autostart;
|
||||||
|
|
|
||||||
|
|
@ -4967,10 +4967,11 @@ static void menu_action_function(menuFunc_t data) {
|
||||||
|
|
||||||
static bool check_file(const char* filename) {
|
static bool check_file(const char* filename) {
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
uint32_t filesize;
|
||||||
card.openFile(filename, true);
|
card.openFile(filename, true);
|
||||||
card.getFileSize();
|
filesize = card.getFileSize();
|
||||||
if (card.public_fileSize > END_FILE_SECTION) {
|
if (fileSize > END_FILE_SECTION) {
|
||||||
card.setIndex((card.public_fileSize) - END_FILE_SECTION);
|
card.setIndex(filesize - END_FILE_SECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!card.eof() && !result) {
|
while (!card.eof() && !result) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue