diff --git a/CMakeLists.txt b/CMakeLists.txt index 585284ac..9c85453c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,10 @@ set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") option(EIVE_ADD_ETL_LIB "Add ETL library" ON) option(EIVE_ADD_JSON_LIB "Add JSON library" ON) - +option(EIVE_HARDCODED_TOOLCHAIN_FILE "\ +For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \ +if a different toolchain file is set externally" ON +) option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF) option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON) @@ -41,7 +44,7 @@ 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.. +# the project call. We could also exclude doing this when the Q7S primary OBSW is built.. find_package(Catch2 3 CONFIG QUIET) # Project Name @@ -99,10 +102,14 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake) pre_source_hw_os_config() if(TGT_BSP) + set(LIBGPS_VERSION_MAJOR 3) + # I assume a newer version than 3.17 will be installed on other Linux board than the Q7S + set(LIBGPS_VERSION_MINOR 20) if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse" OR TGT_BSP MATCHES "arm/te0720-1cfa" ) + find_library(${LIB_GPS} gps) set(FSFW_CONFIG_PATH "linux/fsfwconfig") if(NOT BUILD_Q7S_SIMPLE_MODE) set(EIVE_ADD_LINUX_FILES TRUE) @@ -133,6 +140,8 @@ if(TGT_BSP) if(TGT_BSP MATCHES "arm/q7s") # Used by configure file set(XIPHOS_Q7S ON) + set(LIBGPS_VERSION_MAJOR 3) + set(LIBGPS_VERSION_MINOR 17) endif() if(TGT_BSP MATCHES "arm/te0720-1cfa") @@ -154,8 +163,6 @@ elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse") configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h) endif() - - configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h) # Set common config path for FSFW @@ -243,8 +250,13 @@ else() endif() set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME}) -#watchdog -add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL) +# Watchdog +if(TGT_BSP MATCHES "arm/q7s") + add_executable(${WATCHDOG_NAME}) +else() + add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL) +endif() + add_subdirectory(${WATCHDOG_PATH}) target_link_libraries(${WATCHDOG_NAME} PUBLIC ${LIB_CXX_FS} @@ -310,8 +322,8 @@ target_link_libraries(${OBSW_NAME} PRIVATE if(TGT_BSP MATCHES "arm/q7s") target_link_libraries(${LIB_EIVE_MISSION} PUBLIC - ${LIB_ARCSEC} ${LIB_GPS} + ${LIB_ARCSEC} ) endif() @@ -369,7 +381,7 @@ endif() -if(${CMAKE_CROSSCOMPILING}) +if(CMAKE_CROSSCOMPILING) include (${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake) post_source_hw_os_config() endif() @@ -391,6 +403,8 @@ else() endif() endif() +install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin) + string(CONCAT POST_BUILD_COMMENT "Build directory: ${CMAKE_BINARY_DIR}\n" "Target OSAL: ${FSFW_OSAL}\n" @@ -405,6 +419,5 @@ add_custom_command( COMMENT ${POST_BUILD_COMMENT} ) - include (${CMAKE_SCRIPT_PATH}/BuildType.cmake) set_build_type() diff --git a/README.md b/README.md index 4d897980..7f9e9d72 100644 --- a/README.md +++ b/README.md @@ -163,23 +163,26 @@ automatically. The EIVE OBSW is the default target if no target is specified. +**Debug** + ```sh mkdir build-Debug-Q7S && cd build-Debug-Q7S cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug .. cmake --build . -j ``` -### Q7S Watchdog - -To build the EIVE watchdog, the corresponding target must be specified in the build command. -The configure steps do not need to be repeated if the folder has already been configured. +**Release** ```sh -mkdir build-Debug-Watchdog && cd build-Debug-Watchdog -cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug .. -cmake --build . --target eive-watchdog -j +mkdir build-Release-Q7S && cd build-Release-Q7S +cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Release .. +cmake --build . -j ``` +### Q7S Watchdog + +The watchdog will be built along side the primary OBSW binary. + ### Hosted You can also use the FSFW OSAL `host` to build on Windows or for generic OSes. diff --git a/automation/Dockerfile b/automation/Dockerfile index 63592c77..32d7240f 100644 --- a/automation/Dockerfile +++ b/automation/Dockerfile @@ -8,13 +8,13 @@ RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl git gcc g++ lcov # Q7S root filesystem, required for cross-compilation. RUN mkdir -p /usr/rootfs; \ -curl https://buggy.irs.uni-stuttgart.de/eive/tools/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \ - | tar -xz -C /usr/rootfs +curl https://buggy.irs.uni-stuttgart.de/eive/tools/eive-compile-rootfs-v0.1.0-7-gae69838.tar.xz \ + | tar -xJ -C /usr/rootfs # Cross compiler RUN mkdir -p /usr/tools; \ curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \ | tar -xz -C /usr/tools -ENV ZYNQ_7020_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi" +ENV ZYNQ_7020_SYSROOT="/usr/rootfs/eive-compile-rootfs" ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin" diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index ee50924a..f8b180a1 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { } agent { docker { - image 'eive-obsw-ci:d3' + image 'eive-obsw-ci:d4' args '--sysctl fs.mqueue.msg_max=100' } } diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index bc6efd7a..e8cc5bd2 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -8,7 +8,7 @@ static constexpr char SPI_RW_DEV[] = "/dev/spi-rw"; static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive"; -static constexpr char UART_GNSS_DEV[] = "/dev/ul-gps"; +static constexpr char UART_GNSS_DEV[] = "/dev/gps0"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul-plmpsoc"; static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul-plsv"; static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks"; diff --git a/bsp_q7s/boardtest/Q7STestTask.cpp b/bsp_q7s/boardtest/Q7STestTask.cpp index 8b96450f..c3eb37ca 100644 --- a/bsp_q7s/boardtest/Q7STestTask.cpp +++ b/bsp_q7s/boardtest/Q7STestTask.cpp @@ -246,7 +246,11 @@ void Q7STestTask::testGpsDaemon() { sif::warning << "Q7STestTask: Reading GPS data failed" << std::endl; } sif::info << "-- Q7STestTask: GPS shared memory read test --" << std::endl; +#if LIBGPS_VERSION_MINOR <= 17 + time_t timeRaw = gps->fix.time; +#else time_t timeRaw = gps->fix.time.tv_sec; +#endif std::tm* time = gmtime(&timeRaw); sif::info << "Time: " << std::put_time(time, "%c %Z") << std::endl; sif::info << "Visible satellites: " << gps->satellites_visible << std::endl; @@ -254,7 +258,11 @@ void Q7STestTask::testGpsDaemon() { sif::info << "Fix (0:Not Seen|1:No Fix|2:2D|3:3D): " << gps->fix.mode << std::endl; sif::info << "Latitude: " << gps->fix.latitude << std::endl; sif::info << "Longitude: " << gps->fix.longitude << std::endl; +#if LIBGPS_VERSION_MINOR <= 17 + sif::info << "Altitude(MSL): " << gps->fix.altitude << std::endl; +#else sif::info << "Altitude(MSL): " << gps->fix.altMSL << std::endl; +#endif sif::info << "Speed(m/s): " << gps->fix.speed << std::endl; } diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 73fd49bb..208999c2 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -29,7 +29,10 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP; xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY; CoreController::CoreController(object_id_t objectId) - : ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), opDivider(5), hkSet(this) { + : ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), + opDivider5(5), + opDivider10(10), + hkSet(this) { ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; try { result = initWatchdogFifo(); @@ -75,6 +78,8 @@ void CoreController::performControlOperation() { sdStateMachine(); performMountedSdCardOperations(); readHkData(); + opDivider5.checkAndIncrement(); + opDivider10.checkAndIncrement(); } ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, @@ -141,7 +146,7 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() { } // Add script folder to path char *currentEnvPath = getenv("PATH"); - std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts"; + std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin"; setenv("PATH", updatedEnvPath.c_str(), true); updateProtInfo(); initPrint(); @@ -1200,7 +1205,7 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) { void CoreController::performWatchdogControlOperation() { // Only perform each fifth iteration - if (watchdogFifoFd != 0 and opDivider.checkAndIncrement()) { + if (watchdogFifoFd != 0 and opDivider5.check()) { if (watchdogFifoFd == RETRY_FIFO_OPEN) { // Open FIFO write only and non-blocking watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK); @@ -1692,14 +1697,22 @@ void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::C } ReturnValue_t CoreController::timeFileHandler() { - if (gpsFix == GpsHyperion::FixMode::FIX_2D or gpsFix == GpsHyperion::FixMode::FIX_3D) { + // Always set time. We could only set it if it is updated by GPS, but then the backup time would + // become obsolete on GPS problems. + if (opDivider10.check()) { // It is assumed that the system time is set from the GPS time timeval currentTime = {}; ReturnValue_t result = Clock::getClock_timeval(¤tTime); if (result != HasReturnvaluesIF::RETURN_OK) { return result; } - std::ofstream timeFile(currMntPrefix + TIME_FILE); + std::string fileName = currMntPrefix + TIME_FILE; + std::ofstream timeFile(fileName); + if (not timeFile.good()) { + sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) + << std::endl; + return RETURN_FAILED; + } timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; } return RETURN_OK; diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index b5e4e511..dee06530 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -48,7 +48,7 @@ class CoreController : public ExtendedControllerBase { static xsc::Chip CURRENT_CHIP; static xsc::Copy CURRENT_COPY; - static constexpr char CHIP_PROT_SCRIPT[] = "/home/root/scripts/get-chip-prot-status.sh"; + static constexpr char CHIP_PROT_SCRIPT[] = "get-chip-prot-status.sh"; static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt"; static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt"; static constexpr char CONF_FOLDER[] = "conf"; @@ -188,7 +188,8 @@ class CoreController : public ExtendedControllerBase { * Index 3: Chip 1 Copy 1 */ std::array protArray; - PeriodicOperationDivider opDivider; + PeriodicOperationDivider opDivider5; + PeriodicOperationDivider opDivider10; core::HkSet hkSet; diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index c9c8e0e2..ecc88ede 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -164,11 +164,9 @@ void ObjectFactory::produce(void* args) { pcdu::Switches::PDU1_CH3_MGT_5V); imtqHandler->setPowerSwitcher(pwrSwitcher); static_cast(imtqHandler); -#if OBSW_DEBUG_IMTQ == 1 +#if OBSW_TEST_IMTQ == 1 imtqHandler->setStartUpImmediately(); imtqHandler->setToGoToNormal(true); -#else - (void)imtqHandler; #endif #endif createReactionWheelComponents(gpioComIF); @@ -177,12 +175,8 @@ void ObjectFactory::produce(void* args) { I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); BpxBatteryHandler* bpxHandler = new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie); -#if OBSW_TEST_BPX_BATT == 1 - bpxHandler->setToGoToNormalMode(true); bpxHandler->setStartUpImmediately(); -#else - static_cast(bpxHandler); -#endif + bpxHandler->setToGoToNormalMode(true); #endif new FileSystemHandler(objects::FILE_SYSTEM_HANDLER); diff --git a/cmake/HardwareOsPostConfig.cmake b/cmake/HardwareOsPostConfig.cmake index e7fb257a..841085f5 100644 --- a/cmake/HardwareOsPostConfig.cmake +++ b/cmake/HardwareOsPostConfig.cmake @@ -42,6 +42,7 @@ add_compile_options( ) set(STRIPPED_OBSW_NAME ${OBSW_BIN_NAME}-stripped) +set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped) add_custom_command( TARGET ${OBSW_NAME} @@ -51,4 +52,12 @@ add_custom_command( COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.." ) +add_custom_command( + TARGET ${WATCHDOG_NAME} + POST_BUILD + COMMAND ${CMAKE_STRIP} --strip-all eive-watchdog -o ${STRIPPED_WATCHDOG_NAME} + BYPRODUCTS ${STRIPPED_WATCHDOG_NAME} + COMMENT "Generating stripped executable ${STRIPPED_WATCHDOG_NAME}.." +) + endfunction() \ No newline at end of file diff --git a/cmake/PreProjectConfig.cmake b/cmake/PreProjectConfig.cmake index 41dd7de4..52a71923 100644 --- a/cmake/PreProjectConfig.cmake +++ b/cmake/PreProjectConfig.cmake @@ -11,7 +11,7 @@ endif() # Disable compiler checks for cross-compiling. -if(FSFW_OSAL MATCHES linux AND TGT_BSP) +if(FSFW_OSAL MATCHES linux AND TGT_BSP AND EIVE_HARDCODED_TOOLCHAIN_FILE) if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/te0720-1cfa") set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SCRIPT_PATH}/Zynq7020CrossCompileConfig.cmake" diff --git a/cmake/scripts/Q7S/q7s-env.sh b/cmake/scripts/Q7S/q7s-env.sh index df9dbadc..27cc4c73 100755 --- a/cmake/scripts/Q7S/q7s-env.sh +++ b/cmake/scripts/Q7S/q7s-env.sh @@ -2,6 +2,6 @@ export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin" export CROSS_COMPILE="arm-linux-gnueabihf" -export ZYNQ_7020_SYSROOT="$HOME/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi" +export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi" export CONSOLE_PREFIX="[Q7S ENV]" /bin/bash diff --git a/cmake/scripts/Q7S/win-q7s-env.sh b/cmake/scripts/Q7S/win-q7s-env.sh index 703949e3..7dce820e 100644 --- a/cmake/scripts/Q7S/win-q7s-env.sh +++ b/cmake/scripts/Q7S/win-q7s-env.sh @@ -5,7 +5,7 @@ function help () { } TOOLCHAIN_PATH="/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin" -SYSROOT="/c/Users/${USER}/eive-software/cortexa9hf-neon-xiphos-linux-gnueabi" +SYSROOT="/c/Users/${USER}/eive-software/eive-compile-rootfs" for i in "$@"; do case $i in @@ -46,4 +46,4 @@ if [ -d "$SYSROOT" ]; then else echo "Sysroot path $SYSROOT does not exist" return -fi \ No newline at end of file +fi diff --git a/linux/devices/GPSHyperionLinuxController.cpp b/linux/devices/GPSHyperionLinuxController.cpp index 20860211..42bc43a6 100644 --- a/linux/devices/GPSHyperionLinuxController.cpp +++ b/linux/devices/GPSHyperionLinuxController.cpp @@ -1,6 +1,7 @@ #include "GPSHyperionLinuxController.h" #include "OBSWConfig.h" +#include "fsfw/FSFW.h" #include "fsfw/datapool/PoolReadGuard.h" #include "fsfw/timemanager/Clock.h" #include "linux/utility/utility.h" @@ -17,7 +18,6 @@ GPSHyperionLinuxController::GPSHyperionLinuxController(object_id_t objectId, obj bool debugHyperionGps) : ExtendedControllerBase(objectId, objects::NO_OBJECT), gpsSet(this), - myGpsmm(GPSD_SHARED_MEMORY, nullptr), debugHyperionGps(debugHyperionGps) { timeUpdateCd.resetTimer(); } @@ -36,6 +36,7 @@ ReturnValue_t GPSHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ uint32_t *msToReachTheMode) { if (not modeCommanded) { if (mode == MODE_ON or mode == MODE_OFF) { + gpsNotOpenSwitch = true; // 5h time to reach fix *msToReachTheMode = MAX_SECONDS_TO_REACH_FIX; maxTimeToReachFix.resetTimer(); @@ -105,18 +106,28 @@ ReturnValue_t GPSHyperionLinuxController::handleCommandMessage(CommandMessage *m #ifdef FSFW_OSAL_LINUX void GPSHyperionLinuxController::readGpsDataFromGpsd() { + gpsmm myGpsmm(GPSD_SHARED_MEMORY, nullptr); // The data from the device will generally be read all at once. Therefore, we // can set all field here if (not myGpsmm.is_open()) { - // Opening failed -#if FSFW_VERBOSE_LEVEL >= 1 - sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed" << std::endl; -#endif + if(gpsNotOpenSwitch) { + // Opening failed + #if FSFW_VERBOSE_LEVEL >= 1 + sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed | " << + "Error " << errno << " | " << gps_errstr(errno) << std::endl; + #endif + + gpsNotOpenSwitch = false; + } + return; } gps_data_t *gps = nullptr; gps = myGpsmm.read(); if (gps == nullptr) { - sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl; + if(gpsReadFailedSwitch) { + gpsReadFailedSwitch = false; + sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl; + } return; } PoolReadGuard pg(&gpsSet); @@ -180,10 +191,19 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() { gpsSet.speed.setValid(false); } +#if LIBGPS_VERSION_MINOR <= 17 + gpsSet.unixSeconds.value = gps->fix.time; +#else gpsSet.unixSeconds.value = gps->fix.time.tv_sec; +#endif timeval time = {}; time.tv_sec = gpsSet.unixSeconds.value; +#if LIBGPS_VERSION_MINOR <= 17 + double fractionalPart = gps->fix.time - std::floor(gps->fix.time); + time.tv_usec = fractionalPart * 1000.0 * 1000.0; +#else time.tv_usec = gps->fix.time.tv_nsec / 1000; +#endif std::time_t t = std::time(nullptr); if (time.tv_sec == t) { timeIsConstantCounter++; @@ -222,7 +242,11 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() { gpsSet.seconds = timeOfDay.second; if (debugHyperionGps) { sif::info << "-- Hyperion GPS Data --" << std::endl; +#if LIBGPS_VERSION_MINOR <= 17 + time_t timeRaw = gps->fix.time; +#else time_t timeRaw = gps->fix.time.tv_sec; +#endif std::tm *time = gmtime(&timeRaw); std::cout << "Time: " << std::put_time(time, "%c %Z") << std::endl; std::cout << "Visible satellites: " << gps->satellites_visible << std::endl; @@ -230,7 +254,11 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() { std::cout << "Fix (0:Not Seen|1:No Fix|2:2D|3:3D): " << gps->fix.mode << std::endl; std::cout << "Latitude: " << gps->fix.latitude << std::endl; std::cout << "Longitude: " << gps->fix.longitude << std::endl; +#if LIBGPS_VERSION_MINOR <= 17 + std::cout << "Altitude(MSL): " << gps->fix.altitude << std::endl; +#else std::cout << "Altitude(MSL): " << gps->fix.altMSL << std::endl; +#endif std::cout << "Speed(m/s): " << gps->fix.speed << std::endl; std::time_t t = std::time(nullptr); std::tm tm = *std::gmtime(&t); diff --git a/linux/devices/GPSHyperionLinuxController.h b/linux/devices/GPSHyperionLinuxController.h index dedd782c..42e9741b 100644 --- a/linux/devices/GPSHyperionLinuxController.h +++ b/linux/devices/GPSHyperionLinuxController.h @@ -52,7 +52,8 @@ class GPSHyperionLinuxController : public ExtendedControllerBase { Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000); bool modeCommanded = true; bool timeInit = true; - gpsmm myGpsmm; + bool gpsNotOpenSwitch = true; + bool gpsReadFailedSwitch = true; bool debugHyperionGps = false; uint32_t timeIsConstantCounter = 0; Countdown timeUpdateCd = Countdown(60); diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index bbf8da64..55e6e8c5 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -127,6 +127,8 @@ debugging. */ #define OBSW_DEBUG_PL_PCDU 0 #define OBSW_TEST_BPX_BATT 0 #define OBSW_DEBUG_BPX_BATT 0 +#define OBSW_TEST_IMTQ 0 +#define OBSW_DEBUG_IMTQ 0 #define OBSW_TEST_LIBGPIOD 0 #define OBSW_TEST_PLOC_HANDLER 0 @@ -143,9 +145,8 @@ debugging. */ #define OBSW_DEBUG_GPS 0 #define OBSW_DEBUG_ACU 0 #define OBSW_DEBUG_SYRLINKS 0 -#define OBSW_DEBUG_IMTQ 0 #define OBSW_DEBUG_RW 0 -#define OBSW_DEBUG_PDEC_HANDLER 0 +#define OBSW_DEBUG_PDEC_HANDLER 0 #ifdef TE0720_1CFA #define OBSW_DEBUG_PLOC_SUPERVISOR 1 @@ -191,6 +192,9 @@ debugging. */ /*******************************************************************/ #cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER +#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@ +#cmakedefine LIBGPS_VERSION_MINOR @LIBGPS_VERSION_MINOR@ + #ifdef RASPBERRY_PI #include "rpiConfig.h" #elif defined(XIPHOS_Q7S) diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 6e4535c1..b0f56271 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -589,7 +589,7 @@ - + @@ -603,7 +603,7 @@ - + @@ -698,6 +699,7 @@ + - + @@ -755,8 +758,8 @@ - + @@ -909,7 +912,7 @@ - + diff --git a/misc/eclipse/.project b/misc/eclipse/.project index 62145ff4..86d98589 100644 --- a/misc/eclipse/.project +++ b/misc/eclipse/.project @@ -7,7 +7,7 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, + full,incremental, diff --git a/watchdog/CMakeLists.txt b/watchdog/CMakeLists.txt index 88908436..ecb50627 100644 --- a/watchdog/CMakeLists.txt +++ b/watchdog/CMakeLists.txt @@ -6,3 +6,5 @@ target_sources(${WATCHDOG_NAME} PRIVATE target_include_directories(${WATCHDOG_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) + +install(TARGETS ${WATCHDOG_NAME} RUNTIME DESTINATION bin)