From 15d6b69a4e17d7e62c897272aed7dd1b911510eb Mon Sep 17 00:00:00 2001 From: Tvisha Andharia Date: Wed, 30 Oct 2024 15:18:27 -0400 Subject: [PATCH] Fix #462, Setting status after memset --- fsw/src/cf_app.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsw/src/cf_app.c b/fsw/src/cf_app.c index e198c6f4..db885264 100644 --- a/fsw/src/cf_app.c +++ b/fsw/src/cf_app.c @@ -192,11 +192,11 @@ CFE_Status_t CF_AppInit(void) const CFE_SB_MsgId_Atom_t MID_VALUES[] = {CF_CMD_MID, CF_SEND_HK_MID, CF_WAKE_UP_MID}; uint32 i; - CF_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; - /* Zero-out global data structure */ memset(&CF_AppData, 0, sizeof(CF_AppData)); + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; + CFE_MSG_Init(CFE_MSG_PTR(CF_AppData.hk.TelemetryHeader), CFE_SB_ValueToMsgId(CF_HK_TLM_MID), sizeof(CF_AppData.hk)); status = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY);