From a4f544b45c00497c0bd1a930f260699a6b1a6495 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 26 Dec 2023 11:24:40 -0500 Subject: [PATCH 1/2] Fix #206, updating sample_app to use new versioning system. --- fsw/src/sample_app.c | 6 +++++- fsw/src/sample_app.h | 1 + fsw/src/sample_app_version.h | 26 ++++++++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index b3b7e8a..6a96de4 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -110,6 +110,7 @@ void SAMPLE_APP_Main(void) int32 SAMPLE_APP_Init(void) { int32 status; + char VersionString[SAMPLE_APP_CFG_MAX_VERSION_STR_LEN]; /* Zero out the global data structure */ memset(&SAMPLE_APP_Data, 0, sizeof(SAMPLE_APP_Data)); @@ -191,8 +192,11 @@ int32 SAMPLE_APP_Init(void) status = CFE_TBL_Load(SAMPLE_APP_Data.TblHandles[0], CFE_TBL_SRC_FILE, SAMPLE_APP_TABLE_FILE); } + CFE_Config_GetVersionString(VersionString, SAMPLE_APP_CFG_MAX_VERSION_STR_LEN, "Sample App", + SAMPLE_APP_VERSION, SAMPLE_APP_BUILD_CODENAME, SAMPLE_APP_LAST_OFFICIAL); + CFE_EVS_SendEvent(SAMPLE_APP_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "Sample App Initialized.%s", - SAMPLE_APP_VERSION_STRING); + VersionString); } return status; diff --git a/fsw/src/sample_app.h b/fsw/src/sample_app.h index 321d1d8..c2cac81 100644 --- a/fsw/src/sample_app.h +++ b/fsw/src/sample_app.h @@ -29,6 +29,7 @@ ** Required header files. */ #include "cfe.h" +#include "cfe_config.h" #include "sample_app_mission_cfg.h" #include "sample_app_platform_cfg.h" diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index be86775..c218b4c 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -27,16 +27,22 @@ /* Development Build Macro Definitions */ -#define SAMPLE_APP_BUILD_NUMBER 69 /*!< Development Build: Number of commits since baseline */ -#define SAMPLE_APP_BUILD_BASELINE \ - "v1.3.0-rc4" /*!< Development Build: git tag that is the base for the current development */ +#define SAMPLE_APP_BUILD_NUMBER 69 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_APP_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */ +#define SAMPLE_APP_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ +#define SAMPLE_APP_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ /* * Version Macros, see \ref cfsversions for definitions. */ #define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief Major version number. */ #define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief Minor version number. */ -#define SAMPLE_APP_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/ +#define SAMPLE_APP_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/ + +/** + * @brief Last official release. + */ +#define SAMPLE_APP_LAST_OFFICIAL "v1.1.0" /*! * @brief Mission revision. @@ -57,12 +63,12 @@ */ #define SAMPLE_APP_VERSION SAMPLE_APP_BUILD_BASELINE "+dev" SAMPLE_APP_STR(SAMPLE_APP_BUILD_NUMBER) -/*! @brief Development Build Version String. - * @details Reports the current development build's baseline, number, and name. Also includes a note about the latest - * official version. @n See @ref cfsversions for format differences between development and release versions. +/** + * @brief Max Version String length. + * + * Maximum length that an OSAL version string can be. + * */ -#define SAMPLE_APP_VERSION_STRING \ - " Sample App DEVELOPMENT BUILD " SAMPLE_APP_VERSION \ - ", Last Official Release: v1.1.0" /* For full support please use this version */ +#define SAMPLE_APP_CFG_MAX_VERSION_STR_LEN 256 #endif /* SAMPLE_APP_VERSION_H */ From 6f29a5e2a8a98892fe54856988189ed8f3f4054c Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 17 Jan 2024 14:13:13 -0500 Subject: [PATCH 2/2] Updating documentation and version numbers for equuleus-rc1+dev36 --- CHANGELOG.md | 4 ++++ fsw/src/sample_app_version.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f444e2a..1024d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Development Build: equuleus-rc1+dev36 +- updating sample_app to use new versioning system +- See + ## Development Build: v1.3.0-rc4+dev69 - define msgids via topicids - See diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index c218b4c..fd9349b 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -27,7 +27,7 @@ /* Development Build Macro Definitions */ -#define SAMPLE_APP_BUILD_NUMBER 69 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_APP_BUILD_NUMBER 36 /*!< Development Build: Number of commits since baseline */ #define SAMPLE_APP_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */ #define SAMPLE_APP_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ #define SAMPLE_APP_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */