Skip to content

Commit

Permalink
Merge pull request nasa#95 from jphickey/fix-94-messagetype-conv
Browse files Browse the repository at this point in the history
Fix nasa#94, Use CFE_MSG_PTR conversion macro
  • Loading branch information
astrogeco committed Nov 17, 2021
2 parents 12b8cdd + 0de37de commit 9283188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void CI_LAB_TaskInit(void)
*/
OS_TaskInstallDeleteHandler(&CI_LAB_delete_callback);

CFE_MSG_Init(&CI_LAB_Global.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(CI_LAB_HK_TLM_MID),
CFE_MSG_Init(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), CFE_SB_ValueToMsgId(CI_LAB_HK_TLM_MID),
sizeof(CI_LAB_Global.HkTlm));

CFE_EVS_SendEvent(CI_LAB_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s",
Expand Down Expand Up @@ -314,8 +314,8 @@ int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data)
int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data)
{
CI_LAB_Global.HkTlm.Payload.SocketConnected = CI_LAB_Global.SocketConnected;
CFE_SB_TimeStampMsg(&CI_LAB_Global.HkTlm.TlmHeader.Msg);
CFE_SB_TransmitMsg(&CI_LAB_Global.HkTlm.TlmHeader.Msg, true);
CFE_SB_TimeStampMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader));
CFE_SB_TransmitMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), true);
return CFE_SUCCESS;

} /* End of CI_LAB_ReportHousekeeping() */
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/ci_lab_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct

typedef struct
{
CFE_MSG_TelemetryHeader_t TlmHeader;
CFE_MSG_TelemetryHeader_t TelemetryHeader;
CI_LAB_HkTlm_Payload_t Payload;
} CI_LAB_HkTlm_t;

Expand Down

0 comments on commit 9283188

Please sign in to comment.