Skip to content

Commit

Permalink
Merge pull request #88 from thnkslprpt/fix-87-combine-mutually-exclus…
Browse files Browse the repository at this point in the history
…ive-status-checks

Fix #87, Combine consecutive, mutually-exclusive status checks
  • Loading branch information
dzbaker authored Apr 6, 2023
2 parents 0add473 + 52ebdb7 commit 6418164
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fsw/inc/ds_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
*
* \par Limits:
* None -- however, the user should be cautioned that a very
* small value will allow an size limit that closes files too
* small value will allow a size limit that closes files too
* frequently, while a very large value will effectively
* prevent files from ever being closed due to size.
*/
Expand Down
15 changes: 5 additions & 10 deletions fsw/src/ds_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void DS_AppMain(void)
CFE_ES_PerfLogEntry(DS_APPMAIN_PERF_ID);

/*
** Perform application specific initialization...
** Perform application-specific initialization...
*/
Result = DS_AppInitialize();

Expand Down Expand Up @@ -202,11 +202,7 @@ int32 DS_AppInitialize(void)
{
CFE_ES_WriteToSysLog("DS App: Error registering for Event Services, RC = 0x%08X\n", (unsigned int)Result);
}

/*
** Create application Software Bus message pipe...
*/
if (Result == CFE_SUCCESS)
else
{
Result = CFE_SB_CreatePipe(&DS_AppData.CmdPipe, DS_APP_PIPE_DEPTH, DS_APP_PIPE_NAME);
if (Result != CFE_SUCCESS)
Expand Down Expand Up @@ -275,7 +271,7 @@ int32 DS_AppInitialize(void)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Process hk request command */
/* Process HK request command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

Expand Down Expand Up @@ -346,15 +342,15 @@ void DS_AppSendHkCmd(void)
PayloadPtr->AppEnableState = DS_AppData.AppEnableState;

/*
** Compute file growth rate from number of bytes since last HK request...
** Compute file growth rate from the number of bytes since the last HK request...
*/
for (i = 0; i < DS_DEST_FILE_CNT; i++)
{
DS_AppData.FileStatus[i].FileRate = DS_AppData.FileStatus[i].FileGrowth / DS_SECS_PER_HK_CYCLE;
DS_AppData.FileStatus[i].FileGrowth = 0;
}

/* Get the filter table info, put the file name in the hk pkt. */
/* Get the filter table info, put the file name in the HK pkt. */
Status = snprintf(FilterTblName, CFE_MISSION_TBL_MAX_NAME_LENGTH, "DS.%s", DS_FILTER_TBL_NAME);
if (Status >= 0)
{
Expand All @@ -364,7 +360,6 @@ void DS_AppSendHkCmd(void)
strncpy(PayloadPtr->FilterTblFilename, FilterTblInfo.LastFileLoaded, OS_MAX_PATH_LEN - 1);
PayloadPtr->FilterTblFilename[OS_MAX_PATH_LEN - 1] = '\0';
}

else
{
/* If the filter table name is invalid, send an event and erase any
Expand Down

0 comments on commit 6418164

Please sign in to comment.