Index: firmware/App/Services/NVRecordsDD.c =================================================================== diff -u -r3dcf9d96cae82528433d1f864b8145ca8bca2b6a -r2e65cae607c3ee68326f82d6134b0de3777559f9 --- firmware/App/Services/NVRecordsDD.c (.../NVRecordsDD.c) (revision 3dcf9d96cae82528433d1f864b8145ca8bca2b6a) +++ firmware/App/Services/NVRecordsDD.c (.../NVRecordsDD.c) (revision 2e65cae607c3ee68326f82d6134b0de3777559f9) @@ -108,23 +108,23 @@ DD_BLOOD_LEAK_SENSOR_CAL_RECORD_T bloodLeakSensorCalRecord; ///< DD blood leak detector calibration record } DD_CALIBRATION_GROUPS_T; -/// DG calibration records structure +/// DD calibration records structure typedef struct { DD_CALIBRATION_GROUPS_T ddCalibrationGroups; ///< DD calibration groups. U08 padding[ RECORD_PADDING_LENGTH(DD_CALIBRATION_GROUPS_T, MAX_EEPROM_WRITE_BUFFER_BYTES) ]; ///< DD calibration record padding byte array. U16 crc; ///< CRC for the DG calibration record structure. } DD_CALIBRATION_RECORD_T; -/// DG system group structure +/// DD system group structure typedef struct { DD_SYSTEM_RECORD_T ddSystemRecord; ///< DD system record. U08 padding[ RECORD_PADDING_LENGTH(DD_SYSTEM_RECORD_T, MAX_EEPROM_WRITE_BUFFER_BYTES) ]; ///< DD system group padding byte array. U16 crc; ///< CRC for the DG system group structure. } DD_SYSTEM_GROUP_T; -/// DG service record structure +/// DD service record structure typedef struct { DD_SERVICE_RECORD_T ddServiceRecord; ///< DD service record. @@ -141,7 +141,7 @@ U16 crc; ///< CRC for the HD institutional structure. } DD_INSTITUTIONAL_GROUP_T; -/// DG usage record structure +/// DD usage record structure typedef struct { DD_USAGE_INFO_RECORD_T ddUsageInfo; ///< DD usage info record. @@ -226,7 +226,7 @@ // Initialize the parameters nvmSelfTestState = NVM_SELF_TEST_STATE_READ_RECORDS; nvmSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; - usageWriteTries = 0; + usageWriteTries = 0; } /*********************************************************************//** @@ -459,10 +459,10 @@ if ( calcCRC != recordCRC ) { // CRC did not pass so set all values to default - memset( ddSystemGroup.ddSystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( ddSystemGroup.ddSystemRecord.topLevelPN ) ); - memset( ddSystemGroup.ddSystemRecord.topLevelSN, RECORD_DEFAULT_CHARACTER, sizeof( ddSystemGroup.ddSystemRecord.topLevelSN ) ); +// memset( ddSystemGroup.ddSystemRecord.topLevelPN, RECORD_DEFAULT_CHARACTER, sizeof( ddSystemGroup.ddSystemRecord.topLevelPN ) ); +// memset( ddSystemGroup.ddSystemRecord.topLevelSN, RECORD_DEFAULT_CHARACTER, sizeof( ddSystemGroup.ddSystemRecord.topLevelSN ) ); ddSystemGroup.ddSystemRecord.isROFeatured = FALSE; - ddSystemGroup.ddSystemRecord.isR0FeaturedBoostPump = FALSE; + ddSystemGroup.ddSystemRecord.isROFeaturedBoostPump = FALSE; ddSystemGroup.ddSystemRecord.mfgDate = 0; ddSystemGroup.ddSystemRecord.mfgLocation = 0; @@ -476,10 +476,10 @@ else { // Verify the serial number from the system record - if ( RECORD_DEFAULT_CHARACTER == ddSystemGroup.ddSystemRecord.topLevelSN[ 0 ] ) - { - activateAlarmNoData( ALARM_ID_DD_NVM_INVALID_SERIAL_NUMBER ); - } +// if ( RECORD_DEFAULT_CHARACTER == ddSystemGroup.ddSystemRecord.topLevelSN[ 0 ] ) +// { +// activateAlarmNoData( ALARM_ID_DD_NVM_INVALID_SERIAL_NUMBER ); +// } } return status; @@ -948,8 +948,8 @@ // In DG the RO water generation since the last service in reset to 0 // ddServiceGroup.ddServiceRecord.lastServiceEpochDate = getRTCTimestamp(); - ddServiceGroup.ddServiceRecord.crc = crc16( (U08*)&ddServiceGroup.ddServiceRecord, sizeof( DD_SERVICE_RECORD_T ) - sizeof( U16 ) ); - ddServiceGroup.crc = crc16( (U08*)&ddServiceGroup, sizeof( DD_SERVICE_GROUP_T ) - sizeof( U16 ) ); + ddServiceGroup.ddServiceRecord.crc = crc16( (U08*)&ddServiceGroup.ddServiceRecord, sizeof( DD_SERVICE_RECORD_T ) - sizeof( U16 ) ); + ddServiceGroup.crc = crc16( (U08*)&ddServiceGroup, sizeof( DD_SERVICE_GROUP_T ) - sizeof( U16 ) ); // Update the DG usage info ddUsageInfoGroup.ddUsageInfo.roWaterGenSinceLastServiceL = 0; ddUsageInfoGroup.ddUsageInfo.crc = crc16( (U08*)&ddUsageInfoGroup.ddUsageInfo, sizeof( DD_USAGE_INFO_RECORD_T ) - sizeof( U16 ) ); @@ -1125,7 +1125,7 @@ } else { - activateAlarmNoData( nvAlarm ); +// activateAlarmNoData( nvAlarm ); } }