From 4b36313fea33a1ae6c33727596fb72a9ba5d3aa2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 12 Feb 2023 21:34:55 +0100 Subject: [PATCH] update config files --- bsp_q7s/OBSWConfig.h.in | 29 +++++++++++++---------------- bsp_q7s/obsw.cpp | 2 ++ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/bsp_q7s/OBSWConfig.h.in b/bsp_q7s/OBSWConfig.h.in index 9273e4e9..687d9363 100644 --- a/bsp_q7s/OBSWConfig.h.in +++ b/bsp_q7s/OBSWConfig.h.in @@ -13,6 +13,12 @@ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ +#define OBSW_ENABLE_PERIODIC_HK 0 +#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 +// This switch will cause the SW to command the EIVE system object to safe mode. This will +// trigger a lot of events, so it can make sense to disable this for debugging purposes +#define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1 + #define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@ #define OBSW_ADD_MGT @OBSW_ADD_MGT@ #define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@ @@ -39,25 +45,23 @@ #define OBSW_TM_TO_PTME @OBSW_TM_TO_PTME@ // Set to 1 if telecommands are received via the PDEC IP Core #define OBSW_TC_FROM_PDEC @OBSW_TC_FROM_PDEC@ -#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 // Configuration parameter which causes the core controller to try to keep at least one SD card // working #define OBSW_SD_CARD_MUST_BE_ON 1 #define OBSW_ENABLE_TIMERS 1 -// This is a really tricky switch.. It initializes the PCDU switches to their default states -// at powerup. I think it would be better -// to leave it off for now. It makes testing a lot more difficult and it might mess with -// something the operators might want to do by giving the software too much intelligence -// at the wrong place. The system component might command all the Switches accordingly anyway -#define OBSW_INITIALIZE_SWITCHES 0 -#define OBSW_ENABLE_PERIODIC_HK 0 - /*******************************************************************/ /** All of the following flags should be disabled for mission code */ /*******************************************************************/ +// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally +// because UDP packets are not allowed in the VPN +// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the +// CCSDS IP Cores. +#define OBSW_ADD_TMTC_TCP_SERVER 1 +#define OBSW_ADD_TMTC_UDP_SERVER 1 + // Can be used to switch device to NORMAL mode immediately #define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 0 #define OBSW_PRINT_MISSED_DEADLINES 1 @@ -119,13 +123,6 @@ /** CMake Defines */ /*******************************************************************/ -// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally -// because UDP packets are not allowed in the VPN -// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the -// CCSDS IP Cores. -#define OBSW_ADD_TMTC_TCP_SERVER 1 -#define OBSW_ADD_TMTC_UDP_SERVER 1 - #cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER #cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@ diff --git a/bsp_q7s/obsw.cpp b/bsp_q7s/obsw.cpp index 9c071882..6df92158 100644 --- a/bsp_q7s/obsw.cpp +++ b/bsp_q7s/obsw.cpp @@ -74,6 +74,7 @@ int obsw::obsw() { scheduling::initMission(); +#if OBSW_COMMAND_SAFE_MODE_AT_STARTUP == 1 // Command the EIVE system to safe mode auto sysQueueId = satsystem::EIVE_SYSTEM.getCommandQueue(); CommandMessage msg; @@ -83,6 +84,7 @@ int obsw::obsw() { if (result != returnvalue::OK) { sif::error << "Sending safe mode command to EIVE system failed" << std::endl; } +#endif for (;;) { /* Suspend main thread by sleeping it. */