Index: firmware/App/Modes/ModeService.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -r4bae2d153f4242a52c8602df3e5161d6f1f122ef --- firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 4bae2d153f4242a52c8602df3e5161d6f1f122ef) @@ -15,11 +15,16 @@ * ***************************************************************************/ +#include "BloodFlow.h" #include "Buttons.h" +#include "DGInterface.h" +#include "DialInFlow.h" +#include "DialOutFlow.h" #include "ModeService.h" #include "OperationModes.h" #include "Switches.h" #include "SyringePump.h" +#include "Valves.h" /** * @addtogroup HDServiceMode @@ -58,6 +63,19 @@ setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, FALSE ); + // Start out with all actuators de-energized in service mode + cmdStopDGTrimmerHeater(); + stopSyringePump(); + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + // TODO - turn off air pump + 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 ); + return 0; }