Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r68115981be5fff762a3ef52340f69c28d5d3a5c4 -rbbc304907e84a573471601c0b31bb6846527dea7 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 68115981be5fff762a3ef52340f69c28d5d3a5c4) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision bbc304907e84a573471601c0b31bb6846527dea7) @@ -1683,17 +1683,29 @@ if ( BUBBLE_NOT_DETECTED == ADVBubbleStatus ) { - if ( TRUE == zeroBloodLeak() ) + if ( FALSE == isAlarmActive( ALARM_ID_HD_PRE_TREATMENT_WET_PRIME_TEST_FAILURE ) ) { - state = WET_SELF_TESTS_BLOOD_LEAK_DETECTOR_STATE; + if ( TRUE == zeroBloodLeak() ) + { + state = WET_SELF_TESTS_BLOOD_LEAK_DETECTOR_STATE; // all is good to go to the next state + } } + else + { // Stick in this state, until bubbles no longer detected/Alarm cleared + if ( STATE_CLOSED == getSwitchStatus( PUMP_TRACK_SWITCH ) ) // Spurious bubble alarms occur when the cartridge is disturbed (unlatched) + { + clearAlarmCondition( ALARM_ID_HD_PRE_TREATMENT_WET_PRIME_TEST_FAILURE ); + } + } } - else if ( STATE_CLOSED == getSwitchStatus( PUMP_TRACK_SWITCH ) ) + else { - activateAlarmNoData( ALARM_ID_HD_PRE_TREATMENT_WET_PRIME_TEST_FAILURE ); + if ( STATE_CLOSED == getSwitchStatus( PUMP_TRACK_SWITCH ) ) + { + activateAlarmNoData( ALARM_ID_HD_PRE_TREATMENT_WET_PRIME_TEST_FAILURE ); + } } - - if ( TRUE == doesAlarmStatusIndicateStop() ) + if ( TRUE == doesAlarmStatusIndicateStop() ) // WET_PRIME_TEST_FAILURE will force the self-tests to stop { checkpointWetSelfTestsState = WET_SELF_TESTS_PRIME_CHECK_STATE; state = WET_SELF_TESTS_STOPPED_STATE; @@ -2114,6 +2126,13 @@ if ( TRUE == selfTestsResumeRequested ) { + if ( BUBBLE_NOT_DETECTED == getBubbleStatus( ADV ) ) + { + if ( STATE_CLOSED == getSwitchStatus( PUMP_TRACK_SWITCH ) ) // Spurious bubble alarms occur when the cartridge is disturbed (unlatched) + { + clearAlarmCondition( ALARM_ID_HD_PRE_TREATMENT_WET_PRIME_TEST_FAILURE ); + } + } // Restart self-test start time selfTestStartTime = getMSTimerCount(); doorClosedRequired( TRUE, TRUE );