Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r542a50ea0f1958b02ddc8f1824eb534686616e7c -r1d4766a9ba6b087a7c86e776634707d8a1bfceaf --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 542a50ea0f1958b02ddc8f1824eb534686616e7c) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 1d4766a9ba6b087a7c86e776634707d8a1bfceaf) @@ -171,7 +171,7 @@ // set via Dialin for calibration check purposes only static DIALIN_FILL_FOR_CAL_CHECK_T dialinFillForCalCheck = DIALIN_FILL_FOR_CAL_NONE; ///< Dialin fill for calibration check. // NOTE: this variable should be initialized here because the init function is called every time and then this variable is set to 0.0. -static F32 roRejectionRatioFromHD = 0.0F; ///< RO rejection ratio from HD. +static F32 maxRORejectionRatioFromHD = 0.0F; ///< Max RO rejection ratio from HD. static OVERRIDE_U32_T fillModeDataPublishInterval = { FILL_MODE_DATA_PUB_INTERVAL, FILL_MODE_DATA_PUB_INTERVAL, 0, 0 }; ///< Interval (in ms) at which to publish fill mode data to CAN bus. static OVERRIDE_F32_T integratedVolumeML = { 0.0, 0.0, 0.0, 0.0 }; ///< Total RO flow rate over period of time. @@ -551,17 +551,17 @@ /*********************************************************************//** * @brief - * The setRORejectionRatio function sets the RO rejection ratio that has + * The setMaxRORejectionRatio function sets the RO rejection ratio that has * been received from the HD institutional record. * @details Inputs: none * @details Outputs: roRejectionRatioFromHD * @param RO rejection ratio * @return none *************************************************************************/ -void setRORejectionRatio( F32 roRejectionRatio ) +void setMaxRORejectionRatio( F32 roRejectionRatio ) { - roRejectionRatioFromHD = roRejectionRatio; - SEND_EVENT_WITH_2_F32_DATA( DG_EVENT_RO_REJECTION_RATIO_FROM_HD_INSTIT_RECORD, roRejectionRatioFromHD, 0.0F ) + maxRORejectionRatioFromHD = roRejectionRatio; + SEND_EVENT_WITH_2_F32_DATA( DG_EVENT_RO_REJECTION_RATIO_FROM_HD_INSTIT_RECORD, maxRORejectionRatioFromHD, 0.0F ) } /*********************************************************************//** @@ -927,10 +927,10 @@ // Fault alarm per PRS 483 SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DG_OUTLET_PRIMARY_CONDUCTIVITY_OUT_OF_RANGE, avgCPo, MAX_CPO_CONDUCTIVITY_ALLOW ); } - if ( ( avgRR > roRejectionRatioFromHD ) && ( isROOnlyModeEnabled() != TRUE ) ) + if ( ( avgRR > maxRORejectionRatioFromHD ) && ( isROOnlyModeEnabled() != TRUE ) ) { // Fault alarm per PRS 483 - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DG_RO_REJECTION_RATIO_OUT_OF_RANGE, avgRR, roRejectionRatioFromHD ); + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DG_RO_REJECTION_RATIO_OUT_OF_RANGE, avgRR, maxRORejectionRatioFromHD ); } } Index: firmware/App/Modes/ModeFill.h =================================================================== diff -u -r542a50ea0f1958b02ddc8f1824eb534686616e7c -r1d4766a9ba6b087a7c86e776634707d8a1bfceaf --- firmware/App/Modes/ModeFill.h (.../ModeFill.h) (revision 542a50ea0f1958b02ddc8f1824eb534686616e7c) +++ firmware/App/Modes/ModeFill.h (.../ModeFill.h) (revision 1d4766a9ba6b087a7c86e776634707d8a1bfceaf) @@ -76,7 +76,7 @@ void setAcidAndBicarbType( U32 acid, U32 bicarb ); -void setRORejectionRatio( F32 roRejectionRatio ); +void setMaxRORejectionRatio( F32 roRejectionRatio ); BOOL testSetFillModeDataPublishIntervalOverride( U32 value ); BOOL testResetFillModeDataPublishIntervalOverride( void ); Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r542a50ea0f1958b02ddc8f1824eb534686616e7c -r1d4766a9ba6b087a7c86e776634707d8a1bfceaf --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 542a50ea0f1958b02ddc8f1824eb534686616e7c) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 1d4766a9ba6b087a7c86e776634707d8a1bfceaf) @@ -977,8 +977,8 @@ handleSendDGServiceRecordToHD( message ); break; - case MSG_ID_HD_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_TO_DG_RESPONSE: - handleRORejectionResponseFromHDInstitRecord( message ); + case MSG_ID_HD_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_RESPONSE: + handleMaxRORejectionResponseFromHDInstitRecord( message ); break; // NOTE: This case must be last Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r542a50ea0f1958b02ddc8f1824eb534686616e7c -r1d4766a9ba6b087a7c86e776634707d8a1bfceaf --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 542a50ea0f1958b02ddc8f1824eb534686616e7c) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 1d4766a9ba6b087a7c86e776634707d8a1bfceaf) @@ -2001,7 +2001,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_REQUEST; + msg.hdr.msgID = MSG_ID_DG_MAX_RO_REJ_RATIO_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,14 +2010,14 @@ /*********************************************************************//** * @brief - * The handleRORejectionResponseFromHDInstitRecord function handles receiving - * RO rejection ratio response from HD institutional record + * The handleMaxRORejectionResponseFromHDInstitRecord function handles receiving + * max RO rejection ratio response from HD institutional record * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ) +void handleMaxRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ) { BOOL status = FALSE; @@ -2026,8 +2026,8 @@ F32 roRejectionRatio; memcpy( &roRejectionRatio, message->payload, sizeof(F32) ); + setMaxRORejectionRatio( roRejectionRatio ); - status = TRUE; } Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r542a50ea0f1958b02ddc8f1824eb534686616e7c -r1d4766a9ba6b087a7c86e776634707d8a1bfceaf --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 542a50ea0f1958b02ddc8f1824eb534686616e7c) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 1d4766a9ba6b087a7c86e776634707d8a1bfceaf) @@ -204,8 +204,8 @@ // MSG_ID_DG_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_REQUEST void sendRORejectionRatioRequestToHD( void ); -// MSG_ID_HD_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_TO_DG_RESPONSE -void handleRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ); +// MSG_ID_HD_MAX_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_RESPONSE +void handleMaxRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ); // *********** public test support message functions **********