From c8c2e543a153b698613021a1bc898133bebca707 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L590 Date: Fri, 25 Mar 2022 12:44:43 +0100 Subject: [PATCH 1/2] update project file, new definitions file --- common/config/definitions.h | 13 +++++++++++++ misc/eclipse/.cproject | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 common/config/definitions.h diff --git a/common/config/definitions.h b/common/config/definitions.h new file mode 100644 index 00000000..76e05dd7 --- /dev/null +++ b/common/config/definitions.h @@ -0,0 +1,13 @@ +#ifndef COMMON_CONFIG_DEFINITIONS_H_ +#define COMMON_CONFIG_DEFINITIONS_H_ + +#include + +namespace config { + +static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 60 * 1000; +static constexpr uint32_t LONGEST_MODE_TIMEOUT = +} + + +#endif /* COMMON_CONFIG_DEFINITIONS_H_ */ diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 15b0195b..aa59f2da 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -589,7 +589,7 @@ - + From 0ff84b31eff5710807197b728cbd04fe57d50502 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L590 Date: Fri, 25 Mar 2022 18:39:21 +0100 Subject: [PATCH 2/2] longer timeout for mode service --- common/config/definitions.h | 5 +++-- fsfw | 2 +- mission/core/GenericFactory.cpp | 9 +++++---- mission/system/TcsBoardAssembly.h | 3 +-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/config/definitions.h b/common/config/definitions.h index 76e05dd7..fbb71648 100644 --- a/common/config/definitions.h +++ b/common/config/definitions.h @@ -5,8 +5,9 @@ namespace config { -static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 60 * 1000; -static constexpr uint32_t LONGEST_MODE_TIMEOUT = +static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 1000; +static constexpr uint32_t LONGEST_MODE_TIMEOUT_SECONDS = PL_PCDU_TRANSITION_TIMEOUT_MS / 1000; + } diff --git a/fsfw b/fsfw index 4b5e3e70..9b044080 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 4b5e3e70f7eb65780b697a81ba95ecc2a74a8b84 +Subproject commit 9b0440808a836c008e97cd4524839efe513cf4f3 diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index 9eb27f22..1e450725 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -1,6 +1,5 @@ #include "GenericFactory.h" -#include #include #include #include @@ -18,10 +17,12 @@ #include #include #include -#include -#include +#include "OBSWConfig.h" +#include "definitions.h" #include "objects/systemObjectList.h" +#include "tmtc/apid.h" +#include "tmtc/pusIds.h" #if OBSW_ADD_TCPIP_BRIDGE == 1 #if OBSW_USE_TMTC_TCP_BRIDGE == 0 @@ -87,7 +88,7 @@ void ObjectFactory::produceGenericObjects() { new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW, pus::PUS_SERVICE_20); new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW, - pus::PUS_SERVICE_200); + pus::PUS_SERVICE_200, 8, config::LONGEST_MODE_TIMEOUT_SECONDS); #if OBSW_ADD_TCPIP_BRIDGE == 1 #if OBSW_USE_TMTC_TCP_BRIDGE == 0 diff --git a/mission/system/TcsBoardAssembly.h b/mission/system/TcsBoardAssembly.h index cda78317..832f335d 100644 --- a/mission/system/TcsBoardAssembly.h +++ b/mission/system/TcsBoardAssembly.h @@ -14,8 +14,7 @@ struct TcsBoardHelper { class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF { public: static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS; - static constexpr Event CHILDREN_LOST_MODE = - event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); + static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher, TcsBoardHelper helper);