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()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public:
|
|||
void release();
|
||||
void startFileprint();
|
||||
void pauseSDPrint();
|
||||
void getFileSize();
|
||||
uint32_t getFileSize();
|
||||
void getStatus();
|
||||
void printingHasFinished();
|
||||
|
||||
|
|
@ -70,7 +70,6 @@ public:
|
|||
bool cardOK ;
|
||||
char filename[13];
|
||||
uint16_t creationTime, creationDate;
|
||||
uint32_t public_fileSize;
|
||||
char longFilename[LONG_FILENAME_LENGTH];
|
||||
bool filenameIsDir;
|
||||
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) {
|
||||
bool result = false;
|
||||
uint32_t filesize;
|
||||
card.openFile(filename, true);
|
||||
card.getFileSize();
|
||||
if (card.public_fileSize > END_FILE_SECTION) {
|
||||
card.setIndex((card.public_fileSize) - END_FILE_SECTION);
|
||||
filesize = card.getFileSize();
|
||||
if (fileSize > END_FILE_SECTION) {
|
||||
card.setIndex(filesize - END_FILE_SECTION);
|
||||
}
|
||||
|
||||
while (!card.eof() && !result) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue