Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #45, Opaque CFE_SB_MsgId_t values #46

Merged
merged 1 commit into from
May 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void CI_LAB_ProcessCommandPacket(void)
CFE_SB_MsgId_t MsgId;
MsgId = CFE_SB_GetMsgId(CI_LAB_Global.MsgPtr);

switch (MsgId)
switch (CFE_SB_MsgIdToValue(MsgId))
{
case CI_LAB_CMD_MID:
CI_LAB_ProcessGroundCommand();
Expand All @@ -238,7 +238,7 @@ void CI_LAB_ProcessCommandPacket(void)
default:
CI_LAB_Global.HkBuffer.HkTlm.Payload.CommandErrorCounter++;
CFE_EVS_SendEvent(CI_LAB_COMMAND_ERR_EID, CFE_EVS_EventType_ERROR, "CI: invalid command packet,MID = 0x%x",
MsgId);
(unsigned int)CFE_SB_MsgIdToValue(MsgId));
break;
}

Expand Down Expand Up @@ -407,8 +407,9 @@ bool CI_LAB_VerifyCmdLength(CFE_SB_MsgPtr_t msg, uint16 ExpectedLength)
uint16 CommandCode = CFE_SB_GetCmdCode(msg);

CFE_EVS_SendEvent(CI_LAB_LEN_ERR_EID, CFE_EVS_EventType_ERROR,
"Invalid msg length: ID = 0x%X, CC = %d, Len = %d, Expected = %d", MessageID, CommandCode,
ActualLength, ExpectedLength);
"Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u",
(unsigned int)CFE_SB_MsgIdToValue(MessageID), (unsigned int)CommandCode,
(unsigned int)ActualLength, (unsigned int)ExpectedLength);
result = false;
CI_LAB_Global.HkBuffer.HkTlm.Payload.CommandErrorCounter++;
}
Expand Down