Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r9e5ee62245eb2a73b167eabd6c274a71a76a7b0e -r225bda57ccd84a86e38231afddaf9d04ae9f2d0a --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 9e5ee62245eb2a73b167eabd6c274a71a76a7b0e) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 225bda57ccd84a86e38231afddaf9d04ae9f2d0a) @@ -57,7 +57,6 @@ /// DG operation mode data publish interval. static OVERRIDE_U32_T dgOpModePublishInterval = { BROADCAST_DG_OP_MODE_INTERVAL, BROADCAST_DG_OP_MODE_INTERVAL, 0, 0 }; static U32 dataPublishCounter; ///< Interval counter used to determine when to broadcast operation mode. Initialize to 11 to stagger broadcast. -static U32 priorSubMode; ///< The prior submode state. /// This matrix determines legal transitions from one mode to another. static const DG_OP_MODE_T MODE_TRANSITION_TABLE[ NUM_OF_DG_MODES - 1 ][ NUM_OF_DG_MODES - 1 ] = @@ -90,7 +89,7 @@ * The initOperationModes function initializes the operation modes module. * @details Inputs: none * @details Outputs: modeRequest, lastMode, currentMode, currentSubMode, - * priorSubMode, dataPublishCounter + * dataPublishCounter * @return none *************************************************************************/ void initOperationModes( void ) @@ -107,7 +106,6 @@ lastMode = DG_MODE_INIT; currentMode = DG_MODE_INIT; currentSubMode = 0; - priorSubMode = 0; dataPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; transitionToNewOperationMode( DG_MODE_INIT ); @@ -140,8 +138,6 @@ DG_OP_MODE_T newMode; U32 priorSubMode = currentSubMode; - priorSubMode = currentSubMode; - // any new mode requests? newMode = arbitrateModeRequest(); // will return current mode if no pending requests newMode = MODE_TRANSITION_TABLE[ currentMode ][ newMode ]; @@ -157,7 +153,6 @@ if ( currentMode != newMode ) { // handle transition to new mode - priorSubMode = 0; lastMode = currentMode; transitionToNewOperationMode( newMode ); currentMode = newMode; @@ -231,8 +226,6 @@ SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_SUB_MODE_CHANGE, priorSubMode, currentSubMode ) } - priorSubMode = currentSubMode; - // publish op mode on interval broadcastOperationMode(); } @@ -380,10 +373,6 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_OP_MODES_INVALID_MODE_TO_TRANSITION_TO, (U32)newMode ) break; } - - SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_SUB_MODE_CHANGE, priorSubMode, currentSubMode ) - - priorSubMode = currentSubMode; } /*********************************************************************//**