Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r6015f14d02e1b0dd73b2bed1d9ac84a83a20172e -r9caeddb6420209364f1246a1e476dc4452908666 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 6015f14d02e1b0dd73b2bed1d9ac84a83a20172e) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 9caeddb6420209364f1246a1e476dc4452908666) @@ -114,6 +114,7 @@ static F32 reservoirVolume[ NUM_OF_DG_RESERVOIRS ]; ///< Hold the current volume of all reservoirs. static BOOL isValvesSettingSent; ///< Flag indicates valve setting change has been send to DG. +static U32 selfTestCartridgeSettleTime; ///< Cartridge settle start time. static U32 selfTestStartTime; ///< Starting time of self-test (in ms). static U32 selfTestPreviousPublishDataTime; ///< Last time self-test time data is being published (in ms). static U32 syringeOcclusionDelayStartTime; ///< Used to calculate the 1 second delay time before check for prime occlusion. @@ -394,7 +395,7 @@ previousNormalVenousPressure = 0.0; selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); - + selfTestCartridgeSettleTime = getMSTimerCount(); doorClosedRequired( FALSE, TRUE ); // Pumps should be off @@ -911,19 +912,19 @@ if ( STATE_CLOSED == pumpTrack ) { // Ensure occlusion sensor has time to settle after cartridge insertion before starting dry self-tests - if ( TRUE == didTimeout( selfTestStartTime, CARTRIDGE_INSERT_PRESSURE_SETTLE_TIME_MS ) ) + if ( TRUE == didTimeout( selfTestCartridgeSettleTime, CARTRIDGE_INSERT_PRESSURE_SETTLE_TIME_MS ) ) { setOcclusionInstallLevel(); // Record occlusion pressure level after a new cartridge is installed doorClosedRequired( TRUE, TRUE ); #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) ) { - currentDrySelfTestsState = DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE; + state = DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE; } else #endif { - currentDrySelfTestsState = DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; + state = DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; } } } @@ -1507,6 +1508,7 @@ // Restart self-test start time selfTestStartTime = getMSTimerCount(); selfTestsResumeRequested = FALSE; + selfTestCartridgeSettleTime = getMSTimerCount(); #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) )