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 #101, Remove redundant assignments of RecomputeInProgress #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion fsw/inc/cs_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@
/**\}*/

/**
* \name CS Checkum States
* \name CS Checksum States
* \{
*/
#define CS_STATE_EMPTY 0x00 /**< \brief Entry unused */
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/cs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ void CS_ProcessCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;
uint16 CommandCode = 0;

CFE_MSG_GetMsgId(&BufPtr->Msg, &MessageID);

CFE_MSG_GetFcnCode(&BufPtr->Msg, &CommandCode);

switch (CommandCode)
Expand Down Expand Up @@ -561,6 +559,8 @@ void CS_ProcessCmd(const CFE_SB_Buffer_t *BufPtr)
break;

default:
CFE_MSG_GetMsgId(&BufPtr->Msg, &MessageID);

CFE_EVS_SendEvent(CS_CC_ERR_EID, CFE_EVS_EventType_ERROR,
"Invalid ground command code: ID = 0x%08lX, CC = %d",
(unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode);
Expand Down
4 changes: 1 addition & 3 deletions fsw/src/cs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ void CS_OneShotCmd(const CS_OneShotCmd_t *CmdPtr)
CS_AppData.HkPacket.Payload.OneShotInProgress == false)
{
/* There is no child task running right now, we can use it*/
CS_AppData.HkPacket.Payload.RecomputeInProgress = false;
CS_AppData.HkPacket.Payload.OneShotInProgress = true;

CS_AppData.HkPacket.Payload.LastOneShotAddress = CmdPtr->Payload.Address;
Expand Down Expand Up @@ -486,7 +485,7 @@ void CS_OneShotCmd(const CS_OneShotCmd_t *CmdPtr)
else /* child task creation failed */
{
CFE_EVS_SendEvent(CS_ONESHOT_CREATE_CHDTASK_ERR_EID, CFE_EVS_EventType_ERROR,
"OneShot checkum failed, CFE_ES_CreateChildTask returned: 0x%08X",
"OneShot checksum failed, CFE_ES_CreateChildTask returned: 0x%08X",
(unsigned int)Status);

CS_AppData.HkPacket.Payload.CmdErrCounter++;
Expand Down Expand Up @@ -531,7 +530,6 @@ void CS_CancelOneShotCmd(const CS_NoArgsCmd_t *CmdPtr)
if (Status == CFE_SUCCESS)
{
CS_AppData.ChildTaskID = CFE_ES_TASKID_UNDEFINED;
CS_AppData.HkPacket.Payload.RecomputeInProgress = false;
CS_AppData.HkPacket.Payload.OneShotInProgress = false;
CS_AppData.HkPacket.Payload.CmdCounter++;
CFE_EVS_SendEvent(CS_ONESHOT_CANCELLED_INF_EID, CFE_EVS_EventType_INFORMATION,
Expand Down
2 changes: 1 addition & 1 deletion unit-test/cs_cmds_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ void CS_OneShotCmd_Test_CreateChildTaskError(void)
memset(&CmdPacket, 0, sizeof(CmdPacket));

snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH,
"OneShot checkum failed, CFE_ES_CreateChildTask returned: 0x%%08X");
"OneShot checksum failed, CFE_ES_CreateChildTask returned: 0x%%08X");

CS_AppData.HkPacket.Payload.RecomputeInProgress = false;

Expand Down
Loading