File manager
Diff: FileManager.cpp
- Revision:
- 27:b0eb0f36110e
- Parent:
- 26:2f10fcabed0e
- Child:
- 28:12c88b5e46e5
--- a/FileManager.cpp Thu May 26 14:05:36 2016 +0000 +++ b/FileManager.cpp Thu May 26 15:23:26 2016 +0000 @@ -414,10 +414,12 @@ /** * @brief Function to log Mini RMS System Data * @note this file is only for debug - * @param gps_interval - + * @param gps_interval - gps interval + * @param rms_interval - rms interval + * @param isResetCausedByWdg - flag to indicate system restart by watchdog * @retval None */ -void FILEMANAGER_LogSystemData(float gps_interval,float rms_interval) +void FILEMANAGER_LogSystemData(float gps_interval,float rms_interval, bool isResetCausedByWdg) { /* Open the file in append mode */ FILE *fp = fopen(MINIRMS_LOG_FILE_NAME, "a"); @@ -438,6 +440,11 @@ /* Write some message, which is TBD */ fprintf(fp, "\nStart Mini-RMS System with At UTC Time %s , Gps Interval = %f second, RMS Interval = %f second, Variable = %d variable(s) ",ctime(&seconds),gps_interval,rms_interval,m_amountVarList); + if (isResetCausedByWdg) + { + fprintf(fp, " **** Restart by Watchdog"); + } + fclose(fp); // ensure you close the file after writing #if defined(__MICROLIB) && defined(__ARMCC_VERSION) // with microlib and ARM compiler