Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r1747702a2e89998cd3fa1348907eeb623e9c16c8 -rbcc50c1bef73f433f3697542a9d5ed14bc5f8d73 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 1747702a2e89998cd3fa1348907eeb623e9c16c8) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision bcc50c1bef73f433f3697542a9d5ed14bc5f8d73) @@ -418,6 +418,34 @@ /*********************************************************************//** * @brief + * The testSetOperationMode function will transition to a given operation + * mode if the transition is legal. + * @details Inputs: none + * @details Outputs: modeRequest[] + * @param newMode ID of requested mode to transition to + * @return TRUE if request successful, FALSE if not + *************************************************************************/ +BOOL testSetOperationMode( DG_OP_MODE_T newMode ) +{ + BOOL result = FALSE; + + if ( TRUE == isTestingActivated() ) + { + DG_OP_MODE_T check = MODE_TRANSITION_TABLE[ currentMode ][ newMode ]; + + // Is mode transition legal? + if ( check == newMode ) + { + requestNewOperationMode( newMode ); + result = TRUE; + } + } + + return result; +} + +/*********************************************************************//** + * @brief * The testSetDGOpModePublishIntervalOverride function overrides the * DG operation mode publish interval. * @details Inputs: none