From 5bd4f56bc6c37bc7620495f9c0e86f130b5a4b18 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 19 Jan 2022 14:17:55 +0100 Subject: [PATCH 1/4] flipped preproc defines --- linux/fsfwconfig/OBSWConfig.h.in | 3 +-- mission/tmtc/CCSDSHandler.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index ea26425b..8c25696c 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -39,8 +39,6 @@ debugging. */ // Set to 1 if telecommands are received via the PDEC IP Core #define OBSW_TC_FROM_PDEC 1 -#define TMTC_TEST_SETUP 1 - #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 @@ -78,6 +76,7 @@ debugging. */ //! /* Can be used to switch device to NORMAL mode immediately */ #define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1 #define OBSW_PRINT_MISSED_DEADLINES 1 +#define TMTC_TEST_SETUP 0 // If this is enabled, all other SPI code should be disabled #define OBSW_ADD_TEST_CODE 0 #define OBSW_ADD_SPI_TEST_CODE 0 diff --git a/mission/tmtc/CCSDSHandler.h b/mission/tmtc/CCSDSHandler.h index 6fb6168b..1ee8575a 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/mission/tmtc/CCSDSHandler.h @@ -89,9 +89,9 @@ private: //! [EXPORT] : [COMMENT] Received action message with unknown action id static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0); -#if TMTC_TEST_SETUP == 0 - // syrlinks must not be transmitting more than 15 minutes (according to datasheet) - static const uint32_t TRANSMITTER_TIMEOUT = 900000; //900000 ms = 15 min +#if TMTC_TEST_SETUP == 1 + // syrlinks must not be transmitting more than 15 minutes (according to datasheet) + static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min #else // Set to high value when not sending via syrlinks static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day From eb23dc1b0f80d5209032e4087af496a6d3682d54 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 19 Jan 2022 14:29:03 +0100 Subject: [PATCH 2/4] better names --- linux/fsfwconfig/OBSWConfig.h.in | 3 ++- mission/tmtc/CCSDSHandler.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 8c25696c..fe83c449 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -39,6 +39,7 @@ debugging. */ // Set to 1 if telecommands are received via the PDEC IP Core #define OBSW_TC_FROM_PDEC 1 +#define OBSW_SYRLINKS_DOWNLINK 0 #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 @@ -76,7 +77,7 @@ debugging. */ //! /* Can be used to switch device to NORMAL mode immediately */ #define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1 #define OBSW_PRINT_MISSED_DEADLINES 1 -#define TMTC_TEST_SETUP 0 + // If this is enabled, all other SPI code should be disabled #define OBSW_ADD_TEST_CODE 0 #define OBSW_ADD_SPI_TEST_CODE 0 diff --git a/mission/tmtc/CCSDSHandler.h b/mission/tmtc/CCSDSHandler.h index 1ee8575a..3840a47f 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/mission/tmtc/CCSDSHandler.h @@ -89,13 +89,13 @@ private: //! [EXPORT] : [COMMENT] Received action message with unknown action id static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0); -#if TMTC_TEST_SETUP == 1 +#if OBSW_SYRLINKS_DOWNLINK == 1 // syrlinks must not be transmitting more than 15 minutes (according to datasheet) static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min #else // Set to high value when not sending via syrlinks static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day -#endif /* TMTC_TEST_SETUP == 0 */ +#endif /* OBSW_SYRLINKS_DOWNLINK == 0 */ static const bool UP = true; static const bool DOWN = false; From 32236f98648b21e5e431af0f1d3b81d50e78c0fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 19 Jan 2022 14:34:20 +0100 Subject: [PATCH 3/4] and another name --- linux/fsfwconfig/OBSWConfig.h.in | 2 +- mission/tmtc/CCSDSHandler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index fe83c449..f6fc1d6d 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -39,7 +39,7 @@ debugging. */ // Set to 1 if telecommands are received via the PDEC IP Core #define OBSW_TC_FROM_PDEC 1 -#define OBSW_SYRLINKS_DOWNLINK 0 +#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 diff --git a/mission/tmtc/CCSDSHandler.h b/mission/tmtc/CCSDSHandler.h index 3840a47f..267cef5a 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/mission/tmtc/CCSDSHandler.h @@ -89,7 +89,7 @@ private: //! [EXPORT] : [COMMENT] Received action message with unknown action id static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0); -#if OBSW_SYRLINKS_DOWNLINK == 1 +#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1 // syrlinks must not be transmitting more than 15 minutes (according to datasheet) static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min #else From 947134bfd1afc6e0c7cd50eecffde7c83e5157b0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 19 Jan 2022 14:39:39 +0100 Subject: [PATCH 4/4] reordered --- linux/fsfwconfig/OBSWConfig.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index f6fc1d6d..06e0b841 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -39,7 +39,6 @@ debugging. */ // Set to 1 if telecommands are received via the PDEC IP Core #define OBSW_TC_FROM_PDEC 1 -#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 @@ -51,6 +50,7 @@ debugging. */ #define OBSW_ADD_TMP_DEVICES 0 #define OBSW_ADD_RAD_SENSORS 0 #define OBSW_ADD_SYRLINKS 0 +#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 #elif defined RASPBERRY_PI