The log file name function (#157) is a bit too slow once we have around 75 files on the card. We should improve this. Maybe search by tens then by ones.
Here is the relevant code in sd_log.cpp:
bool open(char* fileName) {
// Create LDxxxx.CSV for the lowest value of x.
uint16_t i = 0;
do {
fileName[2] = (i/1000) % 10 + '0';
fileName[3] = (i/100) % 10 + '0';
fileName[4] = (i/10) % 10 + '0';
fileName[5] = i % 10 + '0';
i++;
}
while(sd.exists(fileName));
The log file name function (#157) is a bit too slow once we have around 75 files on the card. We should improve this. Maybe search by tens then by ones.
Here is the relevant code in sd_log.cpp: