Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -ra7675f3c917b632cf16207fc7ccfc1f38eb83f9b -rcc7f1bd82e346521f0102b3398bd030fb3bb0e6f --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision a7675f3c917b632cf16207fc7ccfc1f38eb83f9b) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision cc7f1bd82e346521f0102b3398bd030fb3bb0e6f) @@ -41,7 +41,7 @@ #define PUMP_RUN_SELF_TEST_TIME_MS ( 15 * MS_PER_SECOND ) ///< Self-test time to run pumps in ms. #define PUMP_SELF_TEST_FLOW_RATE_ML_MIN 100 ///< Self-test pump flow rate in mL/min. -#define SYRINGE_PUMP_OCCLUSION_CHECK_DELAY ( 3 * MS_PER_SECOND ) ///< Delay 3 seconds then check for syringe pump prime occlusion. +#define SYRINGE_PUMP_OCCLUSION_CHECK_DELAY ( 1 * MS_PER_SECOND ) ///< Delay 3 seconds then check for syringe pump prime occlusion. #define BLOOD_PUMP_RUN_TIME_PRESSURE_SELF_TEST ( 5 * MS_PER_SECOND ) ///< Pressure self-test time to run blood pump in ms. #define NORMALIZED_PRESSURE_SELF_TEST_TIME ( 4 * MS_PER_SECOND ) ///< Time to wait for pressure to normalize in ms. @@ -344,7 +344,7 @@ } else { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_NO_CART_SELF_TEST_TIMEOUT, currentNoCartSelfTestsState ); +// SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_NO_CART_SELF_TEST_TIMEOUT, currentNoCartSelfTestsState ); } } } @@ -863,10 +863,10 @@ { state = DRY_SELF_TESTS_OCCLUSION_SENSORS_STATE; } - else - { - activateAlarmNoData( ALARM_ID_INSTALL_NEW_CARTRIDGE ); - } +// else +// { +// activateAlarmNoData( ALARM_ID_INSTALL_NEW_CARTRIDGE ); +// } if ( TRUE == doesAlarmStatusIndicateStop() ) { @@ -1011,8 +1011,8 @@ { if ( TRUE == isSyringePumpPrimed() ) { + syringeOcclusionDelayStartTime = getMSTimerCount(); // Get the current time to check for occlusion after 1 second has elapsed state = DRY_SELF_TESTS_SYRINGE_PUMP_OCCLUSION_DETECTION_STATE; - syringeOcclusionDelayStartTime = getMSTimerCount(); // Get the current time to check for occlusion after 3 seconds has elapsed } else { @@ -1056,11 +1056,15 @@ if ( TRUE == didTimeout( syringeOcclusionDelayStartTime, SYRINGE_PUMP_OCCLUSION_CHECK_DELAY ) ) { - checkForPrimeOcclusion(); - state = DRY_SELF_TESTS_COMPLETE_STATE; + if ( FALSE == checkForPrimeOcclusion() ) // transition to complete state only when occlusion is removed + { + // clear the occlusion alarm condition to allow user to resume + clearAlarmCondition( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION ); // Resume option will appear + state = DRY_SELF_TESTS_COMPLETE_STATE; + } } - if ( TRUE == doesAlarmStatusIndicateStop() ) + if ( ( TRUE == doesAlarmStatusIndicateStop() ) && ( FALSE == isAlarmActive( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION ) ) ) { state = DRY_SELF_TESTS_STOPPED_STATE; setupForSelfTestsStop(); @@ -1087,6 +1091,7 @@ if ( TRUE == selfTestsResumeRequested ) { selfTestsResumeRequested = FALSE; + #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) != SW_CONFIG_ENABLE_VALUE ) { @@ -1276,7 +1281,7 @@ if ( SELF_TEST_STATUS_PASSED == getBloodLeakSelfTestStatus() ) { #ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_SELF_TEST ) != SW_CONFIG_ENABLE_VALUE ) + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_SELF_TEST ) == SW_CONFIG_ENABLE_VALUE ) #endif { settleStartTime = getMSTimerCount();