From e7eaaa9295acf752f91e90b7250aa1d1e9cae267 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 26 Mar 2023 16:16:54 +0200 Subject: [PATCH] finished power clean up --- bsp_q7s/core/ObjectFactory.cpp | 2 +- linux/csp/CspComIF.cpp | 3 +-- mission/CMakeLists.txt | 1 - mission/csp/CMakeLists.txt | 1 - mission/power/CMakeLists.txt | 3 ++- mission/{csp => power}/CspCookie.cpp | 2 +- mission/{csp => power}/CspCookie.h | 0 mission/power/GomspaceDeviceHandler.cpp | 3 ++- mission/power/GomspaceDeviceHandler.h | 2 +- mission/power/PcduHandler.h | 2 +- mission/power/defs.h | 2 -- mission/system/fdir/GomspacePowerFdir.cpp | 3 ++- 12 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 mission/csp/CMakeLists.txt rename mission/{csp => power}/CspCookie.cpp (95%) rename mission/{csp => power}/CspCookie.h (100%) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 06f02e1e..f638690d 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -53,7 +54,6 @@ #include "linux/ipcore/Ptme.h" #include "linux/ipcore/PtmeConfig.h" #include "mission/config/configfile.h" -#include "mission/csp/CspCookie.h" #include "mission/system/acs/AcsBoardFdir.h" #include "mission/system/acs/AcsSubsystem.h" #include "mission/system/acs/RwAssembly.h" diff --git a/linux/csp/CspComIF.cpp b/linux/csp/CspComIF.cpp index d24ebc2e..6aef5205 100644 --- a/linux/csp/CspComIF.cpp +++ b/linux/csp/CspComIF.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,8 +11,6 @@ #include #include -#include "mission/csp/CspCookie.h" - using namespace GOMSPACE; CspComIF::CspComIF(object_id_t objectId, const char* routeTaskName, uint32_t routerRealTimePriority) diff --git a/mission/CMakeLists.txt b/mission/CMakeLists.txt index f6435ad8..b8d0aaa0 100644 --- a/mission/CMakeLists.txt +++ b/mission/CMakeLists.txt @@ -8,7 +8,6 @@ add_subdirectory(system) add_subdirectory(com) add_subdirectory(acs) add_subdirectory(power) -add_subdirectory(csp) add_subdirectory(cfdp) add_subdirectory(config) diff --git a/mission/csp/CMakeLists.txt b/mission/csp/CMakeLists.txt deleted file mode 100644 index d5b6f3fe..00000000 --- a/mission/csp/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE CspCookie.cpp) diff --git a/mission/power/CMakeLists.txt b/mission/power/CMakeLists.txt index d18daf96..05232e25 100644 --- a/mission/power/CMakeLists.txt +++ b/mission/power/CMakeLists.txt @@ -1,6 +1,7 @@ target_sources( ${LIB_EIVE_MISSION} - PRIVATE Pdu1Handler.cpp + PRIVATE CspCookie.cpp + Pdu1Handler.cpp Pdu2Handler.cpp AcuHandler.cpp P60DockHandler.cpp diff --git a/mission/csp/CspCookie.cpp b/mission/power/CspCookie.cpp similarity index 95% rename from mission/csp/CspCookie.cpp rename to mission/power/CspCookie.cpp index 228a8058..2bb85fd1 100644 --- a/mission/csp/CspCookie.cpp +++ b/mission/power/CspCookie.cpp @@ -1,4 +1,4 @@ -#include "CspCookie.h" +#include using namespace GOMSPACE; CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_, uint32_t timeoutMs) diff --git a/mission/csp/CspCookie.h b/mission/power/CspCookie.h similarity index 100% rename from mission/csp/CspCookie.h rename to mission/power/CspCookie.h diff --git a/mission/power/GomspaceDeviceHandler.cpp b/mission/power/GomspaceDeviceHandler.cpp index bdb0a5d1..eb2504c4 100644 --- a/mission/power/GomspaceDeviceHandler.cpp +++ b/mission/power/GomspaceDeviceHandler.cpp @@ -1,8 +1,9 @@ #include #include -#include #include #include +#include + #include #include "eive/objects.h" diff --git a/mission/power/GomspaceDeviceHandler.h b/mission/power/GomspaceDeviceHandler.h index 03e9a534..8c59405c 100644 --- a/mission/power/GomspaceDeviceHandler.h +++ b/mission/power/GomspaceDeviceHandler.h @@ -1,7 +1,7 @@ #ifndef MISSION_POWER_GOMSPACEDEVICEHANDLER_H_ #define MISSION_POWER_GOMSPACEDEVICEHANDLER_H_ -#include +#include #include #include diff --git a/mission/power/PcduHandler.h b/mission/power/PcduHandler.h index 2144227a..dd7c235a 100644 --- a/mission/power/PcduHandler.h +++ b/mission/power/PcduHandler.h @@ -8,8 +8,8 @@ #include #include #include -#include #include +#include #include /** diff --git a/mission/power/defs.h b/mission/power/defs.h index 2aadc361..70e155a6 100644 --- a/mission/power/defs.h +++ b/mission/power/defs.h @@ -19,13 +19,11 @@ static constexpr Event SWITCHING_Q7S_DENIED = event::makeEvent(SUBSYSTEM_ID, 2, static constexpr Event FDIR_REACTION_IGNORED = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM); - enum class States { IDLE, SWITCHING_POWER, CHECKING_POWER, MODE_COMMANDING }; enum class OpCodes { NONE, TO_OFF_DONE, TO_NOT_OFF_DONE, TIMEOUT_OCCURED }; } // namespace power - namespace duallane { enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 }; diff --git a/mission/system/fdir/GomspacePowerFdir.cpp b/mission/system/fdir/GomspacePowerFdir.cpp index 7cec4815..98e10f58 100644 --- a/mission/system/fdir/GomspacePowerFdir.cpp +++ b/mission/system/fdir/GomspacePowerFdir.cpp @@ -1,6 +1,7 @@ -#include #include "GomspacePowerFdir.h" +#include + #include "fsfw/devicehandlers/DeviceHandlerIF.h" #include "fsfw/health/HealthTableIF.h" #include "fsfw/modes/HasModesIF.h"