From 41d93b10badf8cf808d988dfeaa56d4d2dea686c Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jan 2020 15:24:45 -0500 Subject: [PATCH 1/2] Fixes #35, Build fails with deprecated cFE/OSAL elements removed --- fsw/src/sample_app.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 7aab4c1..42cdfe9 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -64,18 +64,18 @@ void SAMPLE_AppMain( void ) /* ** Perform application specific initialization ** If the Initialization fails, set the RunStatus to - ** CFE_ES_APP_ERROR and the App will not enter the RunLoop + ** CFE_ES_RunStatus_APP_ERROR and the App will not enter the RunLoop */ status = SAMPLE_AppInit(); if (status != CFE_SUCCESS) { - Sample_AppData.RunStatus = CFE_ES_APP_ERROR; + Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } /* ** SAMPLE Runloop */ - while (CFE_ES_RunLoop(&Sample_AppData.RunStatus) == TRUE) + while (CFE_ES_RunLoop(&Sample_AppData.RunStatus) == true) { /* ** Performance Log Exit Stamp @@ -99,10 +99,10 @@ void SAMPLE_AppMain( void ) else { CFE_EVS_SendEvent(SAMPLE_PIPE_ERR_EID, - CFE_EVS_ERROR, + CFE_EVS_EventType_ERROR, "SAMPLE APP: SB Pipe Read Error, App Will Exit"); - Sample_AppData.RunStatus = CFE_ES_APP_ERROR; + Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } } @@ -125,7 +125,7 @@ int32 SAMPLE_AppInit( void ) { int32 status; - Sample_AppData.RunStatus = CFE_ES_APP_RUN; + Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; /* ** Initialize app command execution counters @@ -163,7 +163,7 @@ int32 SAMPLE_AppInit( void ) */ status = CFE_EVS_Register(Sample_AppData.SAMPLE_EventFilters, SAMPLE_EVENT_COUNTS, - CFE_EVS_BINARY_FILTER); + CFE_EVS_EventFilter_BINARY); if (status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("Sample App: Error Registering Events, RC = 0x%08lX\n", @@ -240,7 +240,7 @@ int32 SAMPLE_AppInit( void ) } CFE_EVS_SendEvent (SAMPLE_STARTUP_INF_EID, - CFE_EVS_INFORMATION, + CFE_EVS_EventType_INFORMATION, "SAMPLE App Initialized. Version %d.%d.%d.%d", SAMPLE_APP_MAJOR_VERSION, SAMPLE_APP_MINOR_VERSION, @@ -277,7 +277,7 @@ void SAMPLE_ProcessCommandPacket( CFE_SB_MsgPtr_t Msg ) default: CFE_EVS_SendEvent(SAMPLE_INVALID_MSGID_ERR_EID, - CFE_EVS_ERROR, + CFE_EVS_EventType_ERROR, "SAMPLE: invalid command packet,MID = 0x%x", MsgId); break; @@ -330,7 +330,7 @@ void SAMPLE_ProcessGroundCommand( CFE_SB_MsgPtr_t Msg ) /* default case already found during FC vs length test */ default: CFE_EVS_SendEvent(SAMPLE_COMMAND_ERR_EID, - CFE_EVS_ERROR, + CFE_EVS_EventType_ERROR, "Invalid ground command code: CC = %d", CommandCode); break; @@ -388,7 +388,7 @@ void SAMPLE_NoopCmd( const SAMPLE_Noop_t *Msg ) Sample_AppData.CmdCounter++; CFE_EVS_SendEvent(SAMPLE_COMMANDNOP_INF_EID, - CFE_EVS_INFORMATION, + CFE_EVS_EventType_INFORMATION, "SAMPLE: NOOP command Version %d.%d.%d.%d", SAMPLE_APP_MAJOR_VERSION, SAMPLE_APP_MINOR_VERSION, @@ -414,7 +414,7 @@ void SAMPLE_ResetCounters( const SAMPLE_ResetCounters_t *Msg ) Sample_AppData.ErrCounter = 0; CFE_EVS_SendEvent(SAMPLE_COMMANDRST_INF_EID, - CFE_EVS_INFORMATION, + CFE_EVS_EventType_INFORMATION, "SAMPLE: RESET command"); return; @@ -479,7 +479,7 @@ bool SAMPLE_VerifyCmdLength( CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength ) uint16 CommandCode = CFE_SB_GetCmdCode(Msg); CFE_EVS_SendEvent(SAMPLE_LEN_ERR_EID, - CFE_EVS_ERROR, + CFE_EVS_EventType_ERROR, "Invalid Msg length: ID = 0x%X, CC = %d, Len = %d, Expected = %d", MessageID, CommandCode, From ca27f9c0f8ddfbc8ba6ba30d83852cfd6793d275 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Fri, 28 Feb 2020 16:23:02 -0500 Subject: [PATCH 2/2] Increase version to 1.1.4, update README --- README.md | 5 +++-- fsw/src/sample_app_version.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3343ac2..7273ada 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,9 @@ This sample application is a non-flight example application implementation for t sample_app is an example for how to build and link an application in cFS. ## Version Notes - +- 1.1.4 + - Fix for a clean build with OMIT_DEPRECATED + - Minor updates (see https://github.com/nasa/sample_app/pull/44) - 1.1.3 - Minor updates (see https://github.com/nasa/sample_app/pull/34) - 1.1.2 @@ -30,4 +32,3 @@ As a sample application, extensive testing is not performed prior to release and For best results, submit issues:questions or issues:help wanted requests at https://github.com/nasa/cFS. Official cFS page: http://cfs.gsfc.nasa.gov - diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index a748939..cea877b 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -33,7 +33,7 @@ #define SAMPLE_APP_MAJOR_VERSION 1 #define SAMPLE_APP_MINOR_VERSION 1 -#define SAMPLE_APP_REVISION 3 +#define SAMPLE_APP_REVISION 4 #define SAMPLE_APP_MISSION_REV 0