Index: firmware/App/Modes/StateTxDialysis.c =================================================================== diff -u -r9c833ef5623ce842267e284d958820ac0dc3a7fc -r9d80274d4f31715890d519f5f9fbe445c4614046 --- firmware/App/Modes/StateTxDialysis.c (.../StateTxDialysis.c) (revision 9c833ef5623ce842267e284d958820ac0dc3a7fc) +++ firmware/App/Modes/StateTxDialysis.c (.../StateTxDialysis.c) (revision 9d80274d4f31715890d519f5f9fbe445c4614046) @@ -223,14 +223,36 @@ setBloodFlowRate = bPFlow; // Make rate changes in real time if currently performing dialysis. - if ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) + if ( TREATMENT_DIALYSIS_STATE == getTreatmentState() || (TREATMENT_END_STATE==getTreatmentState() )) { setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); } } + /*********************************************************************//** * @brief + * The setDialysisBloodPumpFlowRate function sets the blood pump flow rate parameter. + * This function should be called prior to beginning dialysis treatment + * and when the user changes the blood flow rate during treatment. + * @details \b Inputs: none + * @details \b Outputs: setBloodFlowRate + * @param bPFlow target blood pump flow rate (in mL/min) + * @return none + *************************************************************************/ +void setDialysisBloodPumpFlowRateEndTx( U32 bPFlow ) +{ + setBloodFlowRate = bPFlow; + + // Make rate changes in real time if currently performing dialysis. + if ( (TREATMENT_END_STATE == getTreatmentState() )) + { + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + } +} + +/*********************************************************************//** + * @brief * The setDialysisDDParams function sets the dialysate rate and ultrafiltration * volume and rate parameters. * @details \b Inputs: none