Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r44c977966ab7cfecbfbf5110e6abe4ec45ebab62 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 44c977966ab7cfecbfbf5110e6abe4ec45ebab62) @@ -32,24 +32,24 @@ // ********** private definitions ********** -#define MIN_RESERVOIR_VOLUME_ML 0 ///< Minimum reservoir volume in mL. -#define MAX_RESERVOIR_VOLUME_ML 2000 ///< Maximum reservoir volume in mL. -#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 MAX_DRAIN_VOLUME_ML MAX_RESERVOIR_VOLUME_ML ///> Maximum drain volume in mL. -#define MIN_DRAIN_VOLUME_ML 100 ///> Minimum drain volume in mL. +#define MIN_RESERVOIR_VOLUME_ML 0 ///< Minimum reservoir volume in mL. +#define MAX_RESERVOIR_VOLUME_ML 2000 ///< Maximum reservoir volume in mL. +#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 MAX_DRAIN_VOLUME_ML MAX_RESERVOIR_VOLUME_ML ///> Maximum drain volume in mL. +#define MIN_DRAIN_VOLUME_ML 100 ///> Minimum drain volume in mL. -#define RESERVOIR_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< interval (ms/task time) at which the reservoir data is published on the CAN bus. +#define RESERVOIR_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< interval (ms/task time) at which the reservoir data is published on the CAN bus. // ********** private data ********** -static U32 reservoirDataPublicationTimerCounter = 0; ///< used to schedule reservoir data publication to CAN bus. +static U32 reservoirDataPublicationTimerCounter = 0; ///< used to schedule reservoir data publication to CAN bus. -static OVERRIDE_U32_T activeReservoir = { 0, 0, 0, 0 }; ///< The active reservoir that the DG is filling/draining/etc. -static OVERRIDE_U32_T fillVolumeTargetMl = { 0, 0, 0, 0 }; ///< The target reservoir fill volume (in mL). -static OVERRIDE_U32_T drainVolumeTargetMl = { 0, 0, 0, 0 }; ///< The target reservoir drain volume (in mL). +static OVERRIDE_U32_T activeReservoir = { 0, 0, 0, 0 }; ///< The active reservoir that the DG is filling/draining/etc. +static OVERRIDE_U32_T fillVolumeTargetMl = { 0, 0, 0, 0 }; ///< The target reservoir fill volume (in mL). +static OVERRIDE_U32_T drainVolumeTargetMl = { 0, 0, 0, 0 }; ///< The target reservoir drain volume (in mL). // ********** private function prototypes ********** @@ -58,7 +58,7 @@ * The initReservoirs function initializes the Reservoirs module. * @details * Inputs : none - * Outputs : Reservoirs module initialized. + * Outputs : Reservoirs module initialized * @return none *************************************************************************/ void initReservoirs( void ) @@ -77,7 +77,7 @@ * The execReservoirs function manages periodic tasks for the Reservoirs module. * @details * Inputs : none - * Outputs : Reservoir data broadcast on interval. + * Outputs : Reservoir data broadcast on interval * @return none *************************************************************************/ void execReservoirs( void ) @@ -95,7 +95,7 @@ /*********************************************************************//** * @brief - * The setActiveReservoir function sets the given reservoir as active \n + * The setActiveReservoir function sets the given reservoir as active * (meaning HD will be drawing from this reservoir). * @details * Inputs : none @@ -193,10 +193,10 @@ /*********************************************************************//** * @brief - * The startDrain function handles a fill command from the HD + * The startDrain function handles a drain command from the HD. * @details * Inputs : none - * Outputs : + * Outputs : Start draining in re-circulate mode * @param drainToVolMl Target volume (in mL) to drain reservoir to * @return TRUE if drain command successful, FALSE if not. *************************************************************************/ @@ -244,7 +244,7 @@ /*********************************************************************//** * @brief - * The startTrimmerHeater function handles a start trimmer heater command \n + * The startTrimmerHeater function handles a start trimmer heater command * from the HD. * @details * Inputs : none @@ -262,7 +262,7 @@ /*********************************************************************//** * @brief - * The stopTrimmerHeater function handles a stop trimmer heater command \n + * The stopTrimmerHeater function handles a stop trimmer heater command * from the HD. * @details * Inputs : none @@ -278,10 +278,6 @@ return result; } -/************************************************************************* - * GET SUPPORT FUNCTIONS - *************************************************************************/ - /*********************************************************************//** * @brief * The getActiveReservoir function gets the active reservoir. @@ -304,8 +300,7 @@ /*********************************************************************//** * @brief - * The getReservoirFillVolumeTargetMl function gets the reservoir fill \n - * volume (in mL). + * The getReservoirFillVolumeTargetMl function gets the reservoir fill volume (in mL). * @details * Inputs : fillVolumeTargetMl * Outputs : none @@ -325,8 +320,7 @@ /*********************************************************************//** * @brief - * The getReservoirDrainVolumeTargetMl function gets the reservoir drain \n - * volume (in mL). + * The getReservoirDrainVolumeTargetMl function gets the reservoir drain volume (in mL). * @details * Inputs : drainVolumeTargetMl * Outputs : none @@ -343,17 +337,16 @@ return result; } + - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ + - /*********************************************************************//** * @brief - * The testSetDGActiveReservoirOverride function overrides the active \n - * reservoir. + * The testSetDGActiveReservoirOverride function overrides the active reservoir. * @details * Inputs : activeReservoir * Outputs : activeReservoir @@ -376,8 +369,7 @@ /*********************************************************************//** * @brief - * The activeReservoir function resets the override of the active \n - * reservoir. + * The activeReservoir function resets the override of the active reservoir. * @details * Inputs : activeReservoir * Outputs : activeReservoir @@ -399,7 +391,7 @@ /*********************************************************************//** * @brief - * The testSetReservoirFillVolumeMlOverride function overrides the target \n + * The testSetReservoirFillVolumeMlOverride function overrides the target * reservoir fill volume (in mL). * @details * Inputs : fillVolumeTargetMl @@ -423,8 +415,8 @@ /*********************************************************************//** * @brief - * The testResetReservoirFillVolumeMlOverride function resets the override of the \n - * target reservoir fill volume. + * The testResetReservoirFillVolumeMlOverride function resets the override of + * the target reservoir fill volume. * @details * Inputs : fillVolumeTargetMl * Outputs : fillVolumeTargetMl @@ -446,7 +438,7 @@ /*********************************************************************//** * @brief - * The testSetReservoirDrainVolumeMlOverride function overrides the target \n + * The testSetReservoirDrainVolumeMlOverride function overrides the target * reservoir drain volume (in mL). * @details * Inputs : drainVolumeTargetMl @@ -470,8 +462,8 @@ /*********************************************************************//** * @brief - * The testResetReservoirDrainVolumeMlOverride function resets the override of the \n - * target reservoir drain volume. + * The testResetReservoirDrainVolumeMlOverride function resets the override of + * the target reservoir drain volume. * @details * Inputs : drainVolumeTargetMl * Outputs : drainVolumeTargetMl