Index: firmware/App/Modes/TreatmentEnd.c =================================================================== diff -u -r1a36e9bd718b40ceaee21dd12eca2da353828e30 -r0bb3fe3f34c02bd19c36aff2b98876e46a2ad177 --- firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision 1a36e9bd718b40ceaee21dd12eca2da353828e30) +++ firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision 0bb3fe3f34c02bd19c36aff2b98876e46a2ad177) @@ -271,6 +271,20 @@ { signalGoToRinseback(); } + // set BP to air trap fill rate if air trap fill has been initiated + else if ( TRUE == isAirTrapFillInProgress() ) + { + if ( 0 == getTargetBloodFlowRate() ) + { + setBloodPumpTargetFlowRate( AIR_TRAP_FILL_BLOOD_FLOW_RATE, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + } + } + // re-open VBV and restore BP rate after air trap fill + else if ( VALVE_POSITION_C_CLOSE == getSetValvePosition( VBV ) ) + { + setValvePosition( VBV, VALVE_POSITION_B_OPEN ); + setBloodPumpTargetFlowRate( TX_END_BP_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + } return result; }