Skip to content

Commit

Permalink
move success event into managetable
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Jun 6, 2024
1 parent d4c5154 commit 6a5779c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fa1b49",
"activityBar.background": "#fa1b49",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#dd0531"
}
10 changes: 0 additions & 10 deletions fsw/inc/sc_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -1354,16 +1354,6 @@
*/
#define SC_AUTOSTART_RTS_INV_ID_ERR_EID 138

/**
* \brief SC Table Manage Request Table ID Invalid Event ID
*
* \par Type: INFORMATION
*
* \par Cause:
* This event message is issued when a #SC_MANAGE_TABLE_CC command was received and executed successfully
*/
#define SC_MANAGE_TABLE_INF_EID 111
/**\}*/

#endif
19 changes: 8 additions & 11 deletions fsw/src/sc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd)
{
int32 ArrayIndex;
int32 TableID = Cmd->Payload.Parameter;
CFE_Status_t Status = CFE_SUCCESS;

/* Manage selected table as appropriate for each table type */
if ((TableID >= SC_TBL_ID_ATS_0) && (TableID < (SC_TBL_ID_ATS_0 + SC_NUMBER_OF_ATS)))
Expand Down Expand Up @@ -654,16 +653,6 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd)
else
{
/* Invalid table ID */
Status = SC_ERROR;
}

if (Status == CFE_SUCCESS)
{
CFE_EVS_SendEvent(SC_MANAGE_TABLE_INF_EID, CFE_EVS_EventType_INFORMATION,
"Table manage command.");
}
else
{
CFE_EVS_SendEvent(SC_TABLE_MANAGE_ID_ERR_EID, CFE_EVS_EventType_ERROR,
"Table manage command packet error: table ID = %d",
(int)TableID);
Expand Down Expand Up @@ -762,6 +751,8 @@ void SC_ManageTable(SC_TableType type, int32 ArrayIndex)
{
SC_UpdateAppend();
}

Result = CFE_SUCCESS;
}
else if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_ERR_NEVER_LOADED))
{
Expand All @@ -785,4 +776,10 @@ void SC_ManageTable(SC_TableType type, int32 ArrayIndex)
}
}

if ((Result == CFE_SUCCESS) || (Result == CFE_TBL_INFO_UPDATED))
{
CFE_EVS_SendEvent(SC_TABLE_MANAGE_INF_EID, CFE_EVS_EventType_INFORMATION,
"Table manage command.");
}

} /* End SC_ManageTable() */

0 comments on commit 6a5779c

Please sign in to comment.