Index: NVDataMgmt.c =================================================================== diff -u -r63224e051e2c46221bd5fa8505da344d4294b307 -r5010eb0fe6fb79f67dfa73ae40331d61cd80f17b --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 63224e051e2c46221bd5fa8505da344d4294b307) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 5010eb0fe6fb79f67dfa73ae40331d61cd80f17b) @@ -233,10 +233,10 @@ /// Log header structure. typedef struct { - U16 recordCount; ///< Record count - U16 nextWriteIndex; ///< Next write index - U16 nextReadIndex; ///< Next read index - BOOL isHdrCorrupted; ///< Log header corruption flag + U16 recordCount; ///< Record count. + U16 nextWriteIndex; ///< Next write index. + U16 nextReadIndex; ///< Next read index. + BOOL isHdrCorrupted; ///< Log header corruption flag. } LOG_HEADER_T; /// Log record structure. @@ -725,7 +725,7 @@ { // Check if the data receiving process has timed out. The exec receive record // state machine is asynchronous so it is checked in this state machine - if ( didTimeout( recordReceiveStartTime, RECORD_DATA_RECEIVE_TIMEOUT_MS ) ) + if ( TRUE == didTimeout( recordReceiveStartTime, RECORD_DATA_RECEIVE_TIMEOUT_MS ) ) { // Exec receive state machine timed out. Schedule a read to update the structure enqueueRecordJob( NVDATAMGMT_READ, NVDATAMGMT_EEPROM, NVDATAMGMT_CALIBRATION_RECORD ); @@ -788,7 +788,7 @@ } // Check if there is still a message left to be received - if ( nvDataMgmtExecReceiveRecordState == NVDATAMGMT_RECEIVE_RECORD_RECEIVE && currentMessage <= totalMessages ) + if ( ( nvDataMgmtExecReceiveRecordState == NVDATAMGMT_RECEIVE_RECORD_RECEIVE ) && ( currentMessage <= totalMessages ) ) { // Check if the current message is different from the previous message by 1 if ( RECORD_DATA_MAX_MESSAGE_DFFIRENCE == ( currentMessage - previousCalMessageNum ) ) @@ -1881,7 +1881,7 @@ // If the RAM is in Idle, read the log records if ( getRTCRAMStatus() == RTC_RAM_STATUS_IDLE || timeoutStatus == TRUE ) { - // TODO enable the logs + // TODO enable the logs once we get back to logging //U32 len = sizeof(MFG_RECORD_T) / sizeof(U32); //U32 *addr = (U32*)&mfgRecord; @@ -3878,8 +3878,7 @@ /*********************************************************************//** * @brief - * The dequeue increments the front index counter and if it is equal to - * rear index, it sets it to -1, meaning that the queue is empty. + * The enqueueRecordJob function enqueues a new record job. * @details Inputs: queueFrontIndex, queueCount, recordJobQueue * @details Outputs: queueFrontIndex, queueCount, recordJobQueue * @param ops: memory operation (i.e write, read)