Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r46a2d238d6cf88ff3122b99080789ebc6d83069d -r01391d9a66d4a2d6266366d0f838c08041d2d18c --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 46a2d238d6cf88ff3122b99080789ebc6d83069d) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 01391d9a66d4a2d6266366d0f838c08041d2d18c) @@ -25,7 +25,7 @@ #include "ModeInitPOST.h" #include "ModeTreatment.h" #include "ModeTreatmentParams.h" -#include "OperationModes.h" +#include "OperationModes.h" #include "PersistentAlarm.h" #include "SystemComm.h" #include "SystemCommMessages.h" @@ -58,12 +58,12 @@ // ********** private data ********** -// DG status -static DG_OP_MODE_T dgCurrentOpMode; ///< Current DG operation mode. +// DG status +static DG_OP_MODE_T dgCurrentOpMode; ///< Current DG operation mode. static U32 dgSubMode; ///< Current state (sub-mode) of current DG operation mode. -static BOOL dgStartCommandSent; ///< Flag indicates command to start DG has been sent. -static BOOL dgStarted; ///< Flag indicates whether we have commanded the DG to start or stop. -static BOOL dgTrimmerHeaterOn; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. +static BOOL dgStartCommandSent; ///< Flag indicates command to start DG has been sent. +static BOOL dgStarted; ///< Flag indicates whether we have commanded the DG to start or stop. +static BOOL dgTrimmerHeaterOn; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. // DG sensor data static F32 dgDialysateTemp; ///< Dialysate temperature reported by the DG. @@ -125,12 +125,12 @@ U32 i, j; // NOTE: the active reservoir is set to reservoir 1 since DG will send active reservoir 1 as active on power up - dgStarted = FALSE; - dgTrimmerHeaterOn = FALSE; + dgStarted = FALSE; + dgTrimmerHeaterOn = FALSE; dgTrimmerTempSet = 0.0F; - dgTrimmerTempCheckTimerCtr = 0; + dgTrimmerTempCheckTimerCtr = 0; dgActiveReservoirSet = DG_RESERVOIR_2; - dgActiveReservoir = DG_RESERVOIR_2; + dgActiveReservoir = DG_RESERVOIR_2; dgDialysateTemp = 0.0F; dgCurrentOpMode = DG_MODE_INIT; dgSubMode = 0; @@ -1020,19 +1020,18 @@ /*********************************************************************//** * @brief - * The cmdStartDGHeatDisinfect function sends a start heat disinfect - * command message to the DG. + * The cmdStartDGHeatDisinfectActiveCool function sends a start heat disinfect + * with active cool command message to the DG. * @details Inputs: none * @details Outputs: start heat disinfect mode command sent to DG. * @return none *************************************************************************/ -void cmdStartDGHeatDisinfect( void ) +void cmdStartDGHeatDisinfectActiveCool( void ) { BOOL start = TRUE; - dgCmdResp[ DG_CMD_START_HEAT_DISINFECT ].commandID = DG_CMD_NONE; - - sendDGStartHeatDisinfectModeCommand( start ); + dgCmdResp[ DG_CMD_START_HEAT_DISINFECT_ACTIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStartHeatDisinfectActiveCoolModeCommand( start ); } /*********************************************************************//** @@ -1049,11 +1048,27 @@ dgCmdResp[ DG_CMD_STOP_HEAT_DISINFECT ].commandID = DG_CMD_NONE; - sendDGStartHeatDisinfectModeCommand( start ); + sendDGStartHeatDisinfectActiveCoolModeCommand( start ); } /*********************************************************************//** * @brief + * The cmdStartDGHeatDisinfectPassiveCool function sends a start + * heat disinfect with passive cool command message to DG. + * @details Inputs: none + * @details Outputs: start heat disinfect with passive cool mode command sent to DG. + * @return none + *************************************************************************/ +void cmdStartDGHeatDisinfectPassiveCool( void ) +{ + BOOL start = TRUE; + + dgCmdResp[ DG_CMD_START_HEAT_DISINFECT_PASSIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStartHeatDisinfectPassiveCoolModeCommand( start ); +} + +/*********************************************************************//** + * @brief * The cmdStartDGChemicalDisinfect function sends a start chemical disinfect * command message to the DG. * @details Inputs: none @@ -1118,6 +1133,22 @@ /*********************************************************************//** * @brief + * The cmdStartDGActiveCool function sends a start active cool command + * message to the DG. + * @details Inputs: none + * @details Outputs: start active cool mode command sent to DG. + * @return none + *************************************************************************/ +void cmdStartDGActiveCool( void ) +{ + BOOL start = TRUE; + + dgCmdResp[ DG_CMD_START_ACTIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStopActiveCoolModeCommand( start ); +} + +/*********************************************************************//** + * @brief * The cmdStopDGActiveCool function sends a stop active cool command * message to the DG. * @details Inputs: none @@ -1126,8 +1157,10 @@ *************************************************************************/ void cmdStopDGActiveCool( void ) { + BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_ACTIVE_COOL ].commandID = DG_CMD_NONE; - sendDGStopActiveCoolModeCommand(); + sendDGStopActiveCoolModeCommand( start ); } /*********************************************************************//**