Index: firmware/App/HDCommon.h =================================================================== diff -u -r116e7a0b38092b9272396b9d7dab112b4e9a3441 -r92f32196d272e32f9480e82dd09a038bb68753bc --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 116e7a0b38092b9272396b9d7dab112b4e9a3441) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 92f32196d272e32f9480e82dd09a038bb68753bc) @@ -35,6 +35,7 @@ // #define BOARD_WITH_NO_HARDWARE 1 // Target is a PCB w/ no hardware // #define SIMULATE_UI 1 // Build w/o requirement that UI be there // #define TASK_TIMING_OUTPUT_ENABLED 1 // Re-purposes alarm lamp pins for task timing + #define CARTRIDGE_TEST_BUILD 1 // Build to support cartridge testing #include #include Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -ra1a0187daedaf2c12e6f9eccfbf9e423d952e029 -r92f32196d272e32f9480e82dd09a038bb68753bc --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision a1a0187daedaf2c12e6f9eccfbf9e423d952e029) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 92f32196d272e32f9480e82dd09a038bb68753bc) @@ -77,6 +77,10 @@ /// Interval (in task intervals) at which to publish standby mode data to CAN bus. static OVERRIDE_U32_T standbyModePublishInterval = { DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, 0 }; +#ifdef CARTRIDGE_TEST_BUILD +static BOOL testCartridgesMode = FALSE; // Flag indicates we are testing cartridges. Used only for cartridge test build. +#endif + // ********** private function prototypes ********** static HD_STANDBY_STATE_T handleStandbyModeStartState( void ); @@ -231,6 +235,36 @@ break; } +#ifdef CARTRIDGE_TEST_BUILD + if ( TRUE == stop ) + { + if ( testCartridgesMode != TRUE ) + { + testSetBloodPumpTargetDutyCycle( 0.652F ); + testSetDialInPumpTargetDutyCycle( 0.701F ); + testSetDialOutPumpTargetDutyCycle( 0.566F ); + setValvePosition( VDI, VALVE_POSITION_B_OPEN ); + setValvePosition( VDO, VALVE_POSITION_B_OPEN ); + setValvePosition( VBA, VALVE_POSITION_B_OPEN ); + setValvePosition( VBV, VALVE_POSITION_B_OPEN ); + setValveAirTrap( STATE_CLOSED ); + testCartridgesMode = TRUE; + } + else + { + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + 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 ); + setValveAirTrap( STATE_OPEN ); + testCartridgesMode = FALSE; + } + } +#endif + return currentStandbyState; } Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -refead43ba16292aa173f72ebfa2b73aebfd2a587 -r92f32196d272e32f9480e82dd09a038bb68753bc --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision efead43ba16292aa173f72ebfa2b73aebfd2a587) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 92f32196d272e32f9480e82dd09a038bb68753bc) @@ -96,7 +96,11 @@ // ********** private data ********** +#ifndef CARTRIDGE_TEST_BUILD static BOOL testerLoggedIn = FALSE; ///< Flag indicates whether an external tester (connected PC) has sent a valid login message. +#else +static BOOL testerLoggedIn = TRUE; ///< Flag indicates whether an external tester (connected PC) has sent a valid login message. +#endif static volatile U16 nextSeqNo = 1; ///< Value of sequence number to use for next transmitted message. /// List of message IDs that are requested not to be transmitted.