Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r482f4465ccdb813922de506bf780e29f4fb2f84b --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 482f4465ccdb813922de506bf780e29f4fb2f84b) @@ -22,9 +22,9 @@ #include "OperationModes.h" #include "Pressures.h" #include "Reservoirs.h" +#include "TemperatureSensors.h" #include "Timers.h" #include "Valves.h" -#include "TemperatureSensors.h" /** * @addtogroup DGFillMode @@ -33,9 +33,6 @@ // ********** private definitions ********** -#define QUARTER_SECOND 250 -#define HALF_SECOND 500 - // ********** private data ********** static DG_FILL_MODE_STATE_T fillState; ///< Currently active fill state. @@ -46,11 +43,11 @@ static DG_FILL_MODE_STATE_T handleDeliverDialysateState( void ); /*********************************************************************//** - * @brief initFillMode - * The initFillMode function initializes the Fill Mode module. + * @brief + * The initFillMode function initializes the fill mode module. * @details * Inputs : none - * Outputs : Fill Mode module initialized. + * Outputs : Fill mode module initialized * @return none *************************************************************************/ void initFillMode( void ) @@ -59,12 +56,11 @@ } /*********************************************************************//** - * @brief transitionToFillMode - * The transitionToFillMode function prepares for transition to \n - * fill mode. + * @brief + * The transitionToFillMode function prepares for transition to fill mode. * @details * Inputs : none - * Outputs : fillState + * Outputs : Re-initialized fill mode * @return none *************************************************************************/ void transitionToFillMode( void ) @@ -79,19 +75,20 @@ } /*********************************************************************//** - * @brief execFillMode - * The execFillMode function executes the Fill Mode state machine. + * @brief + * The execFillMode function executes the fill mode state machine. * @details * Inputs : fillState - * Outputs : fillState + * Outputs : Check water quality, fill mode state machine executed * @return current state. *************************************************************************/ U32 execFillMode( void ) { - // check inlet water conductivity, temperature, and pressure - checkInletWaterConductivity( fillState ); + // check inlet water conductivity, temperature, pressure, and RO rejection ratio + checkInletWaterConductivity(); checkInletWaterTemperature(); checkInletPressure(); + checkRORejectionRatio(); // execute current Fill state switch ( fillState ) @@ -119,11 +116,11 @@ /*********************************************************************//** * @brief - * The handleDialysateProductionState function executes the Dialysate Production \n - * state of the Fill Mode state machine. + * The handleDialysateProductionState function executes the Dialysate production + * state of the fill mode state machine. * @details * Inputs : none - * Outputs : + * Outputs : none * @return the next state *************************************************************************/ static DG_FILL_MODE_STATE_T handleDialysateProductionState( void ) @@ -142,11 +139,11 @@ /*********************************************************************//** * @brief - * The handleDeliverDialysateState function executes the Deliver Dialysate \n - * state of the Fill Mode state machine. + * The handleDeliverDialysateState function executes the deliver Dialysate + * state of the fill mode state machine. * @details * Inputs : none - * Outputs : + * Outputs : Deliver Dialysate * @return the next state *************************************************************************/ static DG_FILL_MODE_STATE_T handleDeliverDialysateState( void ) @@ -178,12 +175,11 @@ /*********************************************************************//** * @brief - * The getCurrentFillState function returns the current state of the \n - * fill mode. + * The getCurrentFillState function returns the current state of the fill mode. * @details * Inputs : fillState * Outputs : none - * @return the current state of fill mode. + * @return current state of fill mode *************************************************************************/ DG_FILL_MODE_STATE_T getCurrentFillState( void ) {