reworked fsfw version handling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-03-09 19:05:54 +01:00
parent ea49e3b8cd
commit 62348bb37d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 10 additions and 9 deletions

View File

@ -4,9 +4,9 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "OBSWVersion.h" #include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/timemanager/Stopwatch.h" #include "fsfw/timemanager/Stopwatch.h"
#include "fsfw/version.h"
#include "watchdogConf.h" #include "watchdogConf.h"
#if OBSW_USE_TMTC_TCP_BRIDGE == 0 #if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTmTcBridge.h" #include "fsfw/osal/common/UdpTmTcBridge.h"
@ -608,6 +608,7 @@ ReturnValue_t CoreController::incrementAllocationFailureCount() {
} }
ReturnValue_t CoreController::initVersionFile() { ReturnValue_t CoreController::initVersionFile() {
using namespace fsfw;
std::string unameFileName = "/tmp/uname_version.txt"; 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 // 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; 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::string fullObswVersionString = "OBSW: v" + std::to_string(SW_VERSION) + "." +
std::to_string(SW_SUBVERSION) + "." + std::to_string(SW_SUBVERSION) + "." +
std::to_string(SW_REVISION); std::to_string(SW_REVISION);
std::string fullFsfwVersionString = "FSFW: v" + std::to_string(FSFW_VERSION) + "." + std::string fullFsfwVersionString = "FSFW: v" + std::to_string(FSFW_VERSION.major) + "." +
std::to_string(FSFW_SUBVERSION) + "." + std::to_string(FSFW_VERSION.minor) + "." +
std::to_string(FSFW_REVISION); std::to_string(FSFW_VERSION.revision);
std::string systemString = "System: " + unameLine; std::string systemString = "System: " + unameLine;
std::string mountPrefix = SdCardManager::instance()->getCurrentMountPrefix(); std::string mountPrefix = SdCardManager::instance()->getCurrentMountPrefix();
std::string versionFilePath = mountPrefix + VERSION_FILE; std::string versionFilePath = mountPrefix + VERSION_FILE;

View File

@ -13,7 +13,7 @@
static int OBSW_ALREADY_RUNNING = -2; static int OBSW_ALREADY_RUNNING = -2;
int obsw::obsw() { int obsw::obsw() {
fsfw::Version version; using namespace fsfw;
fsfw::getVersion(version); fsfw::getVersion(version);
std::cout << "-- EIVE OBSW --" << std::endl; std::cout << "-- EIVE OBSW --" << std::endl;
#if BOARD_TE0720 == 0 #if BOARD_TE0720 == 0
@ -22,8 +22,8 @@ int obsw::obsw() {
std::cout << "-- Compiled for Linux (TE0720) --" << std::endl; std::cout << "-- Compiled for Linux (TE0720) --" << std::endl;
#endif #endif
std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_REVISION << ", FSFW v" std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_REVISION << ", FSFW v"
<< version.major << "." << version.minor << "." << version.revision << "--" << FSFW_VERSION.major << "." << FSFW_VERSION.minor << "." << FSFW_VERSION.revision
<< std::endl; << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
#if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1 #if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1

2
fsfw

@ -1 +1 @@
Subproject commit 3b497dbb8dae77f1cf28f50f7ba770c4256acd2d Subproject commit 9509847b849c18374a5df809c2fb83dd98d66dc3

2
tmtc

@ -1 +1 @@
Subproject commit abe9c8bc000e834b99a2c367ed10f927eeb666b0 Subproject commit de68ad9341fbe5570b84305f33562702e3486364