Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r82cefc09d89b0bdf8e45578d14ad9bdd68027fab -r021e6ea5f99fd6da424d8ab81d6a106f2cb41294 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 82cefc09d89b0bdf8e45578d14ad9bdd68027fab) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 021e6ea5f99fd6da424d8ab81d6a106f2cb41294) @@ -38,7 +38,7 @@ #define DEFAULT_FILL_VOLUME_ML 1700 ///< Default fill volume for treatment in mL. #define DISINFECT_FILL_VOLUME_ML 2400 ///< Fill volume for disinfection in mL. #define MAX_FILL_VOLUME_ML MAX_RESERVOIR_VOLUME_ML ///< Maximum fill volume in mL. -#define DEFAULT_DRAIN_VOLUME_ML 100 ///< Default drain volume in mL. +#define DEFAULT_DRAIN_VOLUME_ML 0 ///< Default drain volume in mL. #define MAX_DRAIN_VOLUME_ML MAX_RESERVOIR_VOLUME_ML ///< Maximum drain volume in mL. #define MAX_RESERVOIR_WEIGHT 10000 ///< Maximum reservoir weight in grams. @@ -344,10 +344,36 @@ } sendCommandResponseMsg( &cmdResponse ); -} +} /*********************************************************************//** * @brief + * The tareReservoir function sets the tare load cell variable to TRUE. + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +void tareReservoir( void ) +{ + tareLoadCellRequest = TRUE; +} + +/*********************************************************************//** + * @brief + * The resetReservoirsLowestWeight function resets the lowest load cell + * weight of the reservoirs. + * @details Inputs: reservoirLowestWeight + * @details Outputs: reservoirLowestWeight + * @return none + *************************************************************************/ +void resetReservoirsLowestWeight( void ) +{ + reservoirLowestWeight[ DG_RESERVOIR_1 ] = MAX_RESERVOIR_WEIGHT; + reservoirLowestWeight[ DG_RESERVOIR_2 ] = MAX_RESERVOIR_WEIGHT; +} + +/*********************************************************************//** + * @brief * The getInactiveReservoir function gets the inactive reservoir. * @details Inputs: activeReservoir * @details Outputs: none @@ -424,6 +450,13 @@ if ( hasTimeOut || hasTargetReached ) { + // TODO remove Test code + if ( reservoirId == DG_RESERVOIR_1 ) + { + BOOL test = TRUE; + } + // TODO remove test code + result = TRUE; reservoirLowestWeight[ reservoirId ] = MAX_RESERVOIR_WEIGHT;