Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r4760b847bd262dfc693b3d3458864c05b1c816d7 -r3633c7c348e95b11175dfb4a4a183bdb6cd24478 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 4760b847bd262dfc693b3d3458864c05b1c816d7) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 3633c7c348e95b11175dfb4a4a183bdb6cd24478) @@ -7,8 +7,8 @@ * * @file OperationModes.c * -* @author (last) Dara Navaei -* @date (last) 03-May-2022 +* @author (last) Darren Cox +* @date (last) 25-Aug-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -140,7 +140,7 @@ transitionToNewOperationMode( newMode ); currentMode = newMode; - if ( MODE_TREA == currentMode ) + if ( MODE_TREA == lastMode ) { // If the current mode is treatment but transitioning to another mode has been requested (including transitioning to fault mode) // it means the treatment is done. Get the elapsed time since the beginning of the treatment and convert it to hours to be written @@ -253,6 +253,18 @@ /*********************************************************************//** * @brief + * The getCurrentSubMode function gets the current operation sub-mode. + * @details Inputs: currentSubMode + * @details Outputs: none + * @return the current operation sub-mode + *************************************************************************/ +U32 getCurrentSubMode( void ) +{ + return currentSubMode; +} + +/*********************************************************************//** + * @brief * The initiateAlarmAction function initiate an alarm or alarm recovery * action according to the current operation mode. * @details Inputs: currentMode