diff --git a/CHANGELOG.md b/CHANGELOG.md index 842ca54f..1f3c2488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ will consitute of a breaking change warranting a new major release: ## Changed +- PCDU components only allow setting `NEEDS_RECOVERY`, `HEALTHY` and `EXTERNAL_CONTROL` health + states now. TMP sensor components only allow `HEALTHY` , `EXTERNAL_CONTROL`, `FAULTY` and + `PERMANENT_FAULTY`. - TCS controller now does a sanity check on the temperature values: Values below -80 C or above 160 C are ignored. diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 8da0e6ec..3f29de5e 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -62,7 +62,7 @@ #include "mission/system/acs/acsModeTree.h" #include "mission/system/com/SyrlinksFdir.h" #include "mission/system/com/comModeTree.h" -#include "mission/system/fdir/GomspacePowerFdir.h" +#include "mission/system/power/GomspacePowerFdir.h" #include "mission/system/fdir/RtdFdir.h" #include "mission/system/objects/TcsBoardAssembly.h" #include "mission/system/tree/payloadModeTree.h" diff --git a/fsfw b/fsfw index 9fca7581..6650c293 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 9fca7581dd75d074df343802c922e48f95b677eb +Subproject commit 6650c293da09d8851c2bd6c4d6e6c5a8390d003e diff --git a/mission/power/GomspaceDeviceHandler.cpp b/mission/power/GomspaceDeviceHandler.cpp index 3bed8d73..89fca8ee 100644 --- a/mission/power/GomspaceDeviceHandler.cpp +++ b/mission/power/GomspaceDeviceHandler.cpp @@ -642,3 +642,11 @@ ReturnValue_t GomspaceDeviceHandler::parsePduHkTable(PDU::PduCoreHk& coreHk, PDU } return returnvalue::OK; } + +ReturnValue_t GomspaceDeviceHandler::setHealth(HealthState health) { + if (health != HealthState::HEALTHY and health != HealthState::EXTERNAL_CONTROL and + health != HealthState::NEEDS_RECOVERY) { + return returnvalue::FAILED; + } + return returnvalue::OK; +} diff --git a/mission/power/GomspaceDeviceHandler.h b/mission/power/GomspaceDeviceHandler.h index c1db9044..758cc5a3 100644 --- a/mission/power/GomspaceDeviceHandler.h +++ b/mission/power/GomspaceDeviceHandler.h @@ -80,6 +80,9 @@ class GomspaceDeviceHandler : public DeviceHandlerBase { ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override; void setNormalDatapoolEntriesInvalid() override; uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; + + ReturnValue_t setHealth(HealthState health) override; + /** * @brief The command to generate a request to receive the full housekeeping table is device * specific. Thus the child has to build this command. diff --git a/mission/system/CMakeLists.txt b/mission/system/CMakeLists.txt index f278bbc9..44122d7e 100644 --- a/mission/system/CMakeLists.txt +++ b/mission/system/CMakeLists.txt @@ -3,5 +3,6 @@ add_subdirectory(tree) add_subdirectory(acs) add_subdirectory(com) add_subdirectory(fdir) +add_subdirectory(power) target_sources(${LIB_EIVE_MISSION} PRIVATE DualLanePowerStateMachine.cpp) diff --git a/mission/system/acs/CMakeLists.txt b/mission/system/acs/CMakeLists.txt index e5ef2cb8..b7f927a0 100644 --- a/mission/system/acs/CMakeLists.txt +++ b/mission/system/acs/CMakeLists.txt @@ -9,4 +9,5 @@ target_sources( SusAssembly.cpp AcsBoardFdir.cpp acsModeTree.cpp - SusFdir.cpp) + SusFdir.cpp + StrFdir.cpp) diff --git a/mission/system/fdir/StrFdir.cpp b/mission/system/acs/StrFdir.cpp similarity index 100% rename from mission/system/fdir/StrFdir.cpp rename to mission/system/acs/StrFdir.cpp diff --git a/mission/system/fdir/StrFdir.h b/mission/system/acs/StrFdir.h similarity index 100% rename from mission/system/fdir/StrFdir.h rename to mission/system/acs/StrFdir.h diff --git a/mission/system/fdir/CMakeLists.txt b/mission/system/fdir/CMakeLists.txt index fb737a3f..3f0baf01 100644 --- a/mission/system/fdir/CMakeLists.txt +++ b/mission/system/fdir/CMakeLists.txt @@ -1,2 +1 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE RtdFdir.cpp StrFdir.cpp - GomspacePowerFdir.cpp) +target_sources(${LIB_EIVE_MISSION} PRIVATE RtdFdir.cpp) diff --git a/mission/system/power/CMakeLists.txt b/mission/system/power/CMakeLists.txt new file mode 100644 index 00000000..8fa4967e --- /dev/null +++ b/mission/system/power/CMakeLists.txt @@ -0,0 +1 @@ +target_sources(${LIB_EIVE_MISSION} PRIVATE GomspacePowerFdir.cpp) diff --git a/mission/system/fdir/GomspacePowerFdir.cpp b/mission/system/power/GomspacePowerFdir.cpp similarity index 100% rename from mission/system/fdir/GomspacePowerFdir.cpp rename to mission/system/power/GomspacePowerFdir.cpp diff --git a/mission/system/fdir/GomspacePowerFdir.h b/mission/system/power/GomspacePowerFdir.h similarity index 100% rename from mission/system/fdir/GomspacePowerFdir.h rename to mission/system/power/GomspacePowerFdir.h diff --git a/mission/tcs/Tmp1075Handler.cpp b/mission/tcs/Tmp1075Handler.cpp index d1f144f0..df57aa8a 100644 --- a/mission/tcs/Tmp1075Handler.cpp +++ b/mission/tcs/Tmp1075Handler.cpp @@ -132,3 +132,11 @@ ReturnValue_t Tmp1075Handler::initializeLocalDataPool(localpool::DataPool &local } void Tmp1075Handler::setModeNormal() { setMode(_MODE_TO_NORMAL); } + +ReturnValue_t Tmp1075Handler::setHealth(HealthState health) { + if (health != FAULTY and health != PERMANENT_FAULTY and health != HEALTHY and + health != EXTERNAL_CONTROL) { + return returnvalue::FAILED; + } + return returnvalue::OK; +} diff --git a/mission/tcs/Tmp1075Handler.h b/mission/tcs/Tmp1075Handler.h index 8d039446..02fd6823 100644 --- a/mission/tcs/Tmp1075Handler.h +++ b/mission/tcs/Tmp1075Handler.h @@ -37,6 +37,7 @@ class Tmp1075Handler : public DeviceHandlerBase { uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) override; + ReturnValue_t setHealth(HealthState health) override; private: /** diff --git a/tmtc b/tmtc index 6975fae5..50668ca7 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 6975fae511ca7b2fdef70858f8715908f300f434 +Subproject commit 50668ca7a74edd4219456e393cd10f7858591130