Index: firmware/App/Modes/ConsumableSelfTest.c =================================================================== diff -u -rcc4f8440e8ad7fa8f2ced2467d922be7422c344c -r0bd1acff7222327c97897b4f9ab91bcc1d9d5816 --- firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision cc4f8440e8ad7fa8f2ced2467d922be7422c344c) +++ firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision 0bd1acff7222327c97897b4f9ab91bcc1d9d5816) @@ -8,18 +8,24 @@ * @file ConsumableSelfTest.c * * @author (last) Dara Navaei -* @date (last) 25-Feb-2022 +* @date (last) 31-Mar-2022 * * @author (original) Quang Nguyen * @date (original) 06-Mar-2021 * ***************************************************************************/ +#include "BloodFlow.h" #include "ConsumableSelfTest.h" #include "DGInterface.h" +#include "DialInFlow.h" +#include "DialOutFlow.h" #include "ModePreTreat.h" #include "NVDataMgmt.h" #include "Reservoirs.h" +#include "SelfTests.h" +#include "SyringePump.h" +#include "Valves.h" /** * @addtogroup ConsumableSelfTest @@ -60,7 +66,19 @@ *************************************************************************/ void transitionToConsumableSelfTest( void ) { - initConsumableSelfTest(); + // Pumps should be off + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + stopSyringePump(); + + // Set valves to default positions + setValveAirTrap( STATE_CLOSED ); + setValvePosition( VDI, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VDO, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VBV, VALVE_POSITION_A_INSERT_EJECT ); + } /*********************************************************************//** @@ -77,19 +95,24 @@ { case CONSUMABLE_SELF_TESTS_INSTALL_STATE: +#ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { consumableInstallConfirmed = TRUE; } +#endif + // TODO: Check for DG straw door status to be open once DG door driver implemented if ( TRUE == consumableInstallConfirmed ) { consumableInstallConfirmed = FALSE; +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_CONSUMABLES_TESTS ) != SW_CONFIG_ENABLE_VALUE ) { currentConsumableSelfTestState = CONSUMABLE_SELF_TESTS_FILL_CMD_STATE; } else +#endif { currentConsumableSelfTestState = CONSUMABLE_SELF_TESTS_COMPLETE_STATE; }