Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -re7c4a51e6057f0cc83fabc72f2df9bb5dffee391 -r2ecbac1618a09e6992889283cef6190cae8d7f7a --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision e7c4a51e6057f0cc83fabc72f2df9bb5dffee391) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 2ecbac1618a09e6992889283cef6190cae8d7f7a) @@ -22,7 +22,7 @@ #include "mibspi.h" #include "reg_het.h" -#include "Battery.h" +#include "CPLD.h" #include "DialOutFlow.h" #include "FPGA.h" #include "InternalADC.h" Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r1354685cce00d343e29be2c098fd9fdb857374ae -r2ecbac1618a09e6992889283cef6190cae8d7f7a --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 1354685cce00d343e29be2c098fd9fdb857374ae) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 2ecbac1618a09e6992889283cef6190cae8d7f7a) @@ -1875,6 +1875,10 @@ SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION, forceAtEndOfSeek, currentForceV ) result = TRUE; } + else + { + clearAlarmCondition( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION ); + } } // Check with persistence during continuous state Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r84eb5fb93b782477cdb0092d11a0e1d4fcba96ad -r2ecbac1618a09e6992889283cef6190cae8d7f7a --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 84eb5fb93b782477cdb0092d11a0e1d4fcba96ad) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 2ecbac1618a09e6992889283cef6190cae8d7f7a) @@ -127,6 +127,7 @@ static U32 bloodLeakDebubbleStartTimeMS; ///< Blood leak detector debubble start time in milliseconds. static BOOL useHeparin; ///< Flag indicates the user of heparin. +static BOOL heparinOcclusionTestRun; ///< Flag indicates whether the heparin occlusion test has been run. static BOOL selfTestsResumeRequested; ///< Flag indicates user requesting self-tests resume. static BOOL cartridgeUsedTestRun; ///< Flag indicates whether the used cartridge test has been run. static BOOL occlusionBaselineWasSet; ///< Flag indicates whether the blood pump occlusion baseline for installed cartridge has been set. @@ -426,6 +427,7 @@ dryPressureTestsCompleted = FALSE; cartridgeUsedTestRun = FALSE; occlusionBaselineWasSet = FALSE; + heparinOcclusionTestRun = FALSE; selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); selfTestCartridgeSettleTime = getMSTimerCount(); @@ -1534,8 +1536,8 @@ * @brief * The handleDrySelfTestSyringePumpOcclusionDetectionState function handles * occlusion detection after prime has completed. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: syringeOcclusionDelayStartTime + * @details Outputs: heparinOcclusionTestRun * @return the next state of dry self-tests state machine *************************************************************************/ static DRY_SELF_TESTS_STATE_T handleDrySelfTestSyringePumpOcclusionDetectionState( void ) @@ -1548,6 +1550,7 @@ { state = DRY_SELF_TESTS_COMPLETE_STATE; } + heparinOcclusionTestRun = TRUE; } if ( TRUE == doesAlarmStatusIndicateStop() ) @@ -1564,7 +1567,7 @@ * The handleDrySelfTestStoppedState function handles the stopped dry self-tests * operation. * @details Inputs: selfTestsResumeRequested, occlusionBaselineWasSet, - * dryPressureTestsCompleted, cartridgeUsedTestRun + * dryPressureTestsCompleted, cartridgeUsedTestRun, heparinOcclusionTestRun * @details Outputs: selfTestsResumeRequested, selfTestStartTime, selfTestCartridgeSettleTime * @return the next state of dry self-tests state machine *************************************************************************/ @@ -1592,6 +1595,12 @@ } } + // if heparin occlusin alarm, keep calling check function so alarm condition will clear when resolved + if ( TRUE == isAlarmActive( ALARM_ID_HD_SYRINGE_PUMP_OCCLUSION ) ) + { + checkForSyringeOcclusion( FALSE ); + } + // if resume request, resume dry self-tests if ( TRUE == selfTestsResumeRequested ) { @@ -1601,8 +1610,12 @@ selfTestCartridgeSettleTime = getMSTimerCount(); doorClosedRequired( TRUE, TRUE ); - if ( TRUE == dryPressureTestsCompleted ) + if ( TRUE == heparinOcclusionTestRun ) { + state = DRY_SELF_TESTS_COMPLETE_STATE; + } + else if ( TRUE == dryPressureTestsCompleted ) + { state = DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE; } else