Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r5d9f15cd25ec6c4cfff7d4fcee2fa45c6dc4c165 -r9be15d1bdc8753e159388edd75499f837c148da2 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 5d9f15cd25ec6c4cfff7d4fcee2fa45c6dc4c165) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 9be15d1bdc8753e159388edd75499f837c148da2) @@ -297,23 +297,17 @@ /*********************************************************************//** * @brief - * The setDialysisParams function sets the dialysis treatment parameters. + * 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 one or more parameters during treatment. + * and when the user changes the blood flow rate during treatment. * @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 ) +void setDialysisBloodPumpFlowRate( U32 bPFlow ) { setBloodFlowRate = bPFlow; - setDialysateFlowRate = dPFlow; - setUFVolumeML = maxUFVol; - setUFRate = uFRate; // Make rate changes in real time if currently performing dialysis. if ( ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) @@ -327,7 +321,32 @@ } #endif setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, mode ); + } +} +/*********************************************************************//** + * @brief + * The setDialysisDialInFlowAndUFRate function sets the dialysis treatment parameters. + * This function should be called prior to beginning dialysis treatment + * and when the user changes any one of the parameters during treatment. + * @details Inputs: none + * @details Outputs: dialysis treatment parameters are set. + * @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 setDialysisDialInFlowAndUFRate( U32 dPFlow, F32 maxUFVol, F32 uFRate ) +{ + setDialysateFlowRate = dPFlow; + setUFVolumeML = maxUFVol; + setUFRate = uFRate; + + // Make rate changes in real time if currently performing dialysis. + if ( ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) + { + PUMP_CONTROL_MODE_T mode = PUMP_CONTROL_MODE_CLOSED_LOOP; + #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_ENABLE_DIALYSATE_INLET_PUMP_OPEN_LOOP ) ) {