Index: firmware/App/Modes/ModeService.c =================================================================== diff -u -r8b73263b38f449dacc0795c67a7cf6240cb79026 -r4bae2d153f4242a52c8602df3e5161d6f1f122ef --- firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 8b73263b38f449dacc0795c67a7cf6240cb79026) +++ firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 4bae2d153f4242a52c8602df3e5161d6f1f122ef) @@ -1,6 +1,6 @@ /************************************************************************** * -* Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2023 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. @@ -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; }