diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d51ac2..b959b5a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,12 @@ endif() include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake) pre_project_config() +# Check whether the user has already installed Catch2 first. This has to come before +# the project call. We could also exlcude doing this when the Q7S primary OBSW is built.. +find_package(Catch2 3 CONFIG QUIET) + # Project Name -project(eive-obsw ASM C CXX) +project(eive-obsw) ################################################################################ # Pre-Sources preparation @@ -150,9 +154,6 @@ set(FSFW_ADDITIONAL_INC_PATHS ${CMAKE_CURRENT_BINARY_DIR} ) -# Check whether the user has already installed Catch2 first -find_package(Catch2 3) - ################################################################################ # Executable and Sources ################################################################################ @@ -199,8 +200,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(COMPILER_FLAGS "/permissive-") endif() + # Not installed, so use FetchContent to download and provide Catch2 if(NOT Catch2_FOUND) + message(STATUS "Did not find a valid Catch2 installation. Using FetchContent to install it") include(FetchContent) FetchContent_Declare( diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 587d22f0..7204db14 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -625,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.major) + "." + - std::to_string(FSFW_VERSION.minor) + "." + - std::to_string(FSFW_VERSION.revision); + char versionString[16] = {}; + fsfw::FSFW_VERSION.getVersion(versionString, sizeof(versionString)); + std::string fullFsfwVersionString = "FSFW: v" + std::string(versionString); 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 ca7271ce..197ca66b 100644 --- a/bsp_q7s/core/obsw.cpp +++ b/bsp_q7s/core/obsw.cpp @@ -14,7 +14,6 @@ static int OBSW_ALREADY_RUNNING = -2; int obsw::obsw() { using namespace fsfw; - fsfw::getVersion(version); std::cout << "-- EIVE OBSW --" << std::endl; #if BOARD_TE0720 == 0 std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl; @@ -22,8 +21,7 @@ int obsw::obsw() { std::cout << "-- Compiled for Linux (TE0720) --" << std::endl; #endif std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_REVISION << ", FSFW v" - << FSFW_VERSION.major << "." << FSFW_VERSION.minor << "." << FSFW_VERSION.revision - << "--" << std::endl; + << FSFW_VERSION << "--" << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; #if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1 diff --git a/bsp_q7s/memory/SdCardManager.cpp b/bsp_q7s/memory/SdCardManager.cpp index b336b84c..4ca11787 100644 --- a/bsp_q7s/memory/SdCardManager.cpp +++ b/bsp_q7s/memory/SdCardManager.cpp @@ -406,7 +406,7 @@ SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) { bool bytesRead = false; #if OBSW_ENABLE_TIMERS == 1 - Countdown timer(100); + Countdown timer(1000); #endif while (true) { ReturnValue_t result = cmdExecutor.check(bytesRead); diff --git a/bsp_q7s/memory/scratchApi.h b/bsp_q7s/memory/scratchApi.h index babd26dc..96264995 100644 --- a/bsp_q7s/memory/scratchApi.h +++ b/bsp_q7s/memory/scratchApi.h @@ -75,7 +75,7 @@ ReturnValue_t readToFile(std::string name, std::ifstream& file, std::string& fil int result = std::system(oss.str().c_str()); if (result != 0) { - if (result == 256) { + if (WEXITSTATUS(result) == 1) { sif::warning << "scratch::readNumber: Key " << name << " does not exist" << std::endl; // Could not find value std::remove(filename.c_str()); diff --git a/common/config/OBSWVersion.h b/common/config/OBSWVersion.h index f719a274..71fd3355 100644 --- a/common/config/OBSWVersion.h +++ b/common/config/OBSWVersion.h @@ -5,6 +5,6 @@ const char* const SW_NAME = "eive"; #define SW_VERSION 1 #define SW_SUBVERSION 9 -#define SW_REVISION 0 +#define SW_REVISION 1 #endif /* COMMON_CONFIG_OBSWVERSION_H_ */ diff --git a/common/config/commonSubsystemIds.h b/common/config/commonSubsystemIds.h index 554f4812..0e64e634 100644 --- a/common/config/commonSubsystemIds.h +++ b/common/config/commonSubsystemIds.h @@ -21,6 +21,7 @@ enum: uint8_t { STR_HELPER = 120, PL_PCDU_HANDLER = 121, ACS_BOARD_ASS = 122, + SUS_BOARD_ASS = 123, COMMON_SUBSYSTEM_ID_END }; } diff --git a/fsfw b/fsfw index 9509847b..fec5f83f 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 9509847b849c18374a5df809c2fb83dd98d66dc3 +Subproject commit fec5f83f4f2459facee25939e0292115f89a6d73 diff --git a/generators/.run/events.run.xml b/generators/.run/events.run.xml index 18f71033..6bc73c96 100644 --- a/generators/.run/events.run.xml +++ b/generators/.run/events.run.xml @@ -12,7 +12,7 @@