From 62348bb37d102106cd06cb89583ee01948df68cb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Mar 2022 19:05:54 +0100 Subject: [PATCH] reworked fsfw version handling --- bsp_q7s/core/CoreController.cpp | 9 +++++---- bsp_q7s/core/obsw.cpp | 6 +++--- fsfw | 2 +- tmtc | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index b1783054..587d22f0 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -4,9 +4,9 @@ #include "OBSWConfig.h" #include "OBSWVersion.h" -#include "fsfw/FSFWVersion.h" #include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/timemanager/Stopwatch.h" +#include "fsfw/version.h" #include "watchdogConf.h" #if OBSW_USE_TMTC_TCP_BRIDGE == 0 #include "fsfw/osal/common/UdpTmTcBridge.h" @@ -608,6 +608,7 @@ ReturnValue_t CoreController::incrementAllocationFailureCount() { } ReturnValue_t CoreController::initVersionFile() { + using namespace fsfw; std::string unameFileName = "/tmp/uname_version.txt"; // TODO: No -v flag for now. If the kernel version is used, need to cut off first few letters std::string unameCmd = "uname -mnrso > " + unameFileName; @@ -624,9 +625,9 @@ ReturnValue_t CoreController::initVersionFile() { std::string fullObswVersionString = "OBSW: v" + std::to_string(SW_VERSION) + "." + std::to_string(SW_SUBVERSION) + "." + std::to_string(SW_REVISION); - std::string fullFsfwVersionString = "FSFW: v" + std::to_string(FSFW_VERSION) + "." + - std::to_string(FSFW_SUBVERSION) + "." + - std::to_string(FSFW_REVISION); + std::string fullFsfwVersionString = "FSFW: v" + std::to_string(FSFW_VERSION.major) + "." + + std::to_string(FSFW_VERSION.minor) + "." + + std::to_string(FSFW_VERSION.revision); std::string systemString = "System: " + unameLine; std::string mountPrefix = SdCardManager::instance()->getCurrentMountPrefix(); std::string versionFilePath = mountPrefix + VERSION_FILE; diff --git a/bsp_q7s/core/obsw.cpp b/bsp_q7s/core/obsw.cpp index 4b0639f7..ca7271ce 100644 --- a/bsp_q7s/core/obsw.cpp +++ b/bsp_q7s/core/obsw.cpp @@ -13,7 +13,7 @@ static int OBSW_ALREADY_RUNNING = -2; int obsw::obsw() { - fsfw::Version version; + using namespace fsfw; fsfw::getVersion(version); std::cout << "-- EIVE OBSW --" << std::endl; #if BOARD_TE0720 == 0 @@ -22,8 +22,8 @@ int obsw::obsw() { std::cout << "-- Compiled for Linux (TE0720) --" << std::endl; #endif std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_REVISION << ", FSFW v" - << version.major << "." << version.minor << "." << version.revision << "--" - << std::endl; + << FSFW_VERSION.major << "." << FSFW_VERSION.minor << "." << FSFW_VERSION.revision + << "--" << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; #if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1 diff --git a/fsfw b/fsfw index 3b497dbb..9509847b 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 3b497dbb8dae77f1cf28f50f7ba770c4256acd2d +Subproject commit 9509847b849c18374a5df809c2fb83dd98d66dc3 diff --git a/tmtc b/tmtc index abe9c8bc..de68ad93 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit abe9c8bc000e834b99a2c367ed10f927eeb666b0 +Subproject commit de68ad9341fbe5570b84305f33562702e3486364