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
I was using a binary built from the freematics builder from around March of 2022. I was forced to change providers and needed to rebuild for a new apn. I had nothing but problems trying to get a new binary rebuilt, so I switched to the Telelogger ESP-IDF Project Package. 12232022 version.
I've successfully built a working binary, however it sits at SD:61025 MB total, 132 MB used for four plus minutes before moving onto: File: /DATA/947.CSV
Whereas the original binary processed it pretty much instantly. To confirm it is something with the new binary, I flashed the binary from March 2022 on the device and once again it started recording new data instantly.
If I flash the new binary, and eject the SD Card, or rename the DATA folder to DATA1, the logger starts reporting/recording almost instantly.
The text was updated successfully, but these errors were encountered:
If you find yourself with this problem and don't wish to delete the files.. Try changing
int FileLogger::getFileID(File& root)
{
if (root) {
File file;
int id = 0;
while(file = root.openNextFile()) {
char *p = strrchr(file.name(), '/');
unsigned int n = atoi(p ? p + 1 : file.name());
if (n > id) id = n;
}
return id + 1;
} else {
return 0;
}
}
in telestore.cpp into this:
int FileLogger::getFileID(File& root)
{
if (root) {
int id = 0;
String filename;
//Serial.println("Starting to get file IDs");
while (!(filename = root.getNextFileName()).isEmpty()) {
// Serial.print("Found file: ");
// Serial.println(filename);
// Convert String to C-string
const char* cfilename = filename.c_str();
// Extract file name from path
char *p = strrchr(const_cast<char*>(cfilename), '/');
// Convert filename to integer, handle if `p` is null
unsigned int n = atoi(p ? p + 1 : cfilename);
if (n > id) id = n;
}
// Serial.print("Max ID found: ");
// Serial.println(id); // Print the maximum ID found
return id + 1;
} else {
// Serial.println("Root is not valid");
return 0;
}
}
In my case, I now have 2500 files in my DATA directory, and it loads it in seconds unlike four to five minutes it used to take for 900 files.
I was using a binary built from the freematics builder from around March of 2022. I was forced to change providers and needed to rebuild for a new apn. I had nothing but problems trying to get a new binary rebuilt, so I switched to the Telelogger ESP-IDF Project Package. 12232022 version.
I've successfully built a working binary, however it sits at
SD:61025 MB total, 132 MB used
for four plus minutes before moving onto:File: /DATA/947.CSV
Whereas the original binary processed it pretty much instantly. To confirm it is something with the new binary, I flashed the binary from March 2022 on the device and once again it started recording new data instantly.
If I flash the new binary, and eject the SD Card, or rename the DATA folder to DATA1, the logger starts reporting/recording almost instantly.
The text was updated successfully, but these errors were encountered: