Index: firmware/App/Services/StateServices/FluidBolus.c =================================================================== diff -u -rcaecaed1083ad192dfdc034cdee6084c7b8629d2 -r5ace05425139aa4c64318ecd3b90782e01ef2f7d --- firmware/App/Services/StateServices/FluidBolus.c (.../FluidBolus.c) (revision caecaed1083ad192dfdc034cdee6084c7b8629d2) +++ firmware/App/Services/StateServices/FluidBolus.c (.../FluidBolus.c) (revision 5ace05425139aa4c64318ecd3b90782e01ef2f7d) @@ -279,10 +279,6 @@ cmdSubstitutionRate( 0.0F ); bolusVolumeLastUpdateTimeStamp = getMSTimerCount(); - // Set arterial & venous valves - setValvePosition( H1_VALV, VALVE_POSITION_C_CLOSE ); - setValvePosition( H19_VALV, VALVE_POSITION_C_CLOSE ); - // Initiate pressure stabilization signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); state = FLUID_BOLUS_WAIT_FOR_PUMPS_STOP_STATE; @@ -356,6 +352,19 @@ FLUID_BOLUS_STATE_T state = FLUID_BOLUS_IN_PROGRESS_STATE; F32 bolusTargetVolume = (F32)getTreatmentParameterU32( TREATMENT_PARAM_FLUID_BOLUS_VOLUME ); + // TODO + // Track live blood flow rate changes so pump command and volume integration stay in sync + targetBloodFlowMLPM = getTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW ); + + if ( FLUID_TYPE_SALINE == fluidType ) + { + setBloodPumpTargetFlowRate( targetBloodFlowMLPM, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + } + else + { + cmdSubstitutionRate( (F32)targetBloodFlowMLPM ); + } + updateFluidBolusVolumeDelivered(); if ( FLUID_TYPE_SALINE == fluidType )