You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this latest upgrade the code all compiled fine. After installing version 2, I (and other users of the MIDIFile library) get compile errors for the subject method. The relevant section of the compiler output is below:
MD_MIDIFile.h: In member function void MD_MIDIFile::setFileFolder(const char*) MD_MIDIFile.h: 899:87: error: no matching function for call to 'SdFat32::chdir(const char*&, bool) MD_MIDIFile.h: 899:87: error: no matching function for call to 'SdFat32::chdir(const char*&, bool) void setFileFolder(const char* apath) { if (apath != nullptr) _sd->chdir(apath, true); } void setFileFolder(const char* apath) { if (apath != nullptr) _sd->chdir(apath, true); }
Looking at the library html docs it would seem the method is still there, but the second parameter has been removed. If this is correct, what do I need to do to update my library to eliminate this problem and retain the same functionality?
The text was updated successfully, but these errors were encountered:
This function" void setFileFolder(const char* apath) { if (apath != nullptr) _sd->chdir(apath, true); }
can be replaced by: void setFileFolder(const char* apath) {if (apath != nullptr && _sd->chdir(apath)) _sd->chvol();}
I eliminated a number of functions where a bool argument just meant calling another function. Unless you have multiple SD cards there is no reason to ever call chvol. The second argument led to confusion.
Environment: Arduino Uno, Arduino IDE, Windows 10.
I use the SDFat library to to manage file I/O in my own library (https://github.com/MajicDesigns/MD_MIDIFile) .
Prior to this latest upgrade the code all compiled fine. After installing version 2, I (and other users of the MIDIFile library) get compile errors for the subject method. The relevant section of the compiler output is below:
MD_MIDIFile.h: In member function void MD_MIDIFile::setFileFolder(const char*) MD_MIDIFile.h: 899:87: error: no matching function for call to 'SdFat32::chdir(const char*&, bool) MD_MIDIFile.h: 899:87: error: no matching function for call to 'SdFat32::chdir(const char*&, bool) void setFileFolder(const char* apath) { if (apath != nullptr) _sd->chdir(apath, true); } void setFileFolder(const char* apath) { if (apath != nullptr) _sd->chdir(apath, true); }
Looking at the library html docs it would seem the method is still there, but the second parameter has been removed. If this is correct, what do I need to do to update my library to eliminate this problem and retain the same functionality?
The text was updated successfully, but these errors were encountered: