Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r3ddc95eb7a9b5fe45ba2fdb728d57f3adeb6e114 -rf8d7bea9e89ae63bdd62d17dcb969baf83449210 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 3ddc95eb7a9b5fe45ba2fdb728d57f3adeb6e114) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision f8d7bea9e89ae63bdd62d17dcb969baf83449210) @@ -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 ); } } } @@ -870,10 +870,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() ) { @@ -1018,8 +1018,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 { @@ -1063,11 +1063,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(); @@ -1094,6 +1098,7 @@ if ( TRUE == selfTestsResumeRequested ) { selfTestsResumeRequested = FALSE; + #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) != SW_CONFIG_ENABLE_VALUE ) { @@ -1283,7 +1288,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();