Index: firmware/App/Controllers/ConductivitySensors.c =================================================================== diff -u -r46db80caf660d4921badc04e4296a8a1312cb30c -r255e10103b009abce4489ebe0adda8d45137e2f1 --- firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 46db80caf660d4921badc04e4296a8a1312cb30c) +++ firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 255e10103b009abce4489ebe0adda8d45137e2f1) @@ -51,7 +51,6 @@ #define MAX_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM 2000.0F ///< Maximum allowed high conductivity value in uS/cm. #define MIN_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM 1990.0F ///< Minimum allowed high conductivity value in uS/cm. -#define MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM 200.0F ///< Maximum allowed low conductivity value in uS/cm. #define MIN_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM 220.0F ///< Minimum allowed low conductivity value in uS/cm. #define MAX_RO_ONLY_COND_SENSOR_CPI_HIGH_US_PER_CM 100.0F ///< Maximum RO only mode high conductivity value in uS/cm. @@ -149,6 +148,7 @@ static DG_COND_SENSORS_CAL_RECORD_T condSensorsCalRecord; ///< Conductivity sensors' calibration record. static DG_COND_SENSORS_TEMP_COMP_CAL_RECORD_T condSensorsTempCompCalRecord; ///< Conductivity sensors' temperature compensation calibration record. static CAL_DATA_DG_COND_SENSORS_T condSensorCalTable[ NUM_OF_CONDUCTIVITY_SENSORS ]; ///< Conductivity sensors calibration table. +static F32 minInletWaterCondAlarmLimitUSPCM; ///< Min inlet water conductivity alarm limit in uS/cm. // ********** private function prototypes ********** @@ -172,8 +172,9 @@ void initConductivitySensors( void ) { U08 i; - roRejectionRatio = 0.0F; - condDataPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; + roRejectionRatio = 0.0F; + condDataPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; + minInletWaterCondAlarmLimitUSPCM = 0.0F; for ( i = 0; i < NUM_OF_CONDUCTIVITY_SENSORS; i++ ) { @@ -353,7 +354,7 @@ if ( FALSE == isROOnlyModeEnabled() ) { - isConductTooLow = ( conductivity < MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM ? TRUE : FALSE ); + isConductTooLow = ( conductivity < minInletWaterCondAlarmLimitUSPCM ? TRUE : FALSE ); isConductTooHigh = ( conductivity > MAX_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM ? TRUE : FALSE ); } else @@ -374,7 +375,7 @@ } // Per PRS 403 - checkPersistentAlarm( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_LOW_RANGE, isConductTooLow, conductivity, MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM ); + checkPersistentAlarm( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_LOW_RANGE, isConductTooLow, conductivity, minInletWaterCondAlarmLimitUSPCM ); if ( TRUE == isAlarmActive( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_HIGH_RANGE ) ) { @@ -401,7 +402,7 @@ // Per PRS 403 checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_HIGH, isConductTooHigh, conductivity, MAX_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM ); // Per PRS 404 - checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_LOW, isConductTooLow, conductivity, MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM ); + checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_LOW, isConductTooLow, conductivity, minInletWaterCondAlarmLimitUSPCM ); break; default: @@ -413,10 +414,10 @@ else { // VPI is closed - clear all alarms - checkPersistentAlarm( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_LOW_RANGE, FALSE, conductivity, MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM ); + checkPersistentAlarm( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_LOW_RANGE, FALSE, conductivity, minInletWaterCondAlarmLimitUSPCM ); checkPersistentAlarm( ALARM_ID_DG_INLET_WATER_CONDUCTIVITY_IN_HIGH_RANGE, FALSE, conductivity, MAX_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM ); checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_HIGH, FALSE, conductivity, MAX_COND_SENSOR_CPI_WARNING_HIGH_US_PER_CM ); - checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_LOW, FALSE, conductivity, MAX_COND_SENSOR_CPI_WARNING_LOW_US_PER_CM ); + checkPersistentAlarm( ALARM_ID_DG_CLEANING_MODE_INLET_WATER_COND_TOO_LOW, FALSE, conductivity, minInletWaterCondAlarmLimitUSPCM ); } } @@ -452,6 +453,21 @@ /*********************************************************************//** * @brief + * The setMinInletWaterConductivityAlarmLimitUSPCM function sets the min + * inlet water conductivity alarm limit in uS/cm. + * @details Inputs: none + * @details Outputs: minInletWaterConductivityAlarmLimitUSPCM + * @param conductivity value + * @return none + *************************************************************************/ +void setMinInletWaterConductivityAlarmLimitUSPCM( F32 valueUSPM ) +{ + minInletWaterCondAlarmLimitUSPCM = valueUSPM; + SEND_EVENT_WITH_2_F32_DATA( DG_EVENT_MIN_INLET_WATER_COND_ALARM_FROM_HD_INSTIT_RECORD, minInletWaterCondAlarmLimitUSPCM, 0.0F ) +} + +/*********************************************************************//** + * @brief * The getConductivityValue function gets the compensated conductivity * value for a given conductivity sensor id. * @details Inputs: compensatedConductivityValues[] Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r6abb2df716c69d47f6093d2c34a1f9c89f439528 -r255e10103b009abce4489ebe0adda8d45137e2f1 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 6abb2df716c69d47f6093d2c34a1f9c89f439528) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 255e10103b009abce4489ebe0adda8d45137e2f1) @@ -272,6 +272,8 @@ sendPOSTFinalResult( TRUE ); // Request whether we are in the RO only mode from UI requestROOnlyModeStatusFromUI(); + // Request the DG institutional values from HD + sendDGInstitutionalValuesRequestToHD(); // Go to standby mode requestNewOperationMode( DG_MODE_STAN ); break; Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rd4a77f3ce8f62c8911b1f4f3a673be6de802f50b -r255e10103b009abce4489ebe0adda8d45137e2f1 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision d4a77f3ce8f62c8911b1f4f3a673be6de802f50b) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 255e10103b009abce4489ebe0adda8d45137e2f1) @@ -977,8 +977,8 @@ handleSendDGServiceRecordToHD( message ); break; - case MSG_ID_HD_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_RESPONSE: - handleMaxRORejectionResponseFromHDInstitRecord( message ); + case MSG_ID_DG_INSTIT_VALUES_FROM_HD_INSTIT_RECORD_RESPONSE: + handleDGInstitutionalValuesResponseFromHDInstitRecord( message ); break; // NOTE: This case must be last @@ -1404,6 +1404,10 @@ handleTestRunModeFillForCalibrationCheck( message ); break; + case MSG_ID_DG_MODE_FILL_ENABLE_CHEMS_TEST: + handleTestEnableModeFillChemsTest( message ); + break; + default: // TODO - unrecognized message ID received - ignore break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rd4a77f3ce8f62c8911b1f4f3a673be6de802f50b -r255e10103b009abce4489ebe0adda8d45137e2f1 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d4a77f3ce8f62c8911b1f4f3a673be6de802f50b) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 255e10103b009abce4489ebe0adda8d45137e2f1) @@ -1989,19 +1989,19 @@ /*********************************************************************//** * @brief - * The sendMaxRORejectionRatioRequestToHD function handles sending the max RO - * rejection ratio request to HD + * The sendDGInstitutionalValuesRequestToHD function handles sending the + * request to the DG institutional values from HD * @details Inputs: none * @details Outputs: none * @return none *************************************************************************/ -void sendMaxRORejectionRatioRequestToHD( void ) +void sendDGInstitutionalValuesRequestToHD( void ) { MESSAGE_T msg; // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_REQUEST; + msg.hdr.msgID = MSG_ID_DG_INSTIT_VALUES_FROM_HD_INSTIT_RECORD_REQUEST; msg.hdr.payloadLen = 0; // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -2010,23 +2010,24 @@ /*********************************************************************//** * @brief - * The handleMaxRORejectionResponseFromHDInstitRecord function handles receiving - * max RO rejection ratio response from HD institutional record + * The handleDGInstitutionalValuesResponseFromHDInstitRecord function handles + * receiving DG institutional values from HD institutional record * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleMaxRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ) +void handleDGInstitutionalValuesResponseFromHDInstitRecord( MESSAGE_T* message ) { BOOL status = FALSE; - if ( message->hdr.payloadLen == sizeof(F32) ) + if ( message->hdr.payloadLen == sizeof(DG_INSTITUTIONAL_VALUES_T) ) { - F32 roRejectionRatio; + DG_INSTITUTIONAL_VALUES_T institValues; - memcpy( &roRejectionRatio, message->payload, sizeof(F32) ); - setMaxRORejectionRatio( roRejectionRatio ); + memcpy( &institValues, message->payload, sizeof(DG_INSTITUTIONAL_VALUES_T) ); + setMaxRORejectionRatio( institValues.maxRORejectionRatio ); + setMinInletWaterConductivityAlarmLimitUSPCM( institValues.minInletWaterCondAlarmLimitUSPCM ); status = TRUE; } @@ -5220,4 +5221,27 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleTestEnableModeFillChemsTest function handles a request + * to enable the mode fill chemicals test. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestEnableModeFillChemsTest( MESSAGE_T* message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( 0 == message->hdr.payloadLen ) + { + result = testSetEnableTestChemsCondValuesStatus(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/ Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rd4a77f3ce8f62c8911b1f4f3a673be6de802f50b -r255e10103b009abce4489ebe0adda8d45137e2f1 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision d4a77f3ce8f62c8911b1f4f3a673be6de802f50b) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 255e10103b009abce4489ebe0adda8d45137e2f1) @@ -207,11 +207,11 @@ // MSG_ID_DG_START_STOP_NOCTURNAL_HEAT_DISINFECT void handleStartStopDGPassiveCoolHeatDisifnect( MESSAGE_T* message ); -// MSG_ID_DG_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_REQUEST -void sendMaxRORejectionRatioRequestToHD( void ); +// MSG_ID_DG_INSTIT_VALUES_FROM_HD_INSTIT_RECORD_REQUEST +void sendDGInstitutionalValuesRequestToHD( void ); -// MSG_ID_HD_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_RESPONSE -void handleMaxRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ); +// MSG_ID_DG_INSTIT_VALUES_FROM_HD_INSTIT_RECORD_RESPONSE +void handleDGInstitutionalValuesResponseFromHDInstitRecord( MESSAGE_T* message ); // *********** public test support message functions ********** @@ -560,6 +560,9 @@ // MSG_ID_DG_RUN_MODE_FILL_FOR_CAL_CHECK void handleTestRunModeFillForCalibrationCheck( MESSAGE_T* message ); +// MSG_ID_DG_MODE_FILL_ENABLE_CHEMS_TEST +void handleTestEnableModeFillChemsTest( MESSAGE_T* message ); + /**@}*/ #endif