Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -rdb8b5387ab2f6d6fc72b68af1962934c3b0b7b3f -r0dafd727dbe531dbcbda2e8ff09bea69956ce9db --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision db8b5387ab2f6d6fc72b68af1962934c3b0b7b3f) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 0dafd727dbe531dbcbda2e8ff09bea69956ce9db) @@ -245,16 +245,18 @@ setValvePosition( VDO, VALVE_POSITION_A_INSERT_EJECT ); setValvePosition( VBV, VALVE_POSITION_A_INSERT_EJECT ); - if ( TRUE == dryPressureTestsCompleted ) + // If the HD has finished no cart s.t. but not dry pressure tests, Open VBT to vent pressure + // to prevent air going to the Saline bag. + if ( ( NO_CART_SELF_TESTS_COMPLETE_STATE == currentNoCartSelfTestsState ) && ( FALSE == dryPressureTestsCompleted ) ) { - setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); - setValveAirTrap( STATE_CLOSED ); + setValvePosition( VBA, VALVE_POSITION_B_OPEN ); + setValveAirTrap( STATE_OPEN ); } else { - setValvePosition( VBA, VALVE_POSITION_B_OPEN ); - setValveAirTrap( STATE_OPEN ); + setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); + setValveAirTrap( STATE_CLOSED ); } } @@ -1611,10 +1613,11 @@ checkForSyringeOcclusion( FALSE ); } - // Set VBA to Pos A after we have depressurized the line from pressure self tests - if ( TRUE == isAlarmActive( ALARM_ID_HD_PRE_TREATMENT_DRY_PRESSURE_TEST_FAILURE ) ) + // Set VBA to Pos A and close VBT after we have + // depressurized the line from failed pressure self tests. + if ( ( TRUE == isAnyAlarmActive() ) && ( FALSE == dryPressureTestsCompleted ) ) { - if ( NORMAL_PRESSURE_DIFF_TOLERANCE_MMHG >= getFilteredVenousPressure() ) + if ( getFilteredVenousPressure() =< NORMAL_PRESSURE_DIFF_TOLERANCE_MMHG ) { setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); setValveAirTrap( STATE_CLOSED );