Index: firmware/App/Modes/TreatmentStop.c =================================================================== diff -u -r515a40fb83e3fc13384dae12dba25b45aeeea904 -rbd4cfd6101ef41d898e36aed764fd15f01ec7255 --- firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 515a40fb83e3fc13384dae12dba25b45aeeea904) +++ firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision bd4cfd6101ef41d898e36aed764fd15f01ec7255) @@ -19,6 +19,7 @@ #include "ModeTreatment.h" #include "OperationModes.h" #include "TreatmentStop.h" +#include "Valves.h" /** * @addtogroup TreatmentStop @@ -53,6 +54,12 @@ *************************************************************************/ void transitionToTreatmentStop( void ) { + // set valves to safe state + setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); + setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + // reset saline bolus state in case alarm interrupted one resetSalineBolus(); }