Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r0bb3fe3f34c02bd19c36aff2b98876e46a2ad177 -r86dc010eacfdaad879327202bf03336e0c77ead3 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 0bb3fe3f34c02bd19c36aff2b98876e46a2ad177) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 86dc010eacfdaad879327202bf03336e0c77ead3) @@ -229,11 +229,26 @@ // Reset the blood leak zeroing variables resetBloodLeakZeroingVariables(); + // make sure air trap fill is handled right + if ( TRUE == isAirTrapFillInProgress() ) + { + // set BP to air trap fill rate if air trap fill has been initiated + setBloodPumpTargetFlowRate( AIR_TRAP_FILL_BLOOD_FLOW_RATE, MOTOR_DIR_FORWARD, mode ); + // close VBV for fill + setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + } + else + { + // Start blood pump at prescribed flow rate + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, mode ); + // re-open VBV for blood recirculation + setValvePosition( VBV, VALVE_POSITION_B_OPEN ); + } + // Set valves for dialysis setValvePosition( VDI, VALVE_POSITION_B_OPEN ); setValvePosition( VDO, VALVE_POSITION_B_OPEN ); setValvePosition( VBA, VALVE_POSITION_B_OPEN ); - setValvePosition( VBV, VALVE_POSITION_B_OPEN ); // Restart pumps #ifndef _RELEASE_ @@ -242,7 +257,6 @@ mode = PUMP_CONTROL_MODE_OPEN_LOOP; } #endif - setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, mode ); #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_ENABLE_DIALYSATE_INLET_PUMP_OPEN_LOOP ) ) { Index: firmware/App/Modes/TreatmentStop.c =================================================================== diff -u -rf3d625e2593ced120c4a98b9ed7e28b132445642 -r86dc010eacfdaad879327202bf03336e0c77ead3 --- firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision f3d625e2593ced120c4a98b9ed7e28b132445642) +++ firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 86dc010eacfdaad879327202bf03336e0c77ead3) @@ -186,7 +186,6 @@ setValvePosition( VBA, VALVE_POSITION_B_OPEN ); if ( TRUE == isAirTrapFillInProgress() ) { - airTrapFillInProgress = TRUE; // set BP to air trap fill rate if air trap fill has been initiated setBloodPumpTargetFlowRate( AIR_TRAP_FILL_BLOOD_FLOW_RATE, MOTOR_DIR_FORWARD, mode ); // close VBV for fill