Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r12dadcaf597ba93fb51ef8f266d20ad2268ca6a7 -r8b2b7d9ab19623b169cf5a48c3cc268ba398d915 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 12dadcaf597ba93fb51ef8f266d20ad2268ca6a7) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 8b2b7d9ab19623b169cf5a48c3cc268ba398d915) @@ -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. @@ -348,10 +348,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 @@ -428,6 +454,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;