Skip to content

Commit

Permalink
Fix #72, Update Reset Counters event type to INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Sep 27, 2024
1 parent 40aeed1 commit 0859eeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fsw/inc/md_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
/**
* \brief MD Reset Counters Command Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
Expand Down
9 changes: 5 additions & 4 deletions fsw/src/md_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,11 @@ void MD_ExecRequest(const CFE_SB_Buffer_t *BufPtr)

case MD_RESET_CNTRS_CC:

CFE_EVS_SendEvent(MD_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "Reset Counters Cmd Received");
MD_AppData.CmdCounter = 0;
MD_AppData.ErrCounter = 0;
break;
CFE_EVS_SendEvent(MD_RESET_INF_EID, CFE_EVS_EventType_INFORMATION,
"Reset Counters Cmd Received");
MD_AppData.CmdCounter = 0;
MD_AppData.ErrCounter = 0;
break;

case MD_START_DWELL_CC:

Expand Down
3 changes: 2 additions & 1 deletion unit-test/md_app_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,8 @@ void MD_ExecRequest_Test_ResetCounters(void)
UtAssert_True(MD_AppData.ErrCounter == 0, "MD_AppData.ErrCounter == 0");

UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MD_RESET_INF_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType,
CFE_EVS_EventType_INFORMATION);

strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH);

Expand Down

0 comments on commit 0859eeb

Please sign in to comment.