Update FSFW version #182

Merged
meierj merged 3 commits from mueller/update-fsfw-version-handling into develop 2022-03-14 18:58:33 +01:00
5 changed files with 18 additions and 21 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"
@ -618,6 +618,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;
@ -634,9 +635,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) + "." + char versionString[16] = {};
std::to_string(FSFW_SUBVERSION) + "." + fsfw::FSFW_VERSION.getVersion(versionString, sizeof(versionString));
std::to_string(FSFW_REVISION); std::string fullFsfwVersionString = "FSFW: v" + std::string(versionString);
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

@ -6,10 +6,10 @@
#include <cstddef> #include <cstddef>
#include "CoreDefinitions.h"
#include "bsp_q7s/memory/SdCardManager.h" #include "bsp_q7s/memory/SdCardManager.h"
#include "events/subsystemIdRanges.h" #include "events/subsystemIdRanges.h"
#include "fsfw/controller/ExtendedControllerBase.h" #include "fsfw/controller/ExtendedControllerBase.h"
#include "CoreDefinitions.h"
class Timer; class Timer;
class SdCardManager; class SdCardManager;

View File

@ -8,18 +8,13 @@ namespace core {
static const uint8_t HK_SET_ENTRIES = 3; static const uint8_t HK_SET_ENTRIES = 3;
static const uint32_t HK_SET_ID = 5; static const uint32_t HK_SET_ID = 5;
enum PoolIds { enum PoolIds { TEMPERATURE, PS_VOLTAGE, PL_VOLTAGE };
TEMPERATURE,
PS_VOLTAGE,
PL_VOLTAGE
};
/** /**
* @brief Set storing OBC internal housekeeping data * @brief Set storing OBC internal housekeeping data
*/ */
class HkSet : public StaticLocalDataSet<HK_SET_ENTRIES> { class HkSet : public StaticLocalDataSet<HK_SET_ENTRIES> {
public: public:
HkSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, HK_SET_ID) {} HkSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, HK_SET_ID) {}
HkSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, HK_SET_ID)) {} HkSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, HK_SET_ID)) {}
@ -32,13 +27,13 @@ class HkSet : public StaticLocalDataSet<HK_SET_ENTRIES> {
lp_var_t<float> plVoltage = lp_var_t<float>(sid.objectId, PoolIds::PL_VOLTAGE, this); lp_var_t<float> plVoltage = lp_var_t<float>(sid.objectId, PoolIds::PL_VOLTAGE, this);
void printSet() { void printSet() {
sif::info << "HkSet::printSet: On-chip temperature: " << this->temperature sif::info << "HkSet::printSet: On-chip temperature: " << this->temperature << " °C"
<< " °C" << std::endl; << std::endl;
sif::info << "HkSet::printSet: PS voltage: " << this->psVoltage << " mV" << std::endl; sif::info << "HkSet::printSet: PS voltage: " << this->psVoltage << " mV" << std::endl;
sif::info << "HkSet::printSet: PL voltage: " << this->plVoltage << " mV" << std::endl; sif::info << "HkSet::printSet: PL voltage: " << this->plVoltage << " mV" << std::endl;
} }
}; };
} } // namespace core
#endif /* BSP_Q7S_CORE_COREDEFINITIONS_H_ */ #endif /* BSP_Q7S_CORE_COREDEFINITIONS_H_ */

View File

@ -6,13 +6,14 @@
#include "InitMission.h" #include "InitMission.h"
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "OBSWVersion.h" #include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h" #include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#include "watchdogConf.h" #include "watchdogConf.h"
static int OBSW_ALREADY_RUNNING = -2; static int OBSW_ALREADY_RUNNING = -2;
int obsw::obsw() { int obsw::obsw() {
using namespace fsfw;
std::cout << "-- EIVE OBSW --" << std::endl; std::cout << "-- EIVE OBSW --" << std::endl;
#if BOARD_TE0720 == 0 #if BOARD_TE0720 == 0
std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl; std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl;
@ -20,7 +21,7 @@ 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"
<< FSFW_VERSION << "." << FSFW_SUBVERSION << "." << FSFW_REVISION << "--" << std::endl; << FSFW_VERSION << "--" << 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 47d158156b9efa0edbca9b3a1694f4132b0b30e5 Subproject commit 5ca5fe4040189ff8bc6553a9febdb6ffdeb73fe3