Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -rdf52e97b57868e3c2e0fb3f3dfa4c155514821be -r9cea87bcc9b7bdafa3622e9e8b3b40674575e389 --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision df52e97b57868e3c2e0fb3f3dfa4c155514821be) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 9cea87bcc9b7bdafa3622e9e8b3b40674575e389) @@ -1979,6 +1979,17 @@ } #define HELPER_FUNCTIONS #ifdef HELPER_FUNCTIONS +/*********************************************************************//** + * @brief + * The checkGradientOutOfRange function checks to ensure that the + * temperature gradient between TPo and THd does not exceed the specified + * gradient. If the heat disinfect status is changed, return true and + * update the status parameter. + * @details Inputs: none + * @details Outputs: alarmDetectedPendingTrigger + * @param *HEAT_DISINFECT_STATUS_T status + * @return Return true if status is updated, else false + *************************************************************************/ static BOOL checkGradientOutOfRange(HEAT_DISINFECT_STATUS_T *status) { BOOL returnVal = FALSE; @@ -2008,6 +2019,15 @@ } +/*********************************************************************//** + * @brief + * The checkResrvoirLoss function checks to see if any loss of volume has + * occurred in either reservoir. + * @details Inputs: none + * @details Outputs: alarmDetectedPendingTrigger, areRsrvrsLeaking + * @param *HEAT_DISINFECT_STATUS_T status + * @return Return true if status is updated, else false + *************************************************************************/ static BOOL checkResrvoirLoss(HEAT_DISINFECT_STATUS_T *status) { BOOL returnVal = FALSE; @@ -2042,6 +2062,17 @@ } +/*********************************************************************//** + * @brief + * The checkHeatDisinfectTimeout function checks to see if the heat + * disinfect process has timed out. + * @details Inputs: none + * @details Outputs: isPartialDisinfectInProgress, heatDisinfectTimer, + * isPartialDisinfectInProgress, targetDisinfectTime, + * alarmDetectedPendingTrigger + * @param *HEAT_DISINFECT_STATUS_T status + * @return Return true if status is updated, else false + *************************************************************************/ static BOOL checkHeatDisinfectTimeout(HEAT_DISINFECT_STATUS_T *status) { BOOL returnVal = FALSE; @@ -2096,6 +2127,15 @@ } +/*********************************************************************//** + * @brief + * The checkHeatDisinfectComplete function checks if the heat disinfect + * process is complete. + * @details Inputs: none + * @details Outputs: targetDisinfectTime, isPartialDisinfectInProgress + * @param *HEAT_DISINFECT_STATUS_T status + * @return Return true if status is updated, else false + *************************************************************************/ static BOOL checkHeatDisinfectComplete(HEAT_DISINFECT_STATUS_T *status) { BOOL returnVal = FALSE; @@ -2155,6 +2195,7 @@ BOOL isR1OutOfRange = fabs( getLoadCellSmallFilteredWeight( LOAD_CELL_RESERVOIR_1_PRIMARY ) - R1HeatDisinfectVol ) > RSRVRS_MAX_TARGET_VOL_CHANGE_ML; BOOL isR2OutOfRange = fabs( getLoadCellSmallFilteredWeight( LOAD_CELL_RESERVOIR_2_PRIMARY ) - R2HeatDisinfectVol ) > RSRVRS_MAX_TARGET_VOL_CHANGE_ML; +// checkGradientOutOfRange // Check if the temperature gradient in between the coldest and the hottest spot is more than the specified temperature and // the timer has not started yet, start it bool gradientOutOfRange = ( fabs( TPoTemp - ThdTemp ) > HEAT_DISINFECT_MAX_TEMP_GRADIENT_C ) ? TRUE : FALSE; @@ -2171,6 +2212,7 @@ alarmDetectedPendingTrigger = ALARM_ID_DG_HEAT_DISINFECT_TEMP_GRAD_OUT_OF_RANAGE; status = HEAT_DISINFECT_TEMP_GRADIENT_OUT_OF_RANGE; } +// End checkGradientOutOfRange if ( ( fabs( TPoTemp - ThdTemp ) > HEAT_DISINFECT_MAX_TEMP_GRADIENT_C ) && ( 0 == tempGradOutOfRangeTimer ) ) { @@ -2182,7 +2224,9 @@ alarmDetectedPendingTrigger = ALARM_ID_DG_HEAT_DISINFECT_TEMP_GRAD_OUT_OF_RANAGE; status = HEAT_DISINFECT_TEMP_GRADIENT_OUT_OF_RANGE; } +// End checkGradientOutOfRange + // checkResrovoirLoss // Check if either reservoir 1 or reservoir 2 are losing volume more than allowed volume if ( ( TRUE == isR1OutOfRange ) || ( TRUE == isR2OutOfRange ) ) { @@ -2205,7 +2249,9 @@ { areRsrvrsLeaking = FALSE; } +// End checkResrvoiLoss +// checkHeatDisinfectTimeout // If the coldest spot which is THd is less than minimum heat disinfect temperature, // reset the heat disinfect timers and check whether heating up has timed out if ( ThdTemp < HEAT_DISINFECT_START_TEMPERATURE_C ) @@ -2246,7 +2292,9 @@ { status = HEAT_DISINFECT_DISINFECT_IN_PROGRESS; } +// End checkHeatdisinfecTimeout +// checkHeatDisinfectComplete // If heat disinfect temperature has been reached, check if this stage of heat disinfect is done if ( ( TRUE == isPartialDisinfectInProgress ) && ( TRUE == didTimeout( heatDisinfectTimer, HEAT_DISINFECT_TIME_MS ) ) ) { @@ -2261,6 +2309,7 @@ return status; +// End CheckHeatDisinfectComplete #endif }