/************************************************************************** * * Copyright (c) 2025-2025 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 ModePreTreat.c * * @author (last) Dara Navaei * @date (last) 26-Oct-2025 * * @author (original) Dara Navaei * @date (original) 25-Sep-2025 * ***************************************************************************/ #include "ModePreTreat.h" #include "OperationModes.h" #include "Timers.h" /** * @addtogroup TDPreTreatmentMode * @{ */ // ********** private definitions ********** // ********** private data ********** static U32 testTimeRemove = 0; // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initPreTreatmentMode function initializes the Pre Treatment Mode unit. * @details \b Inputs: none * @details \b Outputs: Pre Treatment Mode unit initialized. * @return none *************************************************************************/ void initPreTreatmentMode( void ) { testTimeRemove = 0; } /*********************************************************************//** * @brief * The transitionToPreTreatmentMode function prepares for transition to pre-treatment * mode. * @details \b Inputs: none * @details \b Outputs: none * @return initial state *************************************************************************/ U32 transitionToPreTreatmentMode( void ) { initPreTreatmentMode(); testTimeRemove = getMSTimerCount(); return 0; } /*********************************************************************//** * @brief * The execPreTreatmentMode function executes the Pre Treatment Mode state machine. * @details \b Alarm: TODO fill up once the exec function is complete * the stop button * @details \b Inputs: TODO fill up once the exec function is complete * @details \b Outputs: TODO fill up once the exec function is complete * @return current state (sub-mode) *************************************************************************/ U32 execPreTreatmentMode( void ) { if ( TRUE == didTimeout( testTimeRemove, 10000 ) ) // TODO temporary test code to just transition to treatment mode { requestNewOperationMode( MODE_TREA ); } return 0; } /**@}*/