Index: NVDataMgmt.c =================================================================== diff -u -r3ae9d6b87813bae35ce836205cddfd91b789350a -radc3cb0c0764f1ff7d6b4b069a7edc01f3af0d47 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 3ae9d6b87813bae35ce836205cddfd91b789350a) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision adc3cb0c0764f1ff7d6b4b069a7edc01f3af0d47) @@ -1580,7 +1580,7 @@ haveCalGroupsPassed = isDGCalibrationRecordValid(); hasSystemRecordPassed = isDGSystemRecordValid(); hasServiceRecordPassed = isDGServiceRecordValid(); - hasUsageRecordPassed = isDGUsageRecordValid(); // TODO add an alarm once dialin is completed + hasUsageRecordPassed = isDGUsageRecordValid(); // TODO add an alarm once dialin is completed in DEN-13834 #ifndef _RELEASE_ hasSWConfigRecordPassed = isSWConfigRecordValid(); #endif @@ -1614,7 +1614,7 @@ if ( FALSE == hasUsageRecordPassed ) { - // TODO uncomment + // TODO un-comment in DEN-13834 //enqueueRecordJob( NVDATAMGMT_WRITE, RECORDS_SPECS[ NVDATAMGMT_USAGE_INFO_RECORD ].dataLoc, NVDATAMGMT_USAGE_INFO_RECORD ); } @@ -1655,7 +1655,7 @@ if ( powerOffIsImminent != TRUE ) { // Check if the service record has to be updated - //updateServiceRecord(); // TODO what is this doing here? + //updateServiceRecord(); // TODO what is this doing here? un-comment in DEN-13834 // If the record processing queue is not empty, process the queues if ( ( FALSE == isRecordQueueEmpty() ) && ( TRUE == areResourcesAvailableForNextJob() ) ) @@ -2056,20 +2056,6 @@ U08* bufferPtr = jobSpecs.structAddressPtr; U32 length = jobSpecs.sizeofJob; - /*if ( NVDATAMGMT_PROCESS_RECORDS == activeQueue ) - { - RECORD_JOBS_STATE_T job = recordCurrentJob.recordJob; - PROCESS_RECORD_SPECS_T jobSpecs = RECORDS_SPECS [ job ]; - - bufferPtr = jobSpecs.structAddressPtr; - length = jobSpecs.sizeofJob; - } - else - { - // TODO add the rest of the items for for logging - currentJob.externalAddress->status = NVDATAMGMT_READ_COMPLETE; - }*/ - getDataFromRAM( bufferPtr, length ); state = NVDATAMGMT_EXEC_STATE_IDLE; @@ -2712,7 +2698,7 @@ dgSystemGroup.dgSystemRecord.mfgDate = 0; dgSystemGroup.dgSystemRecord.mfgLocation = 0; memset( dgSystemGroup.dgSystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( dgSystemGroup.dgSystemRecord.topLevelPN ) ); - memset( dgSystemGroup.dgSystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( dgSystemGroup.dgSystemRecord.topLevelPN ) ); + memset( dgSystemGroup.dgSystemRecord.topLevelSN, RECORD_DEFAULT_CHARACTER, sizeof( dgSystemGroup.dgSystemRecord.topLevelSN ) ); // Recalculate the CRC with the default values dgSystemGroup.dgSystemRecord.crc = crc16 ( (U08*)&dgSystemGroup.dgSystemRecord, sizeof( DG_SYSTEM_RECORD_T ) - sizeof( U16 ) ); @@ -2972,6 +2958,7 @@ // so the main CRC of the calibration group is calculated again if ( ( FALSE == isCalRecordValid ) || ( recordCRC != dgCalibrationRecord.crc ) ) { + isCalRecordValid = FALSE; dgCalibrationRecord.crc = recordCRC; activateAlarmNoData( ALARM_ID_DG_NVDATAMGMT_CAL_GROUP_RECORD_CRC_INVALID ); @@ -3392,7 +3379,7 @@ hdSystemGroup.hdsystemRecord.mfgDate = 0; hdSystemGroup.hdsystemRecord.mfgLocation = 0; memset( hdSystemGroup.hdsystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( hdSystemGroup.hdsystemRecord.topLevelPN ) ); - memset( hdSystemGroup.hdsystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( hdSystemGroup.hdsystemRecord.topLevelPN ) ); + memset( hdSystemGroup.hdsystemRecord.topLevelSN, RECORD_DEFAULT_CHARACTER, sizeof( hdSystemGroup.hdsystemRecord.topLevelSN ) ); // Recalculate the CRC with the default values hdSystemGroup.hdsystemRecord.crc = crc16 ( (U08*)&hdSystemGroup.hdsystemRecord, sizeof( HD_SYSTEM_RECORD_T ) - sizeof( U16 ) );