Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -r37a8a58b766a496b39241dd7ae46dc10dbda35e4 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 37a8a58b766a496b39241dd7ae46dc10dbda35e4) @@ -8,13 +8,16 @@ * @file Dialysis.c * * @author (last) Sean Nash -* @date (last) 24-Jun-2020 +* @date (last) 03-Sep-2020 * * @author (original) Sean * @date (original) 15-Jan-2020 * ***************************************************************************/ +#include + +#include "AirTrap.h" #include "BloodFlow.h" #include "Buttons.h" #include "DGInterface.h" @@ -33,14 +36,17 @@ // ********** private definitions ********** -#define MAX_UF_RATE_ML_PER_MIN 45.83 ///< Maximum ultrafiltration rate in mL/min (2750 mL/hr). +#define MAX_UF_RATE_ML_PER_HOUR 2750.0 ///< Maximum ultrafiltration rate in mL/hour +#define MAX_UF_RATE_ACCURACY_ERROR_ML_HR 100.0 ///< Maximum ultrafiltration rate accuracy error in mL/hr over each hour of treatment. +#define MAX_UF_RATE_ACCURACY_ERROR_PCT 0.05 ///< Minimum ultrafilteration rate accuracy in percentage of set point (5%) over each hour of treatment. #define MAX_UF_ACCURACY_ERROR_ML 250.0 ///< Maximum ultrafiltration accuracy error in mL over the entire treatment. -#define UF_ACCURACY_CHECK_INTERVAL ((1 * SEC_PER_MIN * MS_PER_SECOND) / TASK_GENERAL_INTERVAL) ///< Ultrafiltration rate accuracy check interval count +#define UF_ACCURACY_CHECK_INTERVAL ((1 * MIN_PER_HOUR * SEC_PER_MIN * MS_PER_SECOND) / TASK_GENERAL_INTERVAL) ///< Ultrafiltration rate accuracy check interval count // ********** private data ********** static DIALYSIS_STATE_T currentDialysisState; ///< Current state of the dialysis sub-mode state machine. static UF_STATE_T currentUFState; ///< Current state of the ultrafiltration state machine. +static SALINE_BOLUS_STATE_T currentSalineBolusState; ///< Current state of the saline bolus state machine. static F32 refUFVolume; ///< Current reference volume for ultrafiltration (Where should we be w/r/t ultrafiltration). static F32 measUFVolume; ///< Current total measured volume for ultrafiltration (Where are we w/r/t ultrafiltration). @@ -55,14 +61,15 @@ static U32 setDialysateFlowRate; ///< Currently set dialysate flow rate (from prescription). static F32 maxUFVolumeML; ///< Currently set total ultrafiltration volume for treatment (from prescription). static F32 setUFRate; ///< Currently set ultrafiltration rate (from prescription). +static F32 maxUFRateAccuracyError_Ml_hr; ///< Minimum ultrafiltration rate accuracy over 1 hour duration (5% or 100 mL, whichever is greater). static U32 uFAccuracyCheckTimerCtr; ///< Timer counter to determine when next to check ultrafiltration accuracy. static F32 lastUFVolumeChecked; ///< Starting ultrafiltration volume for accuracy check. // ********** private function prototypes ********** static DIALYSIS_STATE_T handleDialysisUltrafiltrationState( void ); -static DIALYSIS_STATE_T handleDialysisSolutionInfusionState( void ); +static DIALYSIS_STATE_T handleDialysisSalineBolusState( void ); static UF_STATE_T handleUFStartState( void ); static UF_STATE_T handleUFPausedState( void ); @@ -75,18 +82,18 @@ /*********************************************************************//** * @brief - * The initDialysis function initializes the Dialysis sub-mode module. \n - * Calling this function will reset dialysis and therefore should only \n + * The initDialysis function initializes the Dialysis sub-mode module. + * Calling this function will reset dialysis and therefore should only * be called when a new treatment is due to begin. - * @details - * Inputs : none - * Outputs : Dialysis sub-mode module initialized. + * @details Inputs: none + * @details Outputs: Dialysis sub-mode module initialized. * @return none *************************************************************************/ void initDialysis( void ) { currentDialysisState = DIALYSIS_START_STATE; currentUFState = UF_START_STATE; + currentSalineBolusState = SALINE_BOLUS_STATE_IDLE; refUFVolume = 0.0; measUFVolume = 0.0; @@ -103,40 +110,39 @@ setDialysateFlowRate = 0; maxUFVolumeML = 0.0; setUFRate = 0.0; + maxUFRateAccuracyError_Ml_hr = MAX_UF_RATE_ACCURACY_ERROR_ML_HR; uFAccuracyCheckTimerCtr = 0; lastUFVolumeChecked = 0.0; } /*********************************************************************//** * @brief - * The transitionToDialysis function prepares for transition to dialysis sub-mode. \n - * This function will reset anything required for resuming dialysis in a \n - * treatment that has already begun. It does not reset everything as dialysis \n - * may be stopped and resumed multiple times due to alarms or user intervention \n + * The transitionToDialysis function prepares for transition to dialysis sub-mode. + * This function will reset anything required for resuming dialysis in a + * treatment that has already begun. It does not reset everything as dialysis + * may be stopped and resumed multiple times due to alarms or user intervention * and we don't want to start the treatment all over again. - * @details - * Inputs : none - * Outputs : none + * @details Inputs: none + * @details Outputs: none * @return none *************************************************************************/ void transitionToDialysis( void ) { - // TODO - anything needed here? + startAirTrapControl(); } /*********************************************************************//** * @brief - * The setDialysisParams function sets the dialysis treatment parameters. \n - * This function should be called prior to beginning dialysis treatment \n + * The setDialysisParams function sets the dialysis treatment parameters. + * This function should be called prior to beginning dialysis treatment * and when the user changes one or more parameters during treatment. - * @details - * Inputs : none - * Outputs : dialysis treatment parameters are set. - * @param bPFlow : target blood pump flow rate (in mL/min). - * @param dPFlow : target dialysate inlet pump flow rate (in mL/min). - * @param maxUFVol : maximum ultrafiltration volume (in mL). - * @param uFRate : target ultrafiltration rate (in mL/min). + * @details Inputs: none + * @details Outputs: dialysis treatment parameters are set. + * @param bPFlow target blood pump flow rate (in mL/min) + * @param dPFlow target dialysate inlet pump flow rate (in mL/min) + * @param maxUFVol maximum ultrafiltration volume (in mL) + * @param uFRate target ultrafiltration rate (in mL/min) * @return none *************************************************************************/ void setDialysisParams( U32 bPFlow, U32 dPFlow, F32 maxUFVol, F32 uFRate ) @@ -145,56 +151,76 @@ setDialysateFlowRate = dPFlow; maxUFVolumeML = maxUFVol; setUFRate = uFRate; + maxUFRateAccuracyError_Ml_hr = MAX_UF_RATE_ACCURACY_ERROR_PCT * uFRate * (F32)MIN_PER_HOUR; + maxUFRateAccuracyError_Ml_hr = MAX( maxUFRateAccuracyError_Ml_hr, MAX_UF_RATE_ACCURACY_ERROR_ML_HR ); - setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); // TODO - test code - remove later - setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); -// setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // TODO - restore these later -// setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + if ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) + { +#ifndef RUN_PUMPS_OPEN_LOOP + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); +#else + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); +#endif + setDialOutPumpTargetRate( setDialysateFlowRate + (S32)setUFRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + } } /*********************************************************************//** * @brief - * The startDialysis function starts/resumes dialysis. This function \n - * will be called by Treatment Mode when beginning or resuming dialysis \n + * The startDialysis function starts/resumes dialysis. This function + * will be called by Treatment Mode when beginning or resuming dialysis * treatment. - * @details - * Inputs : none - * Outputs : Dialysis module prepared for immediate resumption. + * @details Inputs: none + * @details Outputs: Dialysis module prepared for immediate resumption. * @return none *************************************************************************/ void startDialysis( void ) { + // set last UF timestamp so UF ref is resumed from this time lastUFTimeStamp = getMSTimerCount(); + // send dialysate outlet pump latest UF volumes setDialOutUFVolumes( refUFVolume, measUFVolume ); + // restart pumps +#ifndef RUN_PUMPS_OPEN_LOOP setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); +#else + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); +#endif setDialOutPumpTargetRate( setDialysateFlowRate + (S32)setUFRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // TODO - Heparin pump + // tell DG to start heating dialysate + cmdStartDGTrimmerHeater(); } /*********************************************************************//** * @brief - * The stopDialysis function stops dialysis. This function will be called \n - * by Treatment Mode when an alarm occurs or the user pressed the stop button. \n + * The stopDialysis function stops dialysis. This function will be called + * by Treatment Mode when an alarm occurs or the user pressed the stop button. * Dialysis may be resumed later. - * @details - * Inputs : none - * Outputs : Blood and dialysate pumps stopped. Heparin pump stopped. + * @details Inputs: none + * @details Outputs: Blood and dialysate pumps stopped. Heparin pump stopped. * @return none *************************************************************************/ void stopDialysis( void ) { - setBloodPumpTargetFlowRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - setDialInPumpTargetFlowRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + // stop pumps + setBloodPumpTargetFlowRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + setDialInPumpTargetFlowRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); setDialOutPumpTargetRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + // TODO - stop Heparin pump + // tell DG to stop heating dialysate + cmdStopDGTrimmerHeater(); } /*********************************************************************//** * @brief * The getDialysisState function gets the current dialysis state (sub-mode). - * @details - * Inputs : currentDialysisState - * Outputs : none + * @details Inputs: currentDialysisState + * @details Outputs: none * @return currentDialysisState *************************************************************************/ DIALYSIS_STATE_T getDialysisState( void ) @@ -205,9 +231,8 @@ /*********************************************************************//** * @brief * The getUltrafiltrationState function gets the current ultrafiltration state. - * @details - * Inputs : currentUFState - * Outputs : none + * @details Inputs: currentUFState + * @details Outputs: none * @return currentUFState *************************************************************************/ UF_STATE_T getUltrafiltrationState( void ) @@ -217,11 +242,22 @@ /*********************************************************************//** * @brief - * The getUltrafiltrationVolumeCollected function gets the current ultrafiltration \n + * The getSalineBolusState function gets the current saline bolus state. + * @details Inputs: currentSalineBolusState + * @details Outputs: none + * @return currentSalineBolusState + *************************************************************************/ +SALINE_BOLUS_STATE_T getSalineBolusState( void ) +{ + return currentSalineBolusState; +} + +/*********************************************************************//** + * @brief + * The getUltrafiltrationVolumeCollected function gets the current ultrafiltration * volume collected so far for current treatment. - * @details - * Inputs : measUFVolume, measUFVolumeFromPriorReservoirs - * Outputs : none + * @details Inputs: measUFVolume, measUFVolumeFromPriorReservoirs + * @details Outputs: none * @return currentUFState *************************************************************************/ F32 getUltrafiltrationVolumeCollected( void ) @@ -234,9 +270,8 @@ /*********************************************************************//** * @brief * The pauseUF function pauses ultrafiltration. - * @details - * Inputs : currentDialysisState, currentUFState - * Outputs : currentUFState, outlet pump set point + * @details Inputs: currentDialysisState, currentUFState + * @details Outputs: currentUFState, outlet pump set point * @return TRUE if pause successful, FALSE if not *************************************************************************/ BOOL pauseUF( void ) @@ -283,9 +318,8 @@ /*********************************************************************//** * @brief * The resumeUF function resumes ultrafiltration. - * @details - * Inputs : currentDialysisState, currentUFState - * Outputs : currentUFState, outlet pump set point + * @details Inputs: currentDialysisState, currentUFState + * @details Outputs: currentUFState, outlet pump set point * @return TRUE if resume successful, FALSE if not *************************************************************************/ BOOL resumeUF( void ) @@ -334,9 +368,8 @@ /*********************************************************************//** * @brief * The execDialysis function executes the Dialysis sub-mode state machine. - * @details - * Inputs : currentDialysisState - * Outputs : currentDialysisState + * @details Inputs: currentDialysisState + * @details Outputs: currentDialysisState * @return none *************************************************************************/ void execDialysis( void ) @@ -355,8 +388,8 @@ currentDialysisState = handleDialysisUltrafiltrationState(); break; - case DIALYSIS_SOLUTION_INFUSION_STATE: - currentDialysisState = handleDialysisSolutionInfusionState(); + case DIALYSIS_SALINE_BOLUS_STATE: + currentDialysisState = handleDialysisSalineBolusState(); break; default: @@ -367,11 +400,10 @@ /*********************************************************************//** * @brief - * The handleDialysisUltrafiltrationState function handles the ultrafiltration \n + * The handleDialysisUltrafiltrationState function handles the ultrafiltration * state of the Dialysis state machine. - * @details - * Inputs : currentUFState - * Outputs : currentUFState + * @details Inputs: currentUFState + * @details Outputs: currentUFState * @return next Dialysis state. *************************************************************************/ static DIALYSIS_STATE_T handleDialysisUltrafiltrationState( void ) @@ -410,16 +442,15 @@ /*********************************************************************//** * @brief - * The handleDialysisSolutionInfusionState function handles the solution \n + * The handleDialysisSolutionInfusionState function handles the solution * infustion state of the Dialysis state machine. - * @details - * Inputs : TBD - * Outputs : TBD + * @details Inputs: currentSalineBolusState + * @details Outputs: currentSalineBolusState * @return next Dialysis state. *************************************************************************/ -static DIALYSIS_STATE_T handleDialysisSolutionInfusionState( void ) +static DIALYSIS_STATE_T handleDialysisSalineBolusState( void ) { - DIALYSIS_STATE_T result = DIALYSIS_SOLUTION_INFUSION_STATE; + DIALYSIS_STATE_T result = DIALYSIS_SALINE_BOLUS_STATE; // TODO - @@ -428,11 +459,10 @@ /*********************************************************************//** * @brief - * The handleUFStartState function handles the Start state of the \n + * The handleUFStartState function handles the Start state of the * ultrafiltration state machine. - * @details - * Inputs : maxUFVolumeML - * Outputs : if ultrafiltration prescribed, ultrafiltration time is + * @details Inputs: maxUFVolumeML + * @details Outputs: if ultrafiltration prescribed, ultrafiltration time is * initialized. * @return next ultrafiltration state. *************************************************************************/ @@ -456,11 +486,10 @@ /*********************************************************************//** * @brief - * The handleUFPausedState function handles the Paused state of the \n + * The handleUFPausedState function handles the Paused state of the * ultrafiltration state machine. - * @details - * Inputs : none - * Outputs : if ultrafiltration resumption requested, UF time is set to resume. + * @details Inputs: none + * @details Outputs: if ultrafiltration resumption requested, UF time is set to resume. * @return next ultrafiltration state. *************************************************************************/ static UF_STATE_T handleUFPausedState( void ) @@ -482,11 +511,10 @@ /*********************************************************************//** * @brief - * The handleUFRunningState function handles the Running state of the \n + * The handleUFRunningState function handles the Running state of the * ultrafiltration state machine. - * @details - * Inputs : ms timer, lastUFTimeStamp - * Outputs : UF timer incremented, UF volumes updated and provided to DPo \n + * @details Inputs: ms timer, lastUFTimeStamp + * @details Outputs: UF timer incremented, UF volumes updated and provided to DPo * pump controller. * @return next ultrafiltration state. *************************************************************************/ @@ -524,11 +552,10 @@ /*********************************************************************//** * @brief - * The handleUFCompletedOrOffState function handles the UF Off state \n + * The handleUFCompletedOrOffState function handles the UF Off state * of the ultrafiltration state machine. - * @details - * Inputs : none - * Outputs : UF volumes updated and provided to DPo pump controller. + * @details Inputs: none + * @details Outputs: UF volumes updated and provided to DPo pump controller. * @return next ultrafiltration state *************************************************************************/ static UF_STATE_T handleUFOffState( void ) @@ -543,11 +570,10 @@ /*********************************************************************//** * @brief - * The handleUFCompletedState function handles the UF Completed \n + * The handleUFCompletedState function handles the UF Completed * state of the ultrafiltration state machine. This is a terminal state. - * @details - * Inputs : none - * Outputs : UF volumes updated and provided to DPo pump controller. + * @details Inputs: none + * @details Outputs: UF volumes updated and provided to DPo pump controller. * @return next ultrafiltration state *************************************************************************/ static UF_STATE_T handleUFCompletedState( void ) @@ -562,50 +588,57 @@ /*********************************************************************//** * @brief - * The checkUF function checks ultrafiltration accuracy for the last \n - * minute and checks total UF volume. Triggers an alarm if out of spec. - * @details - * Inputs : uFAccuracyCheckTimerCtr, lastUFVolumeChecked, measUFVolume - * Outputs : uFAccuracyCheckTimerCtr, lastUFVolumeChecked + * The checkUF function checks ultrafiltration accuracy for the last + * hour and checks total UF volume. Triggers an alarm if out of spec. + * @details Inputs: uFAccuracyCheckTimerCtr, lastUFVolumeChecked, measUFVolume + * @details Outputs: uFAccuracyCheckTimerCtr, lastUFVolumeChecked * @return none *************************************************************************/ static void checkUFAccuracyAndVolume( void ) { - // check UF accuracy at 1 minute intervals - if ( ++uFAccuracyCheckTimerCtr >= UF_ACCURACY_CHECK_INTERVAL ) - { - F32 uFMeasRate = measUFVolume - lastUFVolumeChecked; + F32 uFMeasRate = measUFVolume - lastUFVolumeChecked; - // check UF max rate - if ( uFMeasRate > MAX_UF_RATE_ML_PER_MIN ) - { + // check max UF rate in last hour // TODO - is this check necessary considering next check below is a tighter check on this? +// if ( uFMeasRate > MAX_UF_RATE_ML_PER_HOUR ) +// { +//#ifndef DISABLE_UF_ALARMS +// SET_ALARM_WITH_1_F32_DATA( ALARM_ID_UF_RATE_TOO_HIGH_ERROR, uFMeasRate ); +//#endif +// } + + // check UF rate diff from target in last hour + if ( uFMeasRate > maxUFRateAccuracyError_Ml_hr ) + { #ifndef DISABLE_UF_ALARMS - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_UF_RATE_TOO_HIGH_ERROR, uFMeasRate ); + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_UF_RATE_TOO_HIGH_ERROR, uFMeasRate ); #endif + } + // if actively performing ultrafiltration right now, increment timer and see if time to start another 1 hour check period + if ( UF_RUNNING_STATE == currentUFState ) + { + if ( ++uFAccuracyCheckTimerCtr >= UF_ACCURACY_CHECK_INTERVAL ) + { + // reset for next check interval + lastUFVolumeChecked = measUFVolume; + uFAccuracyCheckTimerCtr = 0; } - // reset for next check - lastUFVolumeChecked = measUFVolume; - uFAccuracyCheckTimerCtr = 0; } // check total UF volume error - if ( ( FABS( refUFVolume - measUFVolume ) ) >= (F32)MAX_UF_ACCURACY_ERROR_ML ) + if ( ( fabs( refUFVolume - measUFVolume ) ) >= (F32)MAX_UF_ACCURACY_ERROR_ML ) { -#ifndef DISABLE_UF_ALARMS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_UF_VOLUME_ACCURACY_ERROR, refUFVolume, measUFVolume ); -#endif } } /*********************************************************************//** * @brief - * The updateUFVolumes function updates the ultrafiltration volumes based on \n - * set UF rate, latest UF elapsed time, and the latest load cell weight for the \n - * currently used reservoir. Updated UF volumes are then sent to the dialysate \n + * The updateUFVolumes function updates the ultrafiltration volumes based on + * set UF rate, latest UF elapsed time, and the latest load cell weight for the + * currently used reservoir. Updated UF volumes are then sent to the dialysate * outlet pump controller. - * @details - * Inputs : setUFRate, uFTimeMS, load cell weight - * Outputs : refUFVolume, measUFVolume + * @details Inputs: setUFRate, uFTimeMS, load cell weight + * @details Outputs: refUFVolume, measUFVolume * @return none *************************************************************************/ static void updateUFVolumes( void ) @@ -631,12 +664,11 @@ /*********************************************************************//** * @brief - * The setStartReservoirVolume function updates the baseline volume of the \n - * next reservoir to be drawn from before it is switched to (i.e. while it \n + * The setStartReservoirVolume function updates the baseline volume of the + * next reservoir to be drawn from before it is switched to (i.e. while it * is the inactive reservoir) in order to get a more stable volume. - * @details - * Inputs : active reservoir, load cell reading from inactive reservoir - * Outputs : resStartVolume[] + * @details Inputs: active reservoir, load cell reading from inactive reservoir + * @details Outputs: resStartVolume[] * @return none *************************************************************************/ void setStartReservoirVolume( void ) @@ -663,12 +695,11 @@ /*********************************************************************//** * @brief - * The signalReservoirsSwitched function informs this module that the \n - * reservoirs have been switched. The UF volume from prior reservoirs is \n + * The signalReservoirsSwitched function informs this module that the + * reservoirs have been switched. The UF volume from prior reservoirs is * tentatively added to with a load cell reading of the inactive reservoir. - * @details - * Inputs : resFinalVolume[], resStartVolume[] - * Outputs : measUFVolumeFromPriorReservoirs + * @details Inputs: resFinalVolume[], resStartVolume[] + * @details Outputs: measUFVolumeFromPriorReservoirs * @return none *************************************************************************/ void signalReservoirsSwitched( void ) @@ -682,12 +713,11 @@ /*********************************************************************//** * @brief - * The setFinalReservoirVolume function updates the UF volume from prior reservoirs \n - * with a more stable final reservoir volume of the prior reservoir after it's \n + * The setFinalReservoirVolume function updates the UF volume from prior reservoirs + * with a more stable final reservoir volume of the prior reservoir after it's * had a moment to settle. - * @details - * Inputs : active reservoir, load cell reading from inactive reservoir - * Outputs : measUFVolumeFromPriorReservoirs, resFinalVolume[], resStartVolume[] + * @details Inputs: active reservoir, load cell reading from inactive reservoir + * @details Outputs: measUFVolumeFromPriorReservoirs, resFinalVolume[], resStartVolume[] * @return none *************************************************************************/ void setFinalReservoirVolume( void )