Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -rd5574e12aa9638c933d11b9bee8d5cf024864440 -r410afd26b3ae5e372310c696c82f58c59235e10d --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision d5574e12aa9638c933d11b9bee8d5cf024864440) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 410afd26b3ae5e372310c696c82f58c59235e10d) @@ -15,27 +15,29 @@ * ***************************************************************************/ +#include "ModePreGenPermeateDefeatured.h" +#include "ModePreGenPermeate.h" #include "ModeStandby.h" -#include "ModeWaterPreGen.h" #include "OperationModes.h" #include "PersistentAlarm.h" -#include "SystemCommRO.h" +#include "SystemCommFP.h" #include "TaskGeneral.h" /** - * @addtogroup ROStandbyMode + * @addtogroup FPStandbyMode * @{ */ // ********** private definitions ********** // ********** private data ********** -static RO_STANDBY_MODE_STATE_T standbyState; ///< Currently active standby state. +static FP_STANDBY_MODE_STATE_T standbyState; ///< Currently active standby state. + // ********** private function prototypes ********** -static RO_STANDBY_MODE_STATE_T handleStandbyIdleState( void ); +static FP_STANDBY_MODE_STATE_T handleStandbyIdleState( void ); /*********************************************************************//** * @brief @@ -46,7 +48,7 @@ *************************************************************************/ void initStandbyMode( void ) { - standbyState = RO_STANDBY_MODE_STATE_IDLE; + standbyState = FP_STANDBY_MODE_STATE_IDLE; } /*********************************************************************//** @@ -69,21 +71,21 @@ * The execStandbyMode function executes the standby mode state machine. * @details \b Inputs: none * @details \b Outputs: Standby mode state machine executed - * @details \b Alarm: ALARM_ID_RO_SOFTWARE_FAULT if standbyState is invalid. + * @details \b Alarm: ALARM_ID_FP_SOFTWARE_FAULT if standbyState is invalid. * @return current state *************************************************************************/ U32 execStandbyMode( void ) { // execute current Standby state switch ( standbyState ) { - case RO_STANDBY_MODE_STATE_IDLE: + case FP_STANDBY_MODE_STATE_IDLE: standbyState = handleStandbyIdleState(); break; default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_FP_SOFTWARE_FAULT, SW_FAULT_ID_MODE_STANDBY_INVALID_STATE, standbyState ) - standbyState = RO_STANDBY_MODE_STATE_IDLE; + standbyState = FP_STANDBY_MODE_STATE_IDLE; break; } @@ -99,13 +101,21 @@ * @details \b Message \Sent: * @return the next state *************************************************************************/ -static RO_STANDBY_MODE_STATE_T handleStandbyIdleState( void ) +static FP_STANDBY_MODE_STATE_T handleStandbyIdleState( void ) { - RO_STANDBY_MODE_STATE_T state = RO_STANDBY_MODE_STATE_IDLE; + FP_STANDBY_MODE_STATE_T state = FP_STANDBY_MODE_STATE_IDLE; if ( TRUE == getPreGenRequest() ) { - requestNewOperationMode( RO_MODE_PGEN ); + if ( FALSE == isDefeatured() ) + { + requestNewOperationMode( FP_MODE_PGEN ); + } + else + { + requestNewOperationMode( FP_MODE_DPGW ); + } + } return state; @@ -118,12 +128,11 @@ * @details \b Outputs: none * @return the current state of standby mode. *************************************************************************/ -RO_STANDBY_MODE_STATE_T getCurrentStandbyState( void ) +FP_STANDBY_MODE_STATE_T getCurrentStandbyState( void ) { return standbyState; } - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/