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 #93, Use CFE_MSG_PTR conversion macro #94

Merged
merged 1 commit into from
Dec 6, 2021
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/sch_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*/
typedef struct
{
CFE_MSG_CommandHeader_t CmdHeader;
CFE_MSG_CommandHeader_t CommandHeader;
uint32 PacketRate;
uint32 Counter;
} SCH_LAB_StateEntry_t;
Expand Down Expand Up @@ -119,7 +119,7 @@ void SCH_Lab_AppMain(void)
if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate)
{
LocalStateEntry->Counter = 0;
CFE_SB_TransmitMsg(&LocalStateEntry->CmdHeader.Msg, true);
CFE_SB_TransmitMsg(CFE_MSG_PTR(LocalStateEntry->CommandHeader), true);
}
}
++LocalStateEntry;
Expand Down Expand Up @@ -195,8 +195,9 @@ int32 SCH_LAB_AppInit(void)
{
if (ConfigEntry->PacketRate != 0)
{
CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader));
CFE_MSG_SetFcnCode(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->FcnCode);
CFE_MSG_Init(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->MessageID,
sizeof(LocalStateEntry->CommandHeader));
CFE_MSG_SetFcnCode(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->FcnCode);
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
}
++ConfigEntry;
Expand Down