-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Subject of the issue
If you go into the main menu's SD card sub-menu, the OLA will always create new a log file.
Steps to reproduce
This behavior may be on purpose, but I'm not sure why. It would be easy to fix. I can push the change.
Expected behavior
If it's not time to generate a new data file based on the setting of openNewLogFilesAfter, going into a menu shouldn't do it.
Actual behavior
We would like to have daily logs, but we want to use the SD card menu to regularly download the data collected so fat to upload to a website. This leads to the daily data being broken up into multiple smaller files.
the Fix
I think you could just comment out thestrcpy()calls as below and the OLA would keep using the previous log file until it's time to open a new one.
if (online.dataLogging == true)
{
//strcpy(sensorDataFileName, findNextAvailableLog(settings.nextDataLogNumber, "dataLog"));
beginDataLogging(); //180ms
if (settings.showHelperText == true) printHelperText(false); //printHelperText to terminal and sensor file
}
if (online.serialLogging == true)
{
//strcpy(serialDataFileName, findNextAvailableLog(settings.nextSerialLogNumber, "serialLog"));
beginSerialLogging();
}
Both beginDataLogging() and beginSerialLogging() look like they handle opening existing non-empty files.