Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -ra58aa4a92a57c8b7dbec31a2f834916dc4612e4b -r74d78e2ac10592448dd5c7b83fccebdc6c65556b --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision a58aa4a92a57c8b7dbec31a2f834916dc4612e4b) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 74d78e2ac10592448dd5c7b83fccebdc6c65556b) @@ -29,8 +29,8 @@ #include "TaskGeneral.h" // TODO control composition pumps -// TODO add header to functions -// TODO add documentation +// TODO add code NVDataMgmt regarding heat disinfection +// TODO add logic for water temperature above 85 C /** * @addtogroup DGHeatDisinfectMode @@ -39,74 +39,76 @@ // ********** private definitions ********** -// TODO: Change the target temperature to 85 -#define HEAT_DISINFECT_TARGET_TEMPERATURE 30U ///< Heat disinfection target temperature -#define MAX_TPO_AND_TDI_SENSORS_DIFFERENCE 1U -#define MAX_TEMPERATURE_DEVIATION_FROM_TARGET 4U +#define HEAT_DISINFECT_TIME_INTERVAL_DAYS 2U ///< Heat disinfect time interval in days //TODO change the interval to actual value (was it every 21 days?) +#define HEAT_DISINFECT_TIME_INTERVAL_SECONDS ( HEAT_DISINFECT_TIME_INTERVAL_DAYS * 86400 ) ///< Heat disinfect time interval in seconds -#define HEAT_DISINFECT_RECIRC_PATH_TIME_MINS 1U -#define HEAT_DISINFECT_R1_TO_R2_TIME_MINS 1U -#define HEAT_DISINFECT_R2_TO_R1_TIME_MINS 1U +#define HEAT_DISINFECT_TARGET_TEMPERATURE 30U ///< Heat disinfection target temperature //TODO change the target temperature back to 85C +#define MAX_TPO_AND_TDI_SENSORS_DIFFERENCE 1U ///< Maximum allowed temperature difference in between TPi and TPo +#define MAX_TEMPERATURE_DEVIATION_FROM_TARGET 4U ///< Maximum allowed temperature deviation from target temperature -#define MINUTES_TO_MS_CONVERSION 60000U +#define HEAT_DISINFECT_RECIRC_PATH_TIME_MINS 1U ///< Recirculation path heat disinfection duration in minutes +#define HEAT_DISINFECT_R1_TO_R2_TIME_MINS 1U ///< Reservoir 1 to reservoir 2 heat disinfection duration in minutes +#define HEAT_DISINFECT_R2_TO_R1_TIME_MINS 1U ///< Reservoir 2 to reservoir 1 heat disinfection duration in minutes -#define HEAT_DISINFECT_EVAC_RECIRC_PATH_TIME_MS 4000U //TODo do we need this? Change this to the amount of time the composite pumps will run -#define HEAT_DISINFECT_RECIRC_PATH_TIME_MS ( HEAT_DISINFECT_RECIRC_PATH_TIME_MINS * MINUTES_TO_MS_CONVERSION ) -#define HEAT_DISINFECT_R1_TO_R2_TIME_MS ( HEAT_DISINFECT_R1_TO_R2_TIME_MINS * MINUTES_TO_MS_CONVERSION ) -#define HEAT_DISINFECT_R2_TO_R1_TIME_MS ( HEAT_DISINFECT_R2_TO_R1_TIME_MINS * MINUTES_TO_MS_CONVERSION ) -#define HEAT_DISINFECT_TARGET_CYCLES 5U +#define MINUTES_TO_MS_CONVERSION 60000U ///< Minutes to milliseconds conversion -#define HEAT_DISINFECT_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +#define HEAT_DISINFECT_EVAC_RECIRC_PATH_TIME_MS 4000U ///< Evacuate recirculation path time in ms //TODO do we need this? Change this to the amount of time the composite pumps will run +#define HEAT_DISINFECT_RECIRC_PATH_TIME_MS ( HEAT_DISINFECT_RECIRC_PATH_TIME_MINS * MINUTES_TO_MS_CONVERSION ) ///< Recirculation path heat disinfection duration in ms +#define HEAT_DISINFECT_R1_TO_R2_TIME_MS ( HEAT_DISINFECT_R1_TO_R2_TIME_MINS * MINUTES_TO_MS_CONVERSION ) ///< Reservoir 1 to reservoir 2 heat disinfection duration in ms +#define HEAT_DISINFECT_R2_TO_R1_TIME_MS ( HEAT_DISINFECT_R2_TO_R1_TIME_MINS * MINUTES_TO_MS_CONVERSION ) ///< Reservoir 2 to reservoir 1 heat disinfection duration in ms +#define HEAT_DISINFECT_TARGET_CYCLES 5U ///< No of cycles to run heat disinfection //TODO change this value to the actual value -#define DRAIN_PUMP_TARGET_DELTA_PRESSURE 0U -#define DRAIN_PUMP_EVACUATE_FLUID_TARGET_RPM 2800U -#define DRAIN_PUMP_DISINFECT_DRAIN_PATH_TARGET_RPM 1500U -#define RO_PUMP_TARGET_FLOW_RATE_LPM 0.9 +#define HEAT_DISINFECT_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Heat disinfection data publication time interval -#define FULL_RESERVOIRS_WEIGHT_GRAMS 500U //TODO Change this value -#define EMPTY_RESERVOIRS_WEIGHT_GRAMS 200U //TODO Change this value +#define DRAIN_PUMP_TARGET_DELTA_PRESSURE 0U ///< Drain pump target delta pressure +#define DRAIN_PUMP_EVACUATE_FLUID_TARGET_RPM 2800U ///< Drain pump target RPM during evacuating the fluid path +#define DRAIN_PUMP_DISINFECT_DRAIN_PATH_TARGET_RPM 1500U ///< Drain pump target RPM during heat disinfection +#define RO_PUMP_TARGET_FLOW_RATE_LPM 0.9 ///< RO pump target flow rate +#define FULL_RESERVOIRS_WEIGHT_GRAMS 500U ///< The weight of a full reservoir //TODO Change this value to full value +#define EMPTY_RESERVOIRS_WEIGHT_GRAMS 200U ///< The weight of an empty reservoir //TODO Change this value to full value + // ********** private data ********** /// Heat disinfect evacuate/fill states typedef enum heat_disinfect_internal_states { - INTERNAL_HEAT_DISINFECT_STATE_OFF = 0, - INTERNAL_HEAT_DISINFECT_STATE_FILL_WITH_WATER, - INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RECIRC_PATH, - INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_1, - INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_2, - INTERNAL_HEAT_DISINFECT_STATE_COMPLETE, - NUM_OF_INTERNAL_STATES + INTERNAL_HEAT_DISINFECT_STATE_OFF = 0, ///< Internal heat disinfect state off + INTERNAL_HEAT_DISINFECT_STATE_FILL_WITH_WATER, ///< Internal heat disinfect fill with water + INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RECIRC_PATH, ///< Internal heat disinfect evacuate recirculation path + INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_1, ///< Internal heat disinfect evacuate reservoir 1 + INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_2, ///< Internal heat disinfect evacuate reservoir 2 + INTERNAL_HEAT_DISINFECT_STATE_COMPLETE, ///< Internal heat disinfect complete + NUM_OF_INTERNAL_STATES ///< Number of internal heat disinfect states } INTERNAL_HEAT_DISINFECT_STATE_T; -static INTERNAL_HEAT_DISINFECT_STATE_T heatDisinfectInternalState = INTERNAL_HEAT_DISINFECT_STATE_OFF; -static DG_HEAT_DISINFECT_STATE_T heatDisinfectState = DG_HEAT_DISINFECT_STATE_START; ///< Currently active heat disinfect state. -static U32 heatDisinfectElapsedTime = 0; -static U32 stateTimer = 0; -static U32 drainPumpTargetRPM = 0; -static U32 heatDisinfectCurrentCycle = 0; -static U32 heatDisinfectPublishCounter = 0; +static INTERNAL_HEAT_DISINFECT_STATE_T heatDisinfectInternalState = INTERNAL_HEAT_DISINFECT_STATE_OFF; ///< Currently active internal heat disinfect state +static DG_HEAT_DISINFECT_STATE_T heatDisinfectState = DG_HEAT_DISINFECT_STATE_START; ///< Currently active heat disinfect state +static U32 heatDisinfectElapsedTime = 0; ///< Overall heat disinfection elapsed time +static U32 stateTimer = 0; ///< Timer of an individual state +static U32 drainPumpTargetRPM = 0; ///< Drain pump current target RPM +static U32 heatDisinfectCurrentCycle = 0; ///< Current cycle count of the heat disinfect mode +static U32 heatDisinfectPublishCounter = 0; ///< Current publication counter of heat disinfect mode static OVERRIDE_F32_T heatDisinfectRecircDuration = { HEAT_DISINFECT_RECIRC_PATH_TIME_MS, HEAT_DISINFECT_RECIRC_PATH_TIME_MS, - 0, 0 }; + 0, 0 }; ///< Duration of recirculation path heat disinfeciton static OVERRIDE_F32_T heatDisinfectR1ToR2Duration = { HEAT_DISINFECT_R1_TO_R2_TIME_MS, HEAT_DISINFECT_R1_TO_R2_TIME_MS, - 0, 0 }; + 0, 0 }; ///< Duration of reservoir 1 to reservoir 2 heat disinfection static OVERRIDE_F32_T heatDisinfectR2ToR1Duration = { HEAT_DISINFECT_R2_TO_R1_TIME_MS, HEAT_DISINFECT_R2_TO_R1_TIME_MS, - 0, 0 }; + 0, 0 }; ///< Duration of reservoir 2 to reservoir 1 heat disinfection static OVERRIDE_U32_T heatDisinfectNoOfCyclesToRun = { HEAT_DISINFECT_TARGET_CYCLES, HEAT_DISINFECT_TARGET_CYCLES, - 0, 0 }; + 0, 0 }; ///< Number of cycles to run heat disinfection static OVERRIDE_U32_T heatDisinfectDataPublishInterval = { HEAT_DISINFECT_DATA_PUB_INTERVAL, HEAT_DISINFECT_DATA_PUB_INTERVAL, - 0, 0 }; + 0, 0 }; ///< Heat disinfect mode data publish interval // ********** private function prototypes ********** @@ -132,6 +134,7 @@ static void execHeatDisinfectInternalStates( void ); static void publishHeatDisinfectData( void ); static U32 getPublishHeatDisinfectDataInterval( void ); + static DATA_GET_PROTOTYPE( U32, getPublishHeatDisinfectDataInterval ); static DATA_GET_PROTOTYPE( F32, getRecirculationDuration ); static DATA_GET_PROTOTYPE( F32, getRSVR1ToRSVR2Duration ); @@ -277,6 +280,16 @@ // ********** private function definitions ********** +/*********************************************************************//** + * @brief + * The handleHeatDisinfectStart function handles heat disinfect start state + * @details + * Inputs : drainPumpTargetRPM, heatDisinfectInternalState, + * heatDisinfectElapsedTime + * Outputs : drainPumpTargetRPM, heatDisinfectInternalState, + * heatDisinfectElapsedTime + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectStart( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_EVACUATE_DIALYSATE_FILL_WITH_WATER; @@ -290,6 +303,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectEvacuateDialysateFillWithWater function handles \n + * evacuate dialysate and fill with water state + * @details + * Inputs : heatDisinfectInternalState + * Outputs : none + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectEvacuateDialysateFillWithWater( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_EVACUATE_DIALYSATE_FILL_WITH_WATER; @@ -326,6 +348,14 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectHeatWater function handles heat water state + * @details + * Inputs : stateTimer + * Outputs : stateTimer + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectHeatWater( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_HEAT_WATER; @@ -354,6 +384,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectRecirculationPath function handles disinfect \n + * recirculate path state + * @details + * Inputs : stateTimer + * Outputs : stateTimer + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectRecirculationPath( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_DISINFECT_RECIRC_PATH; @@ -388,6 +427,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectReservoir1To2 function handles disinfect \n + * reservoir 1 to reservoir 2 state + * @details + * Inputs : stateTimer + * Outputs : stateTimer + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectReservoir1To2( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_DISINFECT_RESERVOIR_1_TO_2; @@ -422,6 +470,17 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectReservoir2To1 function handles disinfect \n + * reservoir 2 to reservoir 1 state + * @details + * Inputs : heatDisinfectCurrentCycle, heatDisinfectInternalState, + * drainPumpTargetRPM, stateTimer + * Outputs : heatDisinfectCurrentCycle, heatDisinfectInternalState, + * drainPumpTargetRPM, stateTimer + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectReservoir2To1( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_DISINFECT_RESERVOIR_2_TO_1; @@ -477,6 +536,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectDrainPath function handles disinfect drain path \n + * state + * @details + * Inputs : drainPumpTargetRPM, heatDisinfectInternalState + * Outputs : drainPumpTargetRPM, heatDisinfectInternalState + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectDrainPath( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_DISINFECT_DRAIN_PATH; @@ -493,6 +561,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectFillWithWaterDeprimeReservoirs function handles \n + * fill with water and deprime the reservoirs state + * @details + * Inputs : none + * Outputs : none + * @return next state + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectFillWithWaterDeprimeReservoirs( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_FILL_WITH_WATER_DEPRIME_RESERVOIRS; @@ -508,6 +585,15 @@ return state; } +/*********************************************************************//** + * @brief + * The execHeatDisinfectInternalStates function executes the heat \n + * disinfection internal state machine + * @details + * Inputs : heatDisinfectInternalState + * Outputs : heatDisinfectInternalState + * @return none + *************************************************************************/ static void execHeatDisinfectInternalStates( void ) { switch ( heatDisinfectInternalState ) @@ -542,6 +628,15 @@ } } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectOffState function handles internal heat disinfec \n + * off state + * @details + * Inputs : heatDisinfectState, stateTimer + * Outputs : stateTimer + * @return next state + *************************************************************************/ static INTERNAL_HEAT_DISINFECT_STATE_T handleHeatDisinfectOffState( void ) { INTERNAL_HEAT_DISINFECT_STATE_T state = INTERNAL_HEAT_DISINFECT_STATE_OFF; @@ -601,6 +696,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectFillWithWaterState function handles internal \n + * fill with water state + * @details + * Inputs : heatDisinfectState, stateTimer + * Outputs : stateTimer + * @return next state + *************************************************************************/ static INTERNAL_HEAT_DISINFECT_STATE_T handleHeatDisinfectFillWithWaterState( void ) { INTERNAL_HEAT_DISINFECT_STATE_T state = INTERNAL_HEAT_DISINFECT_STATE_FILL_WITH_WATER; @@ -639,6 +743,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectEvacRecircPathState function handles internal \n + * evacuate recirculation path state + * @details + * Inputs : stateTimer, drainPumpTargetRPM + * Outputs : none + * @return next state + *************************************************************************/ static INTERNAL_HEAT_DISINFECT_STATE_T handleHeatDisinfectEvacRecircPathState( void ) { INTERNAL_HEAT_DISINFECT_STATE_T state = INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RECIRC_PATH; @@ -667,6 +780,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisifnectEvacReservoir1State function handles internal \n + * evacuate reservoir 1 state + * @details + * Inputs : none + * Outputs : none + * @return next state + *************************************************************************/ static INTERNAL_HEAT_DISINFECT_STATE_T handleHeatDisifnectEvacReservoir1State( void ) { INTERNAL_HEAT_DISINFECT_STATE_T state = INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_1; @@ -683,18 +805,27 @@ setValveState ( VPO, VALVE_STATE_NOFILL_C_TO_NO ); setValveState ( VDR, VALVE_STATE_DRAIN_C_TO_NO ); setValveState ( VRC, VALVE_STATE_DRAIN_C_TO_NO ); - setValveState ( VRO, VALVE_STATE_R2_C_TO_NO ); - setValveState ( VRD, VALVE_STATE_R1_C_TO_NO ); - setValveState ( VRI, VALVE_STATE_R1_C_TO_NO ); + setValveState ( VRO, VALVE_STATE_R2_C_TO_NC ); + setValveState ( VRD, VALVE_STATE_R2_C_TO_NO ); + setValveState ( VRI, VALVE_STATE_R2_C_TO_NC ); setValveState ( VRF, VALVE_STATE_R2_C_TO_NO ); - //setDrainPumpTargetSpeed ( drainPumpTargetRPM ); probably it is not needed TODO test this + setDrainPumpTargetSpeed ( drainPumpTargetRPM ); //probably it is not needed TODO test this state = INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_2; } return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectEvacReservoir2State function handles internal \n + * evacuate reservoir 2 state + * @details + * Inputs : heatDisinfectState + * Outputs : none + * @return next state + *************************************************************************/ static INTERNAL_HEAT_DISINFECT_STATE_T handleHeatDisinfectEvacReservoir2State( void ) { INTERNAL_HEAT_DISINFECT_STATE_T state = INTERNAL_HEAT_DISINFECT_STATE_EVACUATE_RESERVOIR_2; @@ -718,6 +849,15 @@ return state; } +/*********************************************************************//** + * @brief + * The stopActuators function sets all the actuators in stop and \n + * de-energized state + * @details + * Inputs : none + * Outputs : none + * @return none + *************************************************************************/ static void stopActuators( void ) { // De-energize all the valves @@ -742,6 +882,15 @@ stopTrimmerHeater(); } +/*********************************************************************//** + * @brief + * The isTemperatureInRange function checks whether the water temperature \n + * is out of range + * @details + * Inputs : heatDisinfectElapsedTime + * Outputs : heatDisinfectElapsedTime + * @return TRUE if the water temperature is still in range + *************************************************************************/ static BOOL isTemperatureInRange( void ) { BOOL result = FALSE; @@ -759,6 +908,15 @@ return result; } +/*********************************************************************//** + * @brief + * The setActuatorsToFillWater function sets the actuators to fill with \n + * water mode + * @details + * Inputs : none + * Outputs : none + * @return none + *************************************************************************/ static void setActuatorsToFillWater( void ) { setValveState ( VPI, VALVE_STATE_OPEN ); @@ -775,7 +933,16 @@ setROPumpTargetFlowRate( RO_PUMP_TARGET_FLOW_RATE_LPM ); } -static U32 getPublishHeatDisinfectDataInterval() +/*********************************************************************//** + * @brief + * The getPublishHeatDisinfectDataInterval function sets the data publish \n + * interval + * @details + * Inputs : heatDisinfectDataPublishInterval + * Outputs : none + * @return result : data publish time interval + *************************************************************************/ +static U32 getPublishHeatDisinfectDataInterval( void ) { U32 result = heatDisinfectDataPublishInterval.data; @@ -787,6 +954,15 @@ return result; } +/*********************************************************************//** + * @brief + * The publishHeatDisinfectData function publishes heat disinfect mode + * @details + * Inputs : heatDisinfectPublishCounter, heatDisinfectCurrentCycle, + * heatDisinfectInternalState + * Outputs : heatDisinfectPublishCounter + * @return none + *************************************************************************/ static void publishHeatDisinfectData ( void ) { if ( ++heatDisinfectPublishCounter >= getPublishHeatDisinfectDataInterval() ) @@ -797,6 +973,16 @@ } } +/*********************************************************************//** + * @brief + * The testSetHeatDisinfectDataPublishIntervalOverride function overrides \n + * the data publication interval + * @details + * Inputs : heatDisinfectDataPublishInterval + * Outputs : heatDisinfectDataPublishInterval + * @param value : The requested value for override + * @return result : TRUE if override was successful + *************************************************************************/ BOOL testSetHeatDisinfectDataPublishIntervalOverride( U32 value ) { BOOL result = FALSE; @@ -813,6 +999,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetHeatDisinfectDataPublishIntervalOverride function \n + * resets the overridden data publication time interval + * @details + * Inputs : heatDisinfectDataPublishInterval + * Outputs : heatDisinfectDataPublishInterval + * @return result : TRUE if reset was successful + *************************************************************************/ BOOL testResetHeatDisinfectDataPublishIntervalOverride( void ) { BOOL result = FALSE; @@ -827,6 +1022,16 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetHeatDisinfectRecircDurationOverride function overrides the \n + * duration of the recirculation path heat disinfection in minutes + * @details + * Inputs : heatDisinfectRecircDuration + * Outputs : heatDisinfectRecircDuration + * @param recircMins : recirculation duration in minutes + * @return result : TRUE if override was successful + *************************************************************************/ BOOL testSetHeatDisinfectRecircDurationOverride( F32 recircMins ) { BOOL result = FALSE; @@ -841,6 +1046,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetHeatDisinfectRecircDurationOverride function resets the \n + * overridden duration of recirculation path heat disinfection + * @details + * Inputs : heatDisinfectRecircDuration + * Outputs : heatDisinfectRecircDuration + * @return result : TRUE if reset was successful + *************************************************************************/ BOOL testResetHeatDisinfectRecircDurationOverride( void ) { BOOL result = FALSE; @@ -855,6 +1069,16 @@ return result; } + /*********************************************************************//** + * @brief + * The testSetHeatDisinfectR1ToR2DurationOverride function overrides\n + * the duration of reservoir 1 to reservoir 2 heat disinfection in minutes + * @details + * Inputs : heatDisinfectR1ToR2Duration + * Outputs : heatDisinfectR1ToR2Duration + * @param R1ToR2Mins : reservoir 1 to reservoir 2 duration in minutes + * @return result : TRUE if override was successful + *************************************************************************/ BOOL testSetHeatDisinfectR1ToR2DurationOverride( F32 R1ToR2Mins ) { BOOL result = FALSE; @@ -870,6 +1094,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetHeatDisinfectR1ToR2DurationOverride function \n + * resets the overridden reservoir 1 to reservoir 2 duration + * @details + * Inputs : heatDisinfectR1ToR2Duration + * Outputs : heatDisinfectR1ToR2Duration + * @return result : TRUE if reset was successful + *************************************************************************/ BOOL testResetHeatDisinfectR1ToR2DurationOverride( void ) { BOOL result = FALSE; @@ -884,6 +1117,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetHeatDisinfectionR2ToR1DurationOverride function overrides \n + * the duration of reservoir 2 to reservoir 1 heat disinfection in minutes + * Inputs : heatDisinfectR2ToR1Duration + * Outputs : heatDisinfectR2ToR1Duration + * @param R2ToR1Mins : reservoir 2 to reservoir 1 duration in minutes + * @return result : TRUE is override was successful + *************************************************************************/ BOOL testSetHeatDisinfectionR2ToR1DurationOverride( F32 R2ToR1Mins ) { BOOL result = FALSE; @@ -899,6 +1141,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetHeatDisinfectionR2ToR1DurationOverride function \n + * resets the overridden reservoir 2 to reservoir 1 duration + * @details + * Inputs : heatDisinfectR2ToR1Duration + * Outputs : heatDisinfectR2ToR1Duration + * @return result : TRUE if reset was successful + *************************************************************************/ BOOL testResetHeatDisinfectionR2ToR1DurationOverride( void ) { BOOL result = FALSE; @@ -913,6 +1164,16 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetHeatDisinfectNoOfCyclesOverride function overrides the \n + * number of cycles to run during heat disinfection + * @details + * Inputs : heatDisinfectNoOfCyclesToRun + * Outputs : heatDisinfectNoOfCyclesToRun + * @param cycles : number of cycles to run heat disinfection + * @return result : TRUE if override was successful + *************************************************************************/ BOOL testSetHeatDisinfectNoOfCyclesOverride( U32 cycles ) { BOOL result = FALSE; @@ -928,6 +1189,15 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetHeatDisinfectNoOfCyclesOverride function \n + * resets the cycles to run heat disinfection + * @details + * Inputs : heatDisinfectNoOfCyclesToRun + * Outputs : heatDisinfectNoOfCyclesToRun + * @return result : TRUE if reset was successful + *************************************************************************/ BOOL testResetHeatDisinfectNoOfCyclesOverride( void ) { BOOL result = FALSE; @@ -942,7 +1212,16 @@ return result; } -static F32 getRecirculationDuration() +/*********************************************************************//** + * @brief + * The getRecirculationDuration function gets the duration of recirculation \n + * path heat disinfection + * @details + * Inputs : heatDisinfectRecircDuration + * Outputs : none + * @return result : the duration in minutes + *************************************************************************/ +static F32 getRecirculationDuration( void ) { F32 result = heatDisinfectRecircDuration.data; @@ -954,7 +1233,16 @@ return result; } -static F32 getRSVR1ToRSVR2Duration() +/*********************************************************************//** + * @brief + * The getRSVR1ToRSVR2Duration function gets the duration of reservoir 1 \n + * to reservoir 2 heat disinfection + * @details + * Inputs : heatDisinfectR1ToR2Duration + * Outputs : none + * @return result : the duration in minutes + *************************************************************************/ +static F32 getRSVR1ToRSVR2Duration( void ) { F32 result = heatDisinfectR1ToR2Duration.data; @@ -966,6 +1254,15 @@ return result; } +/*********************************************************************//** + * @brief + * The getRSVR2ToRSVR1Duration function gets the duration of reservoir 2 \n + * to reservoir 1 heat disinfection + * @details + * Inputs : heatDisinfectR2ToR1Duration + * Outputs : none + * @return result : the duration in minutes + *************************************************************************/ static F32 getRSVR2ToRSVR1Duration() { F32 result = heatDisinfectR2ToR1Duration.data; @@ -978,6 +1275,15 @@ return result; } +/*********************************************************************//** + * @brief + * The getNoOfCyclesToRun function gets the number of cycles to run \n + * heat disinfection + * @details + * Inputs : heatDisinfectNoOfCyclesToRun + * Outputs : none + * @return result : the no of cycles + *************************************************************************/ static U32 getNoOfCyclesToRun() { U32 result = heatDisinfectNoOfCyclesToRun.data;