Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions modules/time/fsw/src/cfe_time_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ void CFE_TIME_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
static CFE_SB_MsgId_t ONEHZ_CMD_MID = CFE_SB_MSGID_RESERVED;
static CFE_SB_MsgId_t TONE_CMD_MID = CFE_SB_MSGID_RESERVED;
static CFE_SB_MsgId_t DATA_CMD_MID = CFE_SB_MSGID_RESERVED;
static CFE_SB_MsgId_t SEND_CMD_MID = CFE_SB_MSGID_RESERVED;
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
static CFE_SB_MsgId_t SEND_CMD_MID = CFE_SB_MSGID_RESERVED;
#endif

CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;

Expand All @@ -232,7 +234,9 @@ void CFE_TIME_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
ONEHZ_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_ONEHZ_CMD_MID);
TONE_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_TONE_CMD_MID);
DATA_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_DATA_CMD_MID);
SEND_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID);
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
SEND_CMD_MID = CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID);
#endif
}

CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MessageID);
Expand Down
11 changes: 5 additions & 6 deletions modules/time/ut-coverage/time_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,8 @@ void Test_Init(void)
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
ExpRtn++;
#endif
#if (CFE_PLATFORM_TIME_CFG_SERVER == true)
#if (CFE_MISSION_TIME_CFG_FAKE_TONE == true)
ExpRtn++;
#endif
#endif
/* account for 1Hz command, which is always enabled */
ExpRtn++;
Expand Down Expand Up @@ -253,7 +251,6 @@ void Test_Init(void)
ExpRtn = -SubErrCnt;
UtAssert_INT32_EQ(CFE_TIME_TaskInit(), ExpRtn);
#else
SubErrCnt++;
UtAssert_NA("*Not tested* Time at tone signal commands subscription failure");
#endif

Expand Down Expand Up @@ -2351,11 +2348,13 @@ void Test_Tone(void)
#if (CFE_PLATFORM_TIME_CFG_CLIENT == true)
/* Test tone update using an invalid pending state */
UT_InitData();
CFE_TIME_Global.PendingState = CFE_TIME_ClockState_INVALID;
CFE_TIME_Global.ClockSetState = CFE_TIME_SetState_WAS_SET;
RefState = CFE_TIME_StartReferenceUpdate();
CFE_TIME_Global.PendingState = CFE_TIME_ClockState_INVALID;
RefState->ClockSetState = CFE_TIME_SetState_WAS_SET;
CFE_TIME_FinishReferenceUpdate(RefState);
CFE_TIME_Global.ServerFlyState = CFE_TIME_FlywheelState_IS_FLY;
CFE_TIME_ToneUpdate();
UtAssert_INT32_EQ(CFE_TIME_Global.ClockSetState, CFE_TIME_SetState_NOT_SET);
UtAssert_INT32_EQ(CFE_TIME_CalculateState(&Reference), CFE_TIME_SetState_NOT_SET);
UtAssert_INT32_EQ(CFE_TIME_Global.ServerFlyState, CFE_TIME_FlywheelState_NO_FLY);

/* Test tone update using FLYWHEEL as the pending state */
Expand Down
Loading