Skip to content

Commit

Permalink
Merge pull request nasa#94 from jphickey/fix-93-messagetype-conv
Browse files Browse the repository at this point in the history
Fix nasa#93, Use CFE_MSG_PTR conversion macro
  • Loading branch information
astrogeco committed Nov 17, 2021
2 parents 8124041 + d2b189a commit ef8d059
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit ef8d059

Please sign in to comment.