Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r5bebdd7e61c161919563a4e42f3c98c28f47c44c -r120573ab7363419c239e1e933bafdea764e35fc5 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 5bebdd7e61c161919563a4e42f3c98c28f47c44c) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 120573ab7363419c239e1e933bafdea764e35fc5) @@ -1679,17 +1679,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 { state = WET_SELF_TESTS_STOPPED_STATE; setupForSelfTestsStop(); @@ -2102,6 +2114,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 );