Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r5795a78586365a16ec121dafc74c2fb70dd108cd -r5b3f0d8e659384a1c13b164a47ee66e4eb76cae4 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 5795a78586365a16ec121dafc74c2fb70dd108cd) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 5b3f0d8e659384a1c13b164a47ee66e4eb76cae4) @@ -26,6 +26,7 @@ #include "OperationModes.h" #include "PinchValve.h" #include "Switches.h" +#include "SyringePump.h" #include "SystemCommTD.h" #include "TxParams.h" #include "Valve3Way.h" @@ -50,7 +51,6 @@ static FLUID_TYPE_T fluidType; ///< Fluid type assigned based on user selection. static TREATMENT_TYPE_T modality; ///< Modality from the treatment initiation. - // ********** private function prototypes ********** static TD_STANDBY_STATE_T handleStandbyModeStartState( void ); @@ -209,7 +209,6 @@ return state; } - /*********************************************************************//** * @brief * The handleStandbyModeWaitForTreatmentState function handles wait for @@ -436,22 +435,25 @@ switch ( action ) { case ALARM_ACTION_STOP: -// if ( isAlarmActive( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ) != TRUE ) -// { -// // no stop action in standby mode -// } -// // if Dialin enabled bubble detection, stop on venous bubble detection alarm -// else -// { -// // Pumps should be off -// signalBloodPumpHardStop(); -// stopSyringePump(); -// -// // Set valves to safe positions -// setValveAirTrap( STATE_CLOSED ); -// setValvePosition( H1_VALV, VALVE_POSITION_C_CLOSE ); -// setValvePosition( H19, VALVE_POSITION_C_CLOSE ); -// } + if ( isAlarmActive( ALARM_ID_TD_VENOUS_BUBBLE_DETECTED ) != TRUE ) + { + // no stop action in standby mode + } + // if Dialin enabled bubble detection, stop on venous bubble detection alarm + else + { + // Pumps should be off + signalBloodPumpHardStop(); + stopSyringePump(); + + // Set air trap valves to safe positions + set3WayValveState( H13_VALV, VALVE_3WAY_COMMON_TO_CLOSED_STATE ); + set3WayValveState( H20_VALV, VALVE_3WAY_COMMON_TO_CLOSED_STATE ); + + // Set pinch valves to safe positions + setValvePosition( H1_VALV, VALVE_POSITION_C_CLOSE ); + setValvePosition( H19_VALV, VALVE_POSITION_C_CLOSE ); + } break; default: