Index: firmware/App/Modes/ModeService.c =================================================================== diff -u -r8b73263b38f449dacc0795c67a7cf6240cb79026 -r8a21834de99436b5b532795a7dce6235d6917290 --- firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 8b73263b38f449dacc0795c67a7cf6240cb79026) +++ firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 8a21834de99436b5b532795a7dce6235d6917290) @@ -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; }