Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rd9d085cdca67200ecddbdfbc75c489e704b23081 -r37a8a58b766a496b39241dd7ae46dc10dbda35e4 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision d9d085cdca67200ecddbdfbc75c489e704b23081) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 37a8a58b766a496b39241dd7ae46dc10dbda35e4) @@ -85,9 +85,8 @@ * 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 ) @@ -124,9 +123,8 @@ * 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 ) @@ -139,9 +137,8 @@ * 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. + * @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) @@ -175,9 +172,8 @@ * 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 ) @@ -205,9 +201,8 @@ * 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 ) @@ -224,9 +219,8 @@ /*********************************************************************//** * @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 ) @@ -237,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 ) @@ -250,9 +243,8 @@ /*********************************************************************//** * @brief * The getSalineBolusState function gets the current saline bolus state. - * @details - * Inputs : currentSalineBolusState - * Outputs : none + * @details Inputs: currentSalineBolusState + * @details Outputs: none * @return currentSalineBolusState *************************************************************************/ SALINE_BOLUS_STATE_T getSalineBolusState( void ) @@ -264,9 +256,8 @@ * @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 ) @@ -279,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 ) @@ -328,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 ) @@ -379,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 ) @@ -414,9 +402,8 @@ * @brief * 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 ) @@ -457,9 +444,8 @@ * @brief * The handleDialysisSolutionInfusionState function handles the solution * infustion state of the Dialysis state machine. - * @details - * Inputs : currentSalineBolusState - * Outputs : currentSalineBolusState + * @details Inputs: currentSalineBolusState + * @details Outputs: currentSalineBolusState * @return next Dialysis state. *************************************************************************/ static DIALYSIS_STATE_T handleDialysisSalineBolusState( void ) @@ -475,9 +461,8 @@ * @brief * 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. *************************************************************************/ @@ -503,9 +488,8 @@ * @brief * 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 ) @@ -529,9 +513,8 @@ * @brief * 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 + * @details Inputs: ms timer, lastUFTimeStamp + * @details Outputs: UF timer incremented, UF volumes updated and provided to DPo * pump controller. * @return next ultrafiltration state. *************************************************************************/ @@ -571,9 +554,8 @@ * @brief * 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 ) @@ -590,9 +572,8 @@ * @brief * 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 ) @@ -609,9 +590,8 @@ * @brief * 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 - * Outputs : uFAccuracyCheckTimerCtr, lastUFVolumeChecked + * @details Inputs: uFAccuracyCheckTimerCtr, lastUFVolumeChecked, measUFVolume + * @details Outputs: uFAccuracyCheckTimerCtr, lastUFVolumeChecked * @return none *************************************************************************/ static void checkUFAccuracyAndVolume( void ) @@ -657,9 +637,8 @@ * 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 ) @@ -688,9 +667,8 @@ * 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 ) @@ -720,9 +698,8 @@ * 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 ) @@ -739,9 +716,8 @@ * 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 )