Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r82bd1d24c050e79690a7f5b236e49dd7db7e2a91 -r21d6ea2bfe82aece70423e04d21ad3ef3858f4f6 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 82bd1d24c050e79690a7f5b236e49dd7db7e2a91) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 21d6ea2bfe82aece70423e04d21ad3ef3858f4f6) @@ -199,13 +199,16 @@ handleDisinfectCancel( stop ); - // if no active alarms anymore, restore to default valve states for standby mode - if ( ( FALSE == doesAlarmStatusIndicateStop() ) && ( VALVE_POSITION_C_CLOSE == getValvePosition( VDI ) ) ) + if ( TRUE == getVenousBubbleDetectionEnabled() ) { - 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 ); + // if no active alarms anymore, restore to default valve states for standby mode + if ( ( FALSE == doesAlarmStatusIndicateStop() ) && ( VALVE_POSITION_C_CLOSE == getValvePosition( VDI ) ) ) + { + 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 ); + } } // State machine to get DG to prep a reservoir so we can start a treatment @@ -368,18 +371,26 @@ switch ( action ) { case ALARM_ACTION_STOP: - // Pumps should be off - signalBloodPumpHardStop(); - signalDialInPumpHardStop(); - signalDialOutPumpHardStop(); - stopSyringePump(); + 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(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + stopSyringePump(); - // Set valves to safe positions - setValveAirTrap( STATE_CLOSED ); - setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); - setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); - setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); - setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + // Set valves to safe positions + setValveAirTrap( STATE_CLOSED ); + setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); + setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + } break; default: