/************************************************************************** * * Copyright (c) 2019-2020 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. * * @file TreatmentStop.c * * @author (last) Sean Nash * @date (last) 24-Sep-2020 * * @author (original) Sean * @date (original) 15-Jan-2020 * ***************************************************************************/ #include "AirTrap.h" #include "Buttons.h" #include "ModeTreatment.h" #include "OperationModes.h" #include "TreatmentStop.h" #include "Valves.h" /** * @addtogroup TreatmentStop * @{ */ // ********** private data ********** // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initTreatmentStop function initializes the Treatment Stop sub-mode * module. * @details Inputs: none * @details Outputs: Treatment Stop sub-mode module initialized. * @return none *************************************************************************/ void initTreatmentStop( void ) { } /*********************************************************************//** * @brief * The transitionToTreatmentStop function prepares for transition to treatment * stop sub-mode. * @details Inputs: none * @details Outputs: none * @return none *************************************************************************/ 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(); // Stop air trap control endAirTrapControl(); // Should always have stopped alarm active in treatment stop sub-mode so that user can take action activateAlarmNoData( ALARM_ID_TREATMENT_STOPPED_BY_USER ); } /*********************************************************************//** * @brief * The execTreatmentStop function executes the Treatment Stop sub-mode * state machine. * @details Inputs: none * @details Outputs: none * @return none *************************************************************************/ void execTreatmentStop( void ) { // TODO - implement } /**@}*/