From b05a23dc8677afb44c6b3e10601e81e81f6a47e1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 27 Feb 2021 19:46:13 +0100 Subject: [PATCH] solar array depl moved to bsp folder hosted build working again --- bsp_hosted/fsfwconfig/devices/gpioIds.h | 35 +++++++++++ .../fsfwconfig/devices/powerSwitcherList.h | 58 +++++++++++++++++++ .../fsfwconfig/objects/systemObjectList.h | 15 +++++ bsp_q7s/ObjectFactory.cpp | 2 +- bsp_q7s/devices/CMakeLists.txt | 1 + .../devices/SolarArrayDeploymentHandler.cpp | 3 +- .../devices/SolarArrayDeploymentHandler.h | 0 cmake/scripts/Host/create_cmake_debug_cfg.sh | 3 +- .../scripts/Host/create_cmake_release_cfg.sh | 3 +- mission/devices/CMakeLists.txt | 1 - mission/devices/PCDUHandler.cpp | 7 ++- mission/devices/PCDUHandler.h | 3 +- mission/devices/PDU1Handler.cpp | 2 +- mission/devices/PDU2Handler.cpp | 2 +- mission/devices/Tmp1075Handler.cpp | 2 +- 15 files changed, 126 insertions(+), 11 deletions(-) create mode 100644 bsp_hosted/fsfwconfig/devices/gpioIds.h create mode 100644 bsp_hosted/fsfwconfig/devices/powerSwitcherList.h rename {mission => bsp_q7s}/devices/SolarArrayDeploymentHandler.cpp (99%) rename {mission => bsp_q7s}/devices/SolarArrayDeploymentHandler.h (100%) diff --git a/bsp_hosted/fsfwconfig/devices/gpioIds.h b/bsp_hosted/fsfwconfig/devices/gpioIds.h new file mode 100644 index 00000000..8963bd20 --- /dev/null +++ b/bsp_hosted/fsfwconfig/devices/gpioIds.h @@ -0,0 +1,35 @@ +#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_ +#define FSFWCONFIG_DEVICES_GPIOIDS_H_ + +#include + +namespace gpioIds { + enum gpioId_t { + HEATER_0, + HEATER_1, + HEATER_2, + HEATER_3, + HEATER_4, + HEATER_5, + HEATER_6, + HEATER_7, + DEPLSA1, + DEPLSA2, + + MGM_0_LIS3_CS, + MGM_1_RM3100_CS, + GYRO_0_ADIS_CS, + GYRO_1_L3G_CS, + GYRO_2_L3G_CS, + MGM_2_LIS3_CS, + MGM_3_RM3100_CS, + + TEST_ID_0, + TEST_ID_1 + }; +} + + + + +#endif /* FSFWCONFIG_DEVICES_GPIOIDS_H_ */ diff --git a/bsp_hosted/fsfwconfig/devices/powerSwitcherList.h b/bsp_hosted/fsfwconfig/devices/powerSwitcherList.h new file mode 100644 index 00000000..09bdf568 --- /dev/null +++ b/bsp_hosted/fsfwconfig/devices/powerSwitcherList.h @@ -0,0 +1,58 @@ +#ifndef FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ +#define FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ + +#include + +namespace pcduSwitches { + /* Switches are uint8_t datatype and go from 0 to 255 */ + enum switcherList { + Q7S, + PAYLOAD_PCDU_CH1, + RW, + TCS_BOARD_8V_HEATER_IN, + SUS_REDUNDANT, + DEPLOYMENT_MECHANISM, + PAYLOAD_PCDU_CH6, + ACS_BOARD_SIDE_B, + PAYLOAD_CAMERA, + TCS_BOARD_3V3, + SYRLINKS, + STAR_TRACKER, + MGT, + SUS_NOMINAL, + SOLAR_CELL_EXP, + PLOC, + ACS_BORAD_SIDE_A, + NUMBER_OF_SWITCHES + }; + + static const uint8_t ON = 1; + static const uint8_t OFF = 0; + + /* Output states after reboot of the PDUs */ + static const uint8_t INIT_STATE_Q7S = ON; + static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH1 = OFF; + static const uint8_t INIT_STATE_RW = OFF; +#if TE0720 == 1 + /* Because the TE0720 is not connected to the PCDU, this switch is always on */ + static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = ON; +#else + static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = OFF; +#endif + static const uint8_t INIT_STATE_SUS_REDUNDANT = OFF; + static const uint8_t INIT_STATE_DEPLOYMENT_MECHANISM = OFF; + static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH6 = OFF; + static const uint8_t INIT_STATE_ACS_BOARD_SIDE_B = OFF; + static const uint8_t INIT_STATE_PAYLOAD_CAMERA = OFF; + static const uint8_t INIT_STATE_TCS_BOARD_3V3 = OFF; + static const uint8_t INIT_STATE_SYRLINKS = OFF; + static const uint8_t INIT_STATE_STAR_TRACKER = OFF; + static const uint8_t INIT_STATE_MGT = OFF; + static const uint8_t INIT_STATE_SUS_NOMINAL = OFF; + static const uint8_t INIT_STATE_SOLAR_CELL_EXP = OFF; + static const uint8_t INIT_STATE_PLOC = OFF; + static const uint8_t INIT_STATE_ACS_BOARD_SIDE_A = OFF; +} + + +#endif /* FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ */ diff --git a/bsp_hosted/fsfwconfig/objects/systemObjectList.h b/bsp_hosted/fsfwconfig/objects/systemObjectList.h index 05ed2c52..d7a1abd7 100644 --- a/bsp_hosted/fsfwconfig/objects/systemObjectList.h +++ b/bsp_hosted/fsfwconfig/objects/systemObjectList.h @@ -27,6 +27,21 @@ namespace objects { DUMMY_INTERFACE = 0xCAFECAFE, DUMMY_HANDLER = 0x4400AFFE, + /* 0x44 ('D') for device handlers */ + P60DOCK_HANDLER = 0x44000001, + PDU1_HANDLER = 0x44000002, + PDU2_HANDLER = 0x44000003, + ACU_HANDLER = 0x44000004, + TMP1075_HANDLER_1 = 0x44000005, + TMP1075_HANDLER_2 = 0x44000006, + MGM_0_LIS3_HANDLER = 0x4400007, + MGM_1_RM3100_HANDLER = 0x44000008, + MGM_2_LIS3_HANDLER = 0x44000009, + MGM_3_RM3100_HANDLER = 0x44000010, + GYRO_0_ADIS_HANDLER = 0x44000011, + GYRO_1_L3G_HANDLER = 0x44000012, + GYRO_2_L3G_HANDLER = 0x44000013, + /* 0x49 ('I') for Communication Interfaces **/ ARDUINO_COM_IF = 0x49000001 }; diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index 6a3b16bc..4c54e526 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -15,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/bsp_q7s/devices/CMakeLists.txt b/bsp_q7s/devices/CMakeLists.txt index c720706a..9e6fb793 100644 --- a/bsp_q7s/devices/CMakeLists.txt +++ b/bsp_q7s/devices/CMakeLists.txt @@ -1,3 +1,4 @@ target_sources(${TARGET_NAME} PRIVATE HeaterHandler.cpp + SolarArrayDeploymentHandler.cpp ) diff --git a/mission/devices/SolarArrayDeploymentHandler.cpp b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp similarity index 99% rename from mission/devices/SolarArrayDeploymentHandler.cpp rename to bsp_q7s/devices/SolarArrayDeploymentHandler.cpp index c114209b..80d941bf 100644 --- a/mission/devices/SolarArrayDeploymentHandler.cpp +++ b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp @@ -1,7 +1,8 @@ +#include "SolarArrayDeploymentHandler.h" + #include #include -#include #include #include diff --git a/mission/devices/SolarArrayDeploymentHandler.h b/bsp_q7s/devices/SolarArrayDeploymentHandler.h similarity index 100% rename from mission/devices/SolarArrayDeploymentHandler.h rename to bsp_q7s/devices/SolarArrayDeploymentHandler.h diff --git a/cmake/scripts/Host/create_cmake_debug_cfg.sh b/cmake/scripts/Host/create_cmake_debug_cfg.sh index ee7b441a..23c74de0 100644 --- a/cmake/scripts/Host/create_cmake_debug_cfg.sh +++ b/cmake/scripts/Host/create_cmake_debug_cfg.sh @@ -15,6 +15,7 @@ if [ "${counter}" -ge 5 ];then fi build_generator="" +build_dir="Debug-Host" os_fsfw="host" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" @@ -23,4 +24,4 @@ else build_generator="Unix Makefiles" fi -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l"${build_dir}" diff --git a/cmake/scripts/Host/create_cmake_release_cfg.sh b/cmake/scripts/Host/create_cmake_release_cfg.sh index 778cde3b..03378e98 100644 --- a/cmake/scripts/Host/create_cmake_release_cfg.sh +++ b/cmake/scripts/Host/create_cmake_release_cfg.sh @@ -16,6 +16,7 @@ fi build_generator="" os_fsfw="host" +build_dir="Debug-Release" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" # Could be other OS but this works for now. @@ -23,4 +24,4 @@ else build_generator="Unix Makefiles" fi -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -l"${build_dir}" diff --git a/mission/devices/CMakeLists.txt b/mission/devices/CMakeLists.txt index aec93c1c..a8205276 100644 --- a/mission/devices/CMakeLists.txt +++ b/mission/devices/CMakeLists.txt @@ -10,7 +10,6 @@ target_sources(${TARGET_NAME} PUBLIC PDU1Handler.cpp PDU2Handler.cpp ACUHandler.cpp - SolarArrayDeploymentHandler.cpp ) diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 0b3b1459..8e2c1a39 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -1,9 +1,12 @@ #include "PCDUHandler.h" -#include +#include +#include + #include + #include #include -#include + PCDUHandler::PCDUHandler(object_id_t setObjectId, size_t cmdQueueSize) : SystemObject(setObjectId), poolManager(this, nullptr), pdu2HkTableDataset(this), pdu1HkTableDataset( diff --git a/mission/devices/PCDUHandler.h b/mission/devices/PCDUHandler.h index f6b49dc0..566e1d9c 100644 --- a/mission/devices/PCDUHandler.h +++ b/mission/devices/PCDUHandler.h @@ -1,6 +1,7 @@ #ifndef MISSION_DEVICES_PCDUHANDLER_H_ #define MISSION_DEVICES_PCDUHANDLER_H_ +#include #include #include #include @@ -9,7 +10,7 @@ #include #include #include -#include + /** * @brief The PCDUHandler provides a compact interface to handle all devices related to the diff --git a/mission/devices/PDU1Handler.cpp b/mission/devices/PDU1Handler.cpp index 92281f49..074a0b9f 100644 --- a/mission/devices/PDU1Handler.cpp +++ b/mission/devices/PDU1Handler.cpp @@ -1,6 +1,6 @@ #include "PDU1Handler.h" #include -#include +#include PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS, diff --git a/mission/devices/PDU2Handler.cpp b/mission/devices/PDU2Handler.cpp index b442c12c..eaeb00bb 100644 --- a/mission/devices/PDU2Handler.cpp +++ b/mission/devices/PDU2Handler.cpp @@ -1,6 +1,6 @@ #include "PDU2Handler.h" #include -#include +#include PDU2Handler::PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS, diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp index f0d95a18..a84f5597 100644 --- a/mission/devices/Tmp1075Handler.cpp +++ b/mission/devices/Tmp1075Handler.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include Tmp1075Handler::Tmp1075Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :