Closed nopnop2002 closed 5 years ago
If you can speek Japanese, I can speek too.
I had a look and cannot see what change you made, also there is an error in your solution code.
pinFile should read pInFile?
What error message do you get with SdFat?
I do not speak Japanese other than the usual greeting!
Thank you for reply
If define LOAD_SDFAT_LIBRARY, int JPEGDecoder::decodeSdFile(const char *pFilename) define 2 times.
Please test in case of define LOAD_SDFAT_LIBRARY. This is your code.
// Call specific to SD filing system in case leading / is used int JPEGDecoder::decodeSdFile(const char *pFilename) { //---->>>>>
File pInFile = SD.open( pFilename, FILE_READ);
return decodeSdFile(pInFile);
}
int JPEGDecoder::decodeSdFile(const String& pFilename) { //---->>>>>
File pInFile = SD.open( pFilename, FILE_READ);
return decodeSdFile(pInFile);
return -1;
}
int JPEGDecoder::decodeSdFile(File jpgFile) { // This is for the SD library
g_pInFileSd = jpgFile;
jpg_source = JPEG_SD_FILE; // Flag to indicate a SD file
if (!g_pInFileSd) {
#ifdef DEBUG
Serial.println("ERROR: SD file not found!");
#endif
return -1;
}
g_nInFileOfs = 0;
g_nInFileSize = g_pInFileSd.size();
return decodeCommon();
}
I am not sure I understand the problem. It seems to work for me with Mega and Due. What processor are you using? What IDE version?
Can you tell me more and tell me which example fails and what the error message is.
Thanks.
I'm using STM32F103 processor. IDE version is 1.8.5 define LOAD_SDFAT_LIBRARY.
Thank you.
I'm using the ESP32 Wroon board. It is great. It takes about 300ms to draw a 240x320 Image on an ILI9341 2.8" display.
This problem seems to be related to the STM32F103. I have not seen any issues with other boards.
Hello Bodmer. Thank you for your useful library.
I found wrong code. Line 348-367
And i use this library. https://github.com/greiman/SdFat
next code don't work with this library..
File pInFile = SD.open( pFilename, FILE_READ);
Next code work with this library..
File pInFile; pinFile = SD.open( pFilename, FILE_READ);
`#if defined (LOAD_SD_LIBRARY) || defined (LOAD_SDFAT_LIBRARY)
// Call specific to SD filing system in case leading / is used int JPEGDecoder::decodeSdFile(const char *pFilename) {
}
int JPEGDecoder::decodeSdFile(const String& pFilename) {
if !defined (ARDUINO_ARCH_SAM)
else
endif
}`