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 #217, Add mission rev and print in startup and noop events #258

Merged
merged 1 commit into from
Jun 8, 2022
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
19 changes: 16 additions & 3 deletions fsw/platform_inc/cf_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,25 @@ typedef uint32 CF_TransactionSeq_t;

/**
* @brief Number of milliseconds to wait for a SB message
*
* @par Limits:
*
*/
#define CF_RCVMSG_TIMEOUT (100)

/**
* \brief Mission specific version number
*
* \par Description:
* An application version number consists of four parts:
* major version number, minor version number, revision
* number and mission specific revision number. The mission
* specific revision number is defined here such
* that missions can manage as a configuration definition
*
* \par Limits:
* Must be defined as a numeric value that is greater than
* or equal to zero.
*/
#define CF_MISSION_REV 0

/**\}*/

#endif /* !CF_PLATFORM_CFG_H */
4 changes: 2 additions & 2 deletions fsw/src/cf_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ int32 CF_Init(void)
goto err_out;
}

status = CFE_EVS_SendEvent(CF_EID_INF_INIT, CFE_EVS_EventType_INFORMATION, "CF Initialized. Version %d.%d.%d",
CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION);
status = CFE_EVS_SendEvent(CF_EID_INF_INIT, CFE_EVS_EventType_INFORMATION, "CF Initialized. Version %d.%d.%d.%d",
CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION, CF_MISSION_REV);

if (status != CFE_SUCCESS)
{
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/cf_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
*-----------------------------------------------------------------*/
void CF_CmdNoop(CFE_SB_Buffer_t *msg)
{
CFE_EVS_SendEvent(CF_EID_INF_CMD_NOOP, CFE_EVS_EventType_INFORMATION, "CF: No-Op received, Version %d.%d.%d",
CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION);
CFE_EVS_SendEvent(CF_EID_INF_CMD_NOOP, CFE_EVS_EventType_INFORMATION, "CF: No-Op received, Version %d.%d.%d.%d",
CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION, CF_MISSION_REV);
CF_CmdAcc();
}

Expand Down
2 changes: 1 addition & 1 deletion unit-test/cf_cmd_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -4241,7 +4241,7 @@ void Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_CmdNoop_With_m
CFE_MSG_FcnCode_t forced_return_CFE_MSG_GetFcnCode = 0x00; /* 0x00 forces fns[0] which is CF_CmdNoop */
CFE_MSG_Size_t forced_return_CFE_MSG_GetSize =
sizeof(CF_NoArgsCmd_t); /* sizeof(CF_NoArgsCmd_t) is expected size of CF_CmdNoop */
const char * expected_Spec = "CF: No-Op received, Version %d.%d.%d";
const char * expected_Spec = "CF: No-Op received, Version %d.%d.%d.%d";
CFE_MSG_GetFcnCode_context_t context_CFE_MSG_GetFcnCode;
CFE_MSG_GetSize_context_t context_CFE_MSG_GetSize;
CFE_EVS_SendEvent_context_t context_CFE_EVS_SendEvent;
Expand Down