Index: NVDataMgmt.c =================================================================== diff -u -re053a222c52e84f31503ed106cf64c2ca920029e -r09b8648f878639c4a8de458c7b9aa8b697c538ec --- NVDataMgmt.c (.../NVDataMgmt.c) (revision e053a222c52e84f31503ed106cf64c2ca920029e) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 09b8648f878639c4a8de458c7b9aa8b697c538ec) @@ -303,53 +303,47 @@ typedef struct { DG_CALIBRATION_GROUPS_T dgCalibrationGroups; ///< DG calibration groups. - U08 padding[ RECORD_PADDING_LENGTH(DG_CALIBRATION_GROUPS_T, MAX_EEPROM_WRITE_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_CALIBRATION_GROUPS_T) ]; ///< DG calibration record padding byte array. + U08 padding[ RECORD_PADDING_LENGTH(DG_CALIBRATION_GROUPS_T, MAX_EEPROM_WRITE_BUFFER_BYTES) ]; ///< DG calibration record padding byte array. U16 crc; ///< CRC for the DG calibration record structure. } DG_CALIBRATION_RECORD_T; /// DG system group structure typedef struct { DG_SYSTEM_RECORD_T dgSystemRecord; ///< DG system record. - U08 padding[ RECORD_PADDING_LENGTH(DG_SYSTEM_RECORD_T, MAX_EEPROM_WRITE_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_SYSTEM_RECORD_T) ]; ///< DG system group padding byte array. + U08 padding[ RECORD_PADDING_LENGTH(DG_SYSTEM_RECORD_T, MAX_EEPROM_WRITE_BUFFER_BYTES) ]; ///< DG system group padding byte array. U16 crc; ///< CRC for the DG system group structure. } DG_SYSTEM_GROUP_T; /// DG service record structure typedef struct { DG_SERVICE_RECORD_T dgServiceRecord; ///< DG service record. - U08 padding[ RECORD_PADDING_LENGTH(DG_SERVICE_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_SERVICE_RECORD_T) ]; ///< DG service group padding. + U08 padding[ RECORD_PADDING_LENGTH(DG_SERVICE_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) ]; ///< DG service group padding. U16 crc; ///< CRC for the DG service structure. } DG_SERVICE_GROUP_T; /// DG scheduler record structure typedef struct { DG_SCHEDULED_RUN_RECORD_T dgScheduledRun; ///< DG scheduled runs. - U08 padding[ RECORD_PADDING_LENGTH(DG_SCHEDULED_RUN_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_SCHEDULED_RUN_RECORD_T) ]; ///< DG scheduled run group padding. + U08 padding[ RECORD_PADDING_LENGTH(DG_SCHEDULED_RUN_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) ]; ///< DG scheduled run group padding. U16 crc; ///< CRC for the DG scheduled runs structure. } DG_SCHEDULED_RUNS_GROUP_T; /// DG usage record structure typedef struct { DG_USAGE_INFO_RECORD_T dgUsageInfo; ///< DG usage info record. - U08 padding[ RECORD_PADDING_LENGTH(DG_USAGE_INFO_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_USAGE_INFO_RECORD_T) ]; ///< DG scheduled run group padding. + U08 padding[ RECORD_PADDING_LENGTH(DG_USAGE_INFO_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) ]; ///< DG scheduled run group padding. U16 crc; ///< CRC for the DG usage info structure. } DG_USAGE_INFO_GROUP_T; /// DG heaters record typedef struct { DG_HEATERS_RECORD_T dgHeatersInfo; ///< DG heaters info record. - U08 padding[ RECORD_PADDING_LENGTH(DG_HEATERS_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_HEATERS_RECORD_T) ]; ///< DG heater info group padding. + U08 padding[ RECORD_PADDING_LENGTH(DG_HEATERS_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) ]; ///< DG heater info group padding. U16 crc; ///< CRC for the DG heaters info structure. } DG_HEATERS_INFO_GROUP_T; @@ -358,8 +352,7 @@ { DG_SW_CONFIG_RECORD_T dgSWConfigsRecord; ///< Software configurations record. // Since the software configurations are one byte, Num_of was used for the length of the lists - U08 padding[ RECORD_PADDING_LENGTH(DG_SW_CONFIG_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) - - RECORD_BYTE_SIZE(DG_SW_CONFIG_RECORD_T) ]; ///< Software configurations group padding. + U08 padding[ RECORD_PADDING_LENGTH(DG_SW_CONFIG_RECORD_T, MAX_RTC_RAM_OPS_BUFFER_BYTES) ]; ///< Software configurations group padding. U16 crc; ///< Software configurations CRC. } DG_SW_CONFIG_GROUP_T; #endif @@ -937,116 +930,8 @@ return status; } -#ifdef _DG_ /*********************************************************************//** * @brief - * The getScheduledRunsRecord function sets the system state machine - * to read and publish the scheduled runs record. - * @details Inputs: hasPublishRecordBeenRequested, recordToPublish - * hasPublishRecordBeenRequested - * @details Outputs: hasPublishRecordBeenRequested, recordToPublish - * @return TRUE if the request was successfully registered - *************************************************************************/ -BOOL getScheduledRunsRecord( void ) -{ - BOOL status = FALSE; - - // Check if the state machine is in idle state and then set the request - if ( nvDataMgmtExecProcessRecordState == NVDATAMGMT_PROCESS_RECORD_STATE_IDLE ) - { - hasPublishRecordBeenRequested = TRUE; - recordToPublish = NVDATAMGMT_SCHEDULED_RUNS_RECORD; - status = TRUE; - } - - return status; -} - -/*********************************************************************//** - * @brief - * The setScheduledRunsRecord function writes the scheduled runs record that - * is received from Dialin into the scheduled runs structure. - * @details Inputs: nvDataMgmtExecReceiveRecordState, recordUpdateAddress - * recordReceiveStartTime, previousCalMessageNum - * @details Outputs: nvDataMgmtExecReceiveRecordState, recordUpdateAddress - * recordReceiveStartTime, previousCalMessageNum - * @param currentMessage: current message number that is received from - * Dialin - * @param totalMessages: total number of messages from Dialin - * @param length: message length in bytes - * @param *addressPtr: address to the beginning of the calibration data - * from Dialin - * @return TRUE if the request was successfully registered - *************************************************************************/ -BOOL setScheduledRunsRecord( U32 currentMessage, U32 totalMessages, U32 length, U08 *addressPtr ) -{ - BOOL status = TRUE; - - // If the calibration message number is the first message number and receive exec state is idle, switch to idle - if ( RECORD_DATA_FIRST_RECEIVING_MSG_NUM == currentMessage && nvDataMgmtExecReceiveRecordState == NVDATAMGMT_RECEIVE_RECORD_IDLE ) - { - nvDataMgmtExecReceiveRecordState = NVDATAMGMT_RECEIVE_RECORD_RECEIVE; - recordReceiveStartTime = getMSTimerCount(); - previousCalMessageNum = 0; - recordUpdateAddress = 0; - } - - // Check if there is still a message left to be received - 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 ) ) - { - // Define a pointer that points to the DG calibration record - PROCESS_RECORD_SPECS_T recordSpec = RECORDS_SPECS [ NVDATAMGMT_SCHEDULED_RUNS_RECORD ]; - U08* ptr = recordSpec.structAddressPtr; - - // Offset the pointer to length that we should start writing from - ptr += recordUpdateAddress; - - memcpy(ptr, addressPtr, length); - - // Check if the current message is total messages - // and 0 everything out since we are done writing - if ( currentMessage == totalMessages ) - { - U16 calcCRC = crc16 ( recordSpec.structAddressPtr, recordSpec.sizeofJob - sizeof(U16) ); - // Get the CRC of the structure without the last 16 bits which is the CRC as well as the padding values - U16 recordCRC = *(U16*)recordSpec.structCRCPtr; - - if ( calcCRC != recordCRC ) - { - // CRC failed, request a read to read the data back from NV memory and update the structure - enqueueRecordJob( NVDATAMGMT_READ, NVDATAMGMT_RTC, NVDATAMGMT_SCHEDULED_RUNS_RECORD ); - nvDataMgmtExecReceiveRecordState = NVDATAMGMT_RECEIVE_RECORD_IDLE; - status = FALSE; - } - else - { - // CRC passed write the last service record to the RTC RAM - enqueueRecordJob( NVDATAMGMT_WRITE, NVDATAMGMT_RTC, NVDATAMGMT_SCHEDULED_RUNS_RECORD ); - - // Done with receiving data, go back to idle - nvDataMgmtExecReceiveRecordState = NVDATAMGMT_RECEIVE_RECORD_IDLE; - } - } - else - { - // Update the length as it has successfully been written - recordUpdateAddress += length; - - // Now the current message is the previous message - previousCalMessageNum = currentMessage; - } - } - } - - return status; -} -#endif - -/*********************************************************************//** - * @brief * The isNewCalibrationRecordAvailable function returns the status of a * new calibration availability. * @details Inputs: none @@ -1077,8 +962,6 @@ *************************************************************************/ BOOL getNVRecord2Driver( NV_DATA_T nvData, U08* bufferAddress, U32 bufferLength, U08 numOfSnsrs2Check, ALARM_ID_T nvAlarm ) { - // TODO NOTE: This function is the replacement to the processCalibrationData functions in the drivers - // Also, remove the get functions in this driver once this function is used instead of get functions in the NVDataMgmt.h U08 i; U08* nvDataStartPtr = 0; BOOL isNVDataValid = FALSE; @@ -1220,14 +1103,58 @@ case GET_CAL_HEATING_RECORD: nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.heatingCalRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.heatingCalRecord ); isNVDataValid = ( 0 == dgCalibrationRecord.dgCalibrationGroups.heatingCalRecord.calibrationTime ? FALSE : TRUE ); break; case GET_CAL_DRAIN_LINE_VOLUME_RECORD: nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.drainLineVolumeRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.drainLineVolumeRecord ); isNVDataValid = ( 0 == dgCalibrationRecord.dgCalibrationGroups.drainLineVolumeRecord.calibrationTime ? FALSE : TRUE ); break; + case GET_CAL_RO_PUMP_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.roPumpRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.roPumpRecord ); + isNVDataValid = ( 0 == dgCalibrationRecord.dgCalibrationGroups.roPumpRecord.calibrationTime ? FALSE : TRUE ); + break; + + case GET_CAL_CONCENTRATE_PUMPS_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.concentratePumpsRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.concentratePumpsRecord ); + for ( i = 0; i < numOfSnsrs2Check; i++ ) + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.concentratePumpsRecord.concentratePumps[ i ].calibrationTime ? FALSE : TRUE ); + break; + + case GET_CAL_DRAIN_PUMP_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.drainPumpRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.drainPumpRecord ); + isNVDataValid = ( 0 == dgCalibrationRecord.dgCalibrationGroups.drainPumpRecord.calibrationTime ? FALSE : TRUE ); + break; + + case GET_CAL_FANS_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.fansRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.fansRecord ); + for ( i = 0; i < numOfSnsrs2Check; i++ ) + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.fansRecord.fans[ i ].calibrationTime ? FALSE : TRUE ); + break; + + case GET_CAL_PRE_RO_PURGE_VOLUME_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.preROPurgeVolumeRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.preROPurgeVolumeRecord ); + isNVDataValid = ( 0 == dgCalibrationRecord.dgCalibrationGroups.preROPurgeVolumeRecord.calibrationTime ? FALSE : TRUE ); + break; + + case GET_CAL_FILTERS_RECORD: + nvDataStartPtr = (U08*)&dgCalibrationRecord.dgCalibrationGroups.filtersRecord; + nvDataLength = sizeof( dgCalibrationRecord.dgCalibrationGroups.filtersRecord ); + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.filtersRecord.carbonFilter.calibrationTime ? FALSE : TRUE ); + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.filtersRecord.carbonPolishFilter.calibrationTime ? FALSE : TRUE ); + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.filtersRecord.roFilter.calibrationTime ? FALSE : TRUE ); + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.filtersRecord.sedimentFilter.calibrationTime ? FALSE : TRUE ); + isNVDataValid |= ( 0 == dgCalibrationRecord.dgCalibrationGroups.filtersRecord.ultraFilter.calibrationTime ? FALSE : TRUE ); + break; + case GET_INF_HEATERS_RECORD: nvDataStartPtr = (U08*)&dgHeatersInfoGroup.dgHeatersInfo; nvDataLength = sizeof( dgHeatersInfoGroup.dgHeatersInfo ); @@ -1243,6 +1170,11 @@ nvDataLength = sizeof( dgServiceGroup.dgServiceRecord ); break; + case GET_SRR_RECORD: + nvDataStartPtr = (U08*)&dgScheduledRunsGroup; + nvDataLength = sizeof( dgScheduledRunsGroup.dgScheduledRun ); + break; + default: // TODO software fault break; @@ -1314,44 +1246,6 @@ #ifdef _DG_ /*********************************************************************//** * @brief - * The getDGROPumpRecord function returns the DG RO pump calibration record. - * @details Inputs: none - * @details Outputs: none - * @return DG RO pump calibration record - *************************************************************************/ -DG_RO_PUMP_CAL_RECORD_T getDGROPumpRecord( void ) -{ - return dgCalibrationRecord.dgCalibrationGroups.roPumpRecord; -} - -/*********************************************************************//** - * @brief - * The getDGConcetnratePumpsRecord function returns the DG concentrate - * pumps calibration record. - * @details Inputs: none - * @details Outputs: none - * @return DG concentrate pumps calibration record - *************************************************************************/ -DG_CONC_PUMPS_CAL_RECORD_T getDGConcetnratePumpsRecord( void ) -{ - return dgCalibrationRecord.dgCalibrationGroups.concentratePumpsRecord; -} - -/*********************************************************************//** - * @brief - * The getDGDrainPumpRecord function returns the DG drain pump calibration - * record. - * @details Inputs: none - * @details Outputs: none - * @return DG drain pump calibration record - *************************************************************************/ -DG_DRAIN_PUMP_CAL_RECORD_T getDGDrainPumpRecord( void ) -{ - return dgCalibrationRecord.dgCalibrationGroups.drainPumpRecord; -} - -/*********************************************************************//** - * @brief * The getDGFiltersRecord function returns the DG filters record. * @details Inputs: none * @details Outputs: none @@ -1361,30 +1255,6 @@ { return dgCalibrationRecord.dgCalibrationGroups.filtersRecord; } - -/*********************************************************************//** - * @brief - * The getDGFansRecord function returns the DG fans record. - * @details Inputs: none - * @details Outputs: none - * @return DG fans record - *************************************************************************/ -DG_FANS_CAL_RECORD_T getDGFansRecord( void ) -{ - return dgCalibrationRecord.dgCalibrationGroups.fansRecord; -} - -/*********************************************************************//** - * @brief - * The getDGScheduledRunsRecord function returns the DG scheduled runs record. - * @details Inputs: none - * @details Outputs: none - * @return DG scheduled runs record - *************************************************************************/ -DG_SCHEDULED_RUN_RECORD_T getDGScheduledRunsRecord( void ) -{ - return dgScheduledRunsGroup.dgScheduledRun; -} #endif /*********************************************************************//** @@ -3030,13 +2900,11 @@ // Recalculate the CRC with the default values dgServiceGroup.dgServiceRecord.crc = crc16 ( (U08*)&dgServiceGroup.dgServiceRecord, sizeof(DG_SERVICE_RECORD_T) - sizeof(U16) ); -#ifndef DISABLE_SERVICE_RECORD // Service record failure is also considered as RTC RAM failure activateAlarmNoData( ALARM_ID_DG_INVALID_SERVICE_RECORD_CRC ); // Set the to FALSE since the record is not valid status = FALSE; -#endif } return status; @@ -3206,12 +3074,12 @@ isCalRecordValid = isCalRecordValid == FALSE ? FALSE : isHardwareRecordValid; DG_FANS_CAL_RECORD_T* fan = &dgCalibrationRecord.dgCalibrationGroups.fansRecord; - isHardwareRecordValid = isDGFanRecordValid( &fan->fan1 ); + for ( i = 0; i < NUM_OF_CAL_DATA_BICARB_CONCENTRATES; i++ ) + { + isHardwareRecordValid = isDGFanRecordValid( &fan->fans[ i ] ); + isCalRecordValid = isCalRecordValid == FALSE ? FALSE : isHardwareRecordValid; + } - isCalRecordValid = isCalRecordValid == FALSE ? FALSE : isHardwareRecordValid; - isHardwareRecordValid = isDGFanRecordValid( &fan->fan2 ); - isCalRecordValid = isCalRecordValid == FALSE ? FALSE : isHardwareRecordValid; - DG_ACCEL_SENSOR_CAL_RECORD_T* accelerometer = &dgCalibrationRecord.dgCalibrationGroups.accelerometerSensorCalRecord; isHardwareRecordValid = isDGAccelerometerSensorRecordValid( accelerometer ); isCalRecordValid = isCalRecordValid == FALSE ? FALSE : isHardwareRecordValid; @@ -3711,13 +3579,11 @@ // Recalculate the CRC with the default values hdServiceGroup.hdServiceRecord.crc = crc16 ( (U08*)&hdServiceGroup.hdServiceRecord, sizeof( HD_SERVICE_RECORD_T ) - sizeof( U16 ) ); -#ifndef DISABLE_SERVICE_RECORD // Service record failure is also considered as RTC RAM failure activateAlarmNoData( ALARM_ID_HD_INVALID_SERVICE_RECORD_CRC ); // Set the to FALSE since the record is not valid status = FALSE; -#endif } return status; Index: NVDataMgmt.h =================================================================== diff -u -re053a222c52e84f31503ed106cf64c2ca920029e -r09b8648f878639c4a8de458c7b9aa8b697c538ec --- NVDataMgmt.h (.../NVDataMgmt.h) (revision e053a222c52e84f31503ed106cf64c2ca920029e) +++ NVDataMgmt.h (.../NVDataMgmt.h) (revision 09b8648f878639c4a8de458c7b9aa8b697c538ec) @@ -116,32 +116,18 @@ U08 getSoftwareConfigStatus( SOFTWARE_CONFIG_T config ); #ifdef _DG_ -DG_TEMP_SENSORS_CAL_RECORD_T getDGTemperatureSensorsCalibrationRecord( void ); -DG_RO_PUMP_CAL_RECORD_T getDGROPumpRecord( void ); -DG_CONC_PUMPS_CAL_RECORD_T getDGConcetnratePumpsRecord( void ); -DG_DRAIN_PUMP_CAL_RECORD_T getDGDrainPumpRecord( void ); -DG_PRE_RO_PURGE_VOLUME_T getDGPreROPurgeVolumeRecord( void ); -DG_FILTERS_CAL_RECORD_T getDGFiltersRecord( void ); -DG_FANS_CAL_RECORD_T getDGFansRecord( void ); -DG_SCHEDULED_RUN_RECORD_T getDGScheduledRunsRecord( void ); -BOOL setWaterConsumption ( U32 liters ); -U32 getWaterConsumption ( void ); -BOOL setHeatersInfoRecord( U08 *addressPtr, U32 infoLength ); +BOOL setWaterConsumption ( U32 liters ); +U32 getWaterConsumption ( void ); +BOOL setHeatersInfoRecord( U08 *addressPtr, U32 infoLength ); #endif #ifdef _HD_ -BOOL setTreatmentTime ( U32 hours ); -U32 getTreatmentTime ( void ); +BOOL setTreatmentTime ( U32 hours ); +U32 getTreatmentTime ( void ); #endif BOOL writeLogData( LOG_DATA_T* data ); BOOL readLogData( READ_DATA_T* buffer, U32 length ); -#ifdef _DG_ -// From Dialin -BOOL getScheduledRunsRecord( void ); -BOOL setScheduledRunsRecord( U32 currentMessage, U32 totalMessages, U32 length, U08 *addressPtr ); -#endif - BOOL sendRecordToDialin( RECORD_JOBS_STATE_T job ); BOOL receiveRecordFromDialin( RECORD_JOBS_STATE_T job, U32 currentMessage, U32 totalMessages, U32 length, U08 *addressPtr ); Index: NVDataMgmtDGRecords.h =================================================================== diff -u -r9f22758aaf8f88b6b416c127425bfb87c9962f2c -r09b8648f878639c4a8de458c7b9aa8b697c538ec --- NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 9f22758aaf8f88b6b416c127425bfb87c9962f2c) +++ NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 09b8648f878639c4a8de458c7b9aa8b697c538ec) @@ -61,6 +61,12 @@ GET_CAL_RSRVRS_VOL_RECORD, ///< Get reservoirs volume record. GET_CAL_HEATING_RECORD, ///< Get heating calibration record. GET_CAL_DRAIN_LINE_VOLUME_RECORD, ///< Get drain line volume record. + GET_CAL_RO_PUMP_RECORD, ///< Get RO pump calibration record. + GET_CAL_CONCENTRATE_PUMPS_RECORD, ///< Get concentrate pumps calibration record. + GET_CAL_DRAIN_PUMP_RECORD, ///< Get drain pump calibration record. + GET_CAL_FANS_RECORD, ///< Get fans calibration record. + GET_CAL_PRE_RO_PURGE_VOLUME_RECORD, ///< Get pre RO purge volume record. + GET_CAL_FILTERS_RECORD, ///< Get filters record. GET_INF_HEATERS_RECORD, ///< Get heaters information form the the last run. GET_SYS_RECORD, ///< Get system record. GET_SRV_RECORD, ///< Get service record. @@ -165,6 +171,18 @@ NUM_OF_CAL_DATA_BICARB_CONCENTRATES ///< Number of bicarb concentrates. } CAL_DATA_DG_BICARB_CONCENTRATES_T; +/// DG fans enumeration. +typedef enum dg_fans +{ + CAL_DATA_INLET_FAN_1 = 0, + CAL_DATA_INLET_FAN_2, + CAL_DATA_INLET_FAN_3, + CAL_DATA_OUTLET_FAN_1, + CAL_DATA_OUTLET_FAN_2, + CAL_DATA_OUTLET_FAN_3, + NUM_OF_CAL_DATA_FANS +} CAL_DATA_DG_FANS_T; + /// DG scheduled runs enumeration. typedef enum dg_scheduled_runs { @@ -374,8 +392,7 @@ /// DG fans calibration data structure typedef struct { - DG_FAN_CAL_RECORD_T fan1; ///< Fan 1. - DG_FAN_CAL_RECORD_T fan2; ///< Fan 2. + DG_FAN_CAL_RECORD_T fans[ NUM_OF_CAL_DATA_FANS ]; ///< Fans calibration record. } DG_FANS_CAL_RECORD_T; /// HD accelerometer sensor calibration record