Index: firmware/App/Modes/ModeSolo.c =================================================================== diff -u -r8f5feed92f41a476d5656038bcdfe884e17bd593 -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Modes/ModeSolo.c (.../ModeSolo.c) (revision 8f5feed92f41a476d5656038bcdfe884e17bd593) +++ firmware/App/Modes/ModeSolo.c (.../ModeSolo.c) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2024 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 ModeSolo.c +* @file ModeSolo.c * -* @author (last) Dara Navaei -* @date (last) 04-Jun-2020 +* @author (last) Michael Garthwaite +* @date (last) 16-May-2023 * -* @author (original) Sean -* @date (original) 18-Mar-2020 +* @author (original) Sean +* @date (original) 18-Mar-2020 * ***************************************************************************/ @@ -37,10 +37,9 @@ /*********************************************************************//** * @brief - * The initSoloMode function initializes the Standby-Solo Mode module. - * @details - * Inputs : none - * Outputs : Standby-Solo Mode module initialized. + * The initSoloMode function initializes the solo standby mode module. + * @details Inputs: none + * @details Outputs: Solo standby mode module initialized * @return none *************************************************************************/ void initSoloMode( void ) @@ -50,23 +49,25 @@ /*********************************************************************//** * @brief - * The transitionToSoloMode function prepares for transition to standby-solo mode. - * @details - * Inputs : none - * Outputs : - * @return none + * The transitionToSoloMode function prepares for transition to solo standby mode. + * @details Inputs: none + * @details Outputs: Re-initialized solo standby mode + * @return initial state *************************************************************************/ -void transitionToSoloMode( void ) +U32 transitionToSoloMode( void ) { initSoloMode(); + setCurrentSubState( NO_SUB_STATE ); + setCPLDCleanLEDColor( CPLD_CLEAN_LED_OFF ); + + return soloState; } /*********************************************************************//** * @brief - * The execSoloMode function executes the Standby-Solo Mode state machine. - * @details - * Inputs : none - * Outputs : + * The execSoloMode function executes the solo standby mode state machine. + * @details Inputs: none + * @details Outputs: Solo standby mode state machine executed * @return current state. *************************************************************************/ U32 execSoloMode( void ) @@ -83,7 +84,7 @@ break; default: - // TODO - s/w fault + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_SOLO_MODE_INVALID_EXEC_STATE, soloState ) soloState = DG_SOLO_STANDBY_STATE_START; break; } @@ -93,12 +94,10 @@ /*********************************************************************//** * @brief - * The handleIdleDGSoloStandbyState function handles the idle state of DG \n - * standby-solo mode. - * @details - * Inputs : none - * Outputs : none - * @return the next state of standby-solo mode. + * The handleIdleDGSoloStandbyState function handles the idle state of solo standby mode. + * @details Inputs: none + * @details Outputs: none + * @return the next state of solo standby mode. *************************************************************************/ static DG_SOLO_STANDBY_STATE_T handleIdleDGSoloStandbyState( void ) { @@ -115,12 +114,10 @@ /*********************************************************************//** * @brief - * The getCurrentSoloState function returns the current state of the \n - * standby-solo mode. - * @details - * Inputs : soloState - * Outputs : none - * @return the current state of standby-solo mode. + * The getCurrentSoloState function returns the current state of solo standby mode. + * @details Inputs: soloState + * @details Outputs: none + * @return the current state of solo standby mode. *************************************************************************/ DG_SOLO_STANDBY_STATE_T getCurrentSoloState( void ) {