Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r27f3db92495948d4c1192421c1b0c20338c4a034 -re8f30ca933a7c373c1a4a749ad84adb2f63b7722 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 27f3db92495948d4c1192421c1b0c20338c4a034) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision e8f30ca933a7c373c1a4a749ad84adb2f63b7722) @@ -57,7 +57,8 @@ // DG status static DG_OP_MODE_T dgCurrentOpMode = DG_MODE_INIT; ///< Current DG operation mode. -static U32 dgSubMode = 0; ///< Current state (sub-mode) of current DG operation mode. +static U32 dgSubMode = 0; ///< Current state (sub-mode) of current DG operation mode. +static BOOL dgStartCommandSent = FALSE; ///< Flag indicates command to start DG has been sent. static BOOL dgStarted = FALSE; ///< Flag indicates whether we have commanded the DG to start or stop. static BOOL dgTrimmerHeaterOn = FALSE; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. static BOOL dgWaterSampled = FALSE; ///< Flag indicates whether we have commanded the DG to sample water. @@ -734,7 +735,7 @@ *************************************************************************/ void cmdStartDG( void ) { - dgStarted = TRUE; + dgStartCommandSent = TRUE; sendDGStartStopCommand( START_DG_CMD ); } @@ -839,8 +840,22 @@ { dgCmdResp[ DG_CMD_START_FILL ].commandID = DG_CMD_NONE; dgReservoirFillVolumeTargetSet = fillToVolMl; - sendDGFillCommand( fillToVolMl ); + sendDGFillCommand( DG_CMD_START, fillToVolMl ); } + +/*********************************************************************//** + * @brief + * The cmdStopDGFill function sends a fill command with stop parameter message to the DG. + * @details Inputs: none + * @details Outputs: fill command with stop parameter sent to DG. + * @return none + *************************************************************************/ +void cmdStopDGFill( void ) +{ + dgCmdResp[ DG_CMD_STOP_FILL ].commandID = DG_CMD_NONE; + dgReservoirFillVolumeTargetSet = 0; + sendDGFillCommand( DG_CMD_STOP, 0 ); +} /*********************************************************************//** * @brief