Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r1df7142ce598ed2ed37958df29068ff1a957b11d -r1c04924590760ca29e1c9fe19bca65ec5ce428fe --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 1df7142ce598ed2ed37958df29068ff1a957b11d) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 1c04924590760ca29e1c9fe19bca65ec5ce428fe) @@ -7,8 +7,8 @@ * * @file SelfTests.c * -* @author (last) Dara Navaei -* @date (last) 23-May-2022 +* @author (last) Sean Nash +* @date (last) 13-Jul-2022 * * @author (original) Quang Nguyen * @date (original) 28-Jan-2021 @@ -233,6 +233,8 @@ selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); + doorClosedRequired( TRUE, TRUE ); + // Pumps should be off signalBloodPumpHardStop(); signalDialInPumpHardStop(); @@ -359,6 +361,8 @@ selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); + doorClosedRequired( TRUE, TRUE ); + // Pumps should be off signalBloodPumpHardStop(); signalDialInPumpHardStop(); @@ -666,14 +670,6 @@ signalDialOutPumpHardStop(); selfTestStartTime = getMSTimerCount(); -#ifndef _RELEASE_ - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SWITCHES_MONITOR ) ) - { - frontDoor = STATE_CLOSED; - pumpTrack = STATE_CLOSED; - } -#endif - // TODO: Use appropriate sensor driver if ( ( STATE_CLOSED == frontDoor ) && ( STATE_CLOSED == pumpTrack ) ) { @@ -830,13 +826,16 @@ { NO_CART_SELF_TESTS_STATE_T state = NO_CART_SELF_TESTS_STOPPED_STATE; + doorClosedRequired( FALSE, FALSE ); + // Restart self-test start time selfTestStartTime = getMSTimerCount(); if ( TRUE == selfTestsResumeRequested ) { selfTestsResumeRequested = FALSE; havePumpsStarted = FALSE; + doorClosedRequired( TRUE, TRUE ); state = NO_CART_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; } @@ -860,14 +859,6 @@ // Restart self-test start time selfTestStartTime = getMSTimerCount(); -#ifndef _RELEASE_ - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SWITCHES_MONITOR ) ) - { - frontDoor = STATE_CLOSED; - pumpTrack = STATE_CLOSED; - } -#endif - // TODO: Use appropriate sensor driver if (( STATE_CLOSED == frontDoor ) && (STATE_CLOSED == pumpTrack ) ) { @@ -1129,12 +1120,15 @@ { DRY_SELF_TESTS_STATE_T state = DRY_SELF_TESTS_STOPPED_STATE; + doorClosedRequired( FALSE, FALSE ); + // Restart self-test start time selfTestStartTime = getMSTimerCount(); if ( TRUE == selfTestsResumeRequested ) { selfTestsResumeRequested = FALSE; + doorClosedRequired( TRUE, TRUE ); #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) != SW_CONFIG_ENABLE_VALUE ) {