Sync SD log with card at 4Hz interval
This commit is contained in:
parent
8d99a9c971
commit
65005c0019
|
@ -70,6 +70,7 @@ void writeSDLogEntry();
|
|||
void writetSDLogHeader();
|
||||
void beginSDLogging();
|
||||
void endSDLogging();
|
||||
void syncSDLog();
|
||||
void setTS_SD_status();
|
||||
void formatExFat();
|
||||
void deleteLogFile(char, char, char, char);
|
||||
|
|
|
@ -445,6 +445,14 @@ void checkForSDStop()
|
|||
|
||||
}
|
||||
|
||||
void syncSDLog()
|
||||
{
|
||||
if( (SD_status == SD_STATUS_ACTIVE) && (!logFile.isBusy()) )
|
||||
{
|
||||
logFile.sync();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Will perform a complete format of the SD card to ExFAT.
|
||||
* This will delete all files and create a new empty file system.
|
||||
|
|
|
@ -308,6 +308,7 @@ void loop(void)
|
|||
|
||||
#ifdef SD_LOGGING
|
||||
if(configPage13.onboard_log_file_rate == LOGGER_RATE_4HZ) { writeSDLogEntry(); }
|
||||
syncSDLog(); //Sync the SD log file to the card 4 times per second.
|
||||
#endif
|
||||
|
||||
currentStatus.fuelPressure = getFuelPressure();
|
||||
|
|
Loading…
Reference in New Issue