From c85a7d6b9c86ec950ce49085106769378b9637fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 17:08:24 +0200 Subject: [PATCH 01/14] fsfw and tmtc update --- fsfw | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsfw b/fsfw index db801a0e..b985bf51 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit db801a0ecc7323f3bc552be0de383c6bb1b29fb7 +Subproject commit b985bf5167be74c0d43bd70c501eb5f9640bd99e diff --git a/tmtc b/tmtc index 726935f7..56717935 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 726935f77b6fdb8415932d545554f748b5ed1dbb +Subproject commit 56717935e6d90e8a501894f44cd250aec8d12d03 From 8d10dcbe1887de513cbdcf0895b1ca85c59d7beb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 17:09:04 +0200 Subject: [PATCH 02/14] tmtc update --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 7b49babb..4325b8cc 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 7b49babb1febb3959f0f817aa4b4ce4c32d6d21c +Subproject commit 4325b8ccaa0495eb8b23f4b6aeec3165c62e7bd1 From 221012f79005d17136d484ef5193f4c09d89f307 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 19:34:34 +0200 Subject: [PATCH 03/14] hosted build compiling again --- bsp_hosted/fsfwconfig/OBSWConfig.h.in | 6 ++++++ bsp_hosted/fsfwconfig/fsfwconfig.mk | 7 ------- bsp_q7s/core/ObjectFactory.cpp | 8 ++++---- common/config/commonConfig.h.in | 14 +++++++++----- fsfw | 2 +- linux/fsfwconfig/OBSWConfig.h.in | 12 ++++++------ linux/obc/Ptme.cpp | 5 ++--- linux/obc/Ptme.h | 2 +- mission/tmtc/CCSDSHandler.cpp | 4 ++-- mission/tmtc/CCSDSHandler.h | 2 +- 10 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 bsp_hosted/fsfwconfig/fsfwconfig.mk diff --git a/bsp_hosted/fsfwconfig/OBSWConfig.h.in b/bsp_hosted/fsfwconfig/OBSWConfig.h.in index 5996e3a2..a2353947 100644 --- a/bsp_hosted/fsfwconfig/OBSWConfig.h.in +++ b/bsp_hosted/fsfwconfig/OBSWConfig.h.in @@ -14,6 +14,12 @@ debugging. */ #define OBSW_VEBOSE_LEVEL 1 +#define OBSW_USE_CCSDS_IP_CORE 0 +// Set to 1 if all telemetry should be sent to the PTME IP Core +#define OBSW_TM_TO_PTME 0 +// Set to 1 if telecommands are received via the PDEC IP Core +#define OBSW_TC_FROM_PDEC 0 + #ifdef __cplusplus #include "objects/systemObjectList.h" diff --git a/bsp_hosted/fsfwconfig/fsfwconfig.mk b/bsp_hosted/fsfwconfig/fsfwconfig.mk deleted file mode 100644 index 53cb0fc7..00000000 --- a/bsp_hosted/fsfwconfig/fsfwconfig.mk +++ /dev/null @@ -1,7 +0,0 @@ -CXXSRC += $(wildcard $(CURRENTPATH)/cdatapool/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp) - -INCLUDES += $(CURRENTPATH) \ No newline at end of file diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 47b26a2a..16e3da95 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -935,13 +935,13 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) { CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME); VirtualChannel* vc = nullptr; - vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC0, vc); - vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC1, common::VC1_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC1, vc); - vc = new VirtualChannel(ccsds::VC2, config::VC2_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC2, common::VC2_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC2, vc); - vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC3, vc); GpioCookie* gpioRS485Chip = new GpioCookie; diff --git a/common/config/commonConfig.h.in b/common/config/commonConfig.h.in index c8607fae..6dad37d5 100644 --- a/common/config/commonConfig.h.in +++ b/common/config/commonConfig.h.in @@ -7,19 +7,23 @@ // Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port #define OBSW_ADD_TCPIP_BRIDGE 1 + // Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally // because UDP packets are not allowed in the VPN // This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the // CCSDS IP Cores. -#define OBSW_USE_CCSDS_IP_CORE 1 -// Set to 1 if all telemetry should be sent to the PTME IP Core -#define OBSW_TM_TO_PTME 1 -// Set to 1 if telecommands are received via the PDEC IP Core -#define OBSW_TC_FROM_PDEC 0 #define OBSW_USE_TCP_BRIDGE 1 namespace common { extern const uint16_t TC_PACKET_ID; + +static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; +static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; +static constexpr uint8_t VC0_QUEUE_SIZE = 50; +static constexpr uint8_t VC1_QUEUE_SIZE = 50; +static constexpr uint8_t VC2_QUEUE_SIZE = 50; +static constexpr uint8_t VC3_QUEUE_SIZE = 50; + } #endif /* COMMON_CONFIG_COMMONCONFIG_H_ */ diff --git a/fsfw b/fsfw index b985bf51..ad68802f 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b985bf5167be74c0d43bd70c501eb5f9640bd99e +Subproject commit ad68802fe4af9af554bd8221c607ba1f4d87185b diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 924026af..6ccd6b6d 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -33,6 +33,12 @@ debugging. */ //! All of this should be enabled for mission code! #if defined XIPHOS_Q7S +#define OBSW_USE_CCSDS_IP_CORE 1 +// Set to 1 if all telemetry should be sent to the PTME IP Core +#define OBSW_TM_TO_PTME 1 +// Set to 1 if telecommands are received via the PDEC IP Core +#define OBSW_TC_FROM_PDEC 0 + #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 @@ -124,12 +130,6 @@ namespace config { /* Add mission configuration flags here */ static constexpr uint32_t OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE = 50; static constexpr uint32_t PLOC_UPDATER_QUEUE_SIZE = 50; -static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; -static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; -static constexpr uint8_t VC0_QUEUE_SIZE = 50; -static constexpr uint8_t VC1_QUEUE_SIZE = 50; -static constexpr uint8_t VC2_QUEUE_SIZE = 50; -static constexpr uint8_t VC3_QUEUE_SIZE = 50; static constexpr uint8_t LIVE_TM = 0; diff --git a/linux/obc/Ptme.cpp b/linux/obc/Ptme.cpp index 80f9945c..63af5d33 100644 --- a/linux/obc/Ptme.cpp +++ b/linux/obc/Ptme.cpp @@ -5,8 +5,7 @@ #include "fsfw/serviceinterface/ServiceInterface.h" #include "PtmeConfig.h" -Ptme::Ptme(object_id_t objectId) : - SystemObject(objectId) { +Ptme::Ptme(object_id_t objectId): SystemObject(objectId) { } Ptme::~Ptme() { @@ -54,7 +53,7 @@ ReturnValue_t Ptme::writeToVc(uint8_t vcId, const uint8_t * data, size_t size) { void Ptme::addVcInterface(VcId_t vcId, VcInterfaceIF* vc) { - if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) { sif::warning << "Ptme::addVcInterface: Invalid virtual channel ID" << std::endl; return; } diff --git a/linux/obc/Ptme.h b/linux/obc/Ptme.h index be687e17..5364974f 100644 --- a/linux/obc/Ptme.h +++ b/linux/obc/Ptme.h @@ -78,7 +78,7 @@ private: static const int PTME_DATA_REG_OFFSET = 256; /** The file descriptor of the UIO driver */ - int fd; + int fd = 0; uint32_t* ptmeBaseAddress = nullptr; diff --git a/mission/tmtc/CCSDSHandler.cpp b/mission/tmtc/CCSDSHandler.cpp index 95d557ee..9b2912c1 100644 --- a/mission/tmtc/CCSDSHandler.cpp +++ b/mission/tmtc/CCSDSHandler.cpp @@ -78,7 +78,7 @@ MessageQueueId_t CCSDSHandler::getCommandQueue() const { } void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel) { - if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) { sif::warning << "CCSDSHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl; return; } @@ -97,7 +97,7 @@ void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel } MessageQueueId_t CCSDSHandler::getReportReceptionQueue(uint8_t virtualChannel) { - if (virtualChannel < config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (virtualChannel < common::NUMBER_OF_VIRTUAL_CHANNELS) { VirtualChannelMapIter iter = virtualChannelMap.find(virtualChannel); if (iter != virtualChannelMap.end()) { return iter->second->getReportReceptionQueue(); diff --git a/mission/tmtc/CCSDSHandler.h b/mission/tmtc/CCSDSHandler.h index 05693a38..b53cb8cd 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/mission/tmtc/CCSDSHandler.h @@ -53,7 +53,7 @@ public: private: - static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE; + static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE; using VirtualChannelMap = std::unordered_map; using VirtualChannelMapIter = VirtualChannelMap::iterator; From 1bef032260bfbdb658079b454090c85edbf3ce1d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 19:43:44 +0200 Subject: [PATCH 04/14] unittests were refactored --- .gitmodules | 3 - CMakeLists.txt | 12 +-- fsfw | 2 +- thirdparty/Catch2 | 1 - unittest/main.cpp | 2 +- unittest/testcfg/CMakeLists.txt | 9 --- unittest/testcfg/FSFWConfig.h.in | 81 ------------------- unittest/testcfg/OBSWConfig.h.in | 8 -- unittest/testcfg/TestsConfig.h.in | 21 ----- unittest/testcfg/devices/logicalAddresses.cpp | 5 -- unittest/testcfg/devices/logicalAddresses.h | 15 ---- .../testcfg/devices/powerSwitcherList.cpp | 4 - unittest/testcfg/devices/powerSwitcherList.h | 12 --- unittest/testcfg/events/subsystemIdRanges.h | 19 ----- unittest/testcfg/ipc/MissionMessageTypes.cpp | 12 --- unittest/testcfg/ipc/MissionMessageTypes.h | 22 ----- unittest/testcfg/objects/systemObjectList.h | 33 -------- .../PollingSequenceFactory.cpp | 39 --------- .../pollingsequence/PollingSequenceFactory.h | 32 -------- unittest/testcfg/returnvalues/classIds.h | 17 ---- unittest/testcfg/tmtc/apid.h | 18 ----- unittest/testcfg/tmtc/pusIds.h | 25 ------ 22 files changed, 5 insertions(+), 387 deletions(-) delete mode 160000 thirdparty/Catch2 delete mode 100644 unittest/testcfg/CMakeLists.txt delete mode 100644 unittest/testcfg/FSFWConfig.h.in delete mode 100644 unittest/testcfg/OBSWConfig.h.in delete mode 100644 unittest/testcfg/TestsConfig.h.in delete mode 100644 unittest/testcfg/devices/logicalAddresses.cpp delete mode 100644 unittest/testcfg/devices/logicalAddresses.h delete mode 100644 unittest/testcfg/devices/powerSwitcherList.cpp delete mode 100644 unittest/testcfg/devices/powerSwitcherList.h delete mode 100644 unittest/testcfg/events/subsystemIdRanges.h delete mode 100644 unittest/testcfg/ipc/MissionMessageTypes.cpp delete mode 100644 unittest/testcfg/ipc/MissionMessageTypes.h delete mode 100644 unittest/testcfg/objects/systemObjectList.h delete mode 100644 unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp delete mode 100644 unittest/testcfg/pollingsequence/PollingSequenceFactory.h delete mode 100644 unittest/testcfg/returnvalues/classIds.h delete mode 100644 unittest/testcfg/tmtc/apid.h delete mode 100644 unittest/testcfg/tmtc/pusIds.h diff --git a/.gitmodules b/.gitmodules index 1ca8bec5..1f3dc6ec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,6 +22,3 @@ [submodule "thirdparty/json"] path = thirdparty/json url = https://github.com/nlohmann/json.git -[submodule "thirdparty/Catch2"] - path = thirdparty/Catch2 - url = https://github.com/catchorg/Catch2.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 656ee3ee..fb944393 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,15 +90,10 @@ set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF) set(EIVE_ADD_LINUX_FILES False) if(EIVE_BUILD_UNITTESTS) - option(FSFW_ADD_UNITTESTS "Build the FSFW unittests as well" ON) - # Use FSFW custom main for unittests - set(FSFW_CUSTOM_UNITTEST_RUNNER ON) endif() -if(FSFW_CUSTOM_UNITTEST_RUNNER OR FSFW_ADD_UNITTESTS) +if(FSFW_ADD_UNITTESTS) set(CATCH2_TARGET Catch2) -else() - set(CATCH2_TARGET Catch2WithMain) endif() # Analyse different OS and architecture/target options, determine BSP_PATH, @@ -139,8 +134,8 @@ else() endif() if(EIVE_BUILD_UNITTESTS) - configure_file(${UNITTEST_CFG_PATH}/TestsConfig.h.in TestsConfig.h) - set(FSFW_CONFIG_PATH ${UNITTEST_CFG_PATH}) + # configure_file(${UNITTEST_CFG_PATH}/TestsConfig.h.in TestsConfig.h) + # set(FSFW_CONFIG_PATH ${UNITTEST_CFG_PATH}) endif() # Configuration files @@ -156,7 +151,6 @@ if(NOT EIVE_BUILD_WATCHDOG) endif() - configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h) # Set common config path for FSFW diff --git a/fsfw b/fsfw index ad68802f..4130dd9e 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit ad68802fe4af9af554bd8221c607ba1f4d87185b +Subproject commit 4130dd9e32eb1d4a5b0e993408ae614952bdd005 diff --git a/thirdparty/Catch2 b/thirdparty/Catch2 deleted file mode 160000 index 42695403..00000000 --- a/thirdparty/Catch2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 426954032f263754d2fff4cffce8552e7371965e diff --git a/unittest/main.cpp b/unittest/main.cpp index cd4f4b77..811df98e 100644 --- a/unittest/main.cpp +++ b/unittest/main.cpp @@ -2,6 +2,6 @@ #include "fsfw_tests/unit/CatchRunner.h" int main(int argc, char* argv[]) { - fsfwtest::customMain(argc, argv); + // fsfwtest::customMain(argc, argv); } diff --git a/unittest/testcfg/CMakeLists.txt b/unittest/testcfg/CMakeLists.txt deleted file mode 100644 index 50d13663..00000000 --- a/unittest/testcfg/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -target_sources(${TARGET_NAME} PRIVATE - ipc/MissionMessageTypes.cpp - pollingsequence/PollingSequenceFactory.cpp -) - -# Add include paths for the executable -target_include_directories(${TARGET_NAME} PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) diff --git a/unittest/testcfg/FSFWConfig.h.in b/unittest/testcfg/FSFWConfig.h.in deleted file mode 100644 index d2ed901d..00000000 --- a/unittest/testcfg/FSFWConfig.h.in +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef CONFIG_FSFWCONFIG_H_ -#define CONFIG_FSFWCONFIG_H_ - -#include -#include - -//! Used to determine whether C++ ostreams are used which can increase -//! the binary size significantly. If this is disabled, -//! the C stdio functions can be used alternatively -#define FSFW_CPP_OSTREAM_ENABLED 1 - -//! More FSFW related printouts. Useful for development. -#define FSFW_ENHANCED_PRINTOUT 0 - -//! Can be used to completely disable printouts, even the C stdio ones. -//! By default, printouts will be disabled for the unit tests. -#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_ENHANCED_PRINTOUT == 0 - #ifndef FSFW_DISABLE_PRINTOUT - #define FSFW_DISABLE_PRINTOUT 1 - #endif -#endif - -#define FSFW_USE_PUS_C_TELEMETRY 1 -#define FSFW_USE_PUS_C_TELECOMMANDS 1 - -//! Can be used to enable additional debugging printouts for developing the FSFW -#define FSFW_PRINT_VERBOSITY_LEVEL 0 - -//! Can be used to disable the ANSI color sequences for C stdio. -#define FSFW_COLORED_OUTPUT 0 - -//! If FSFW_OBJ_EVENT_TRANSLATION is set to one, -//! additional output which requires the translation files translateObjects -//! and translateEvents (and their compiled source files) -#define FSFW_OBJ_EVENT_TRANSLATION 0 - -#if FSFW_OBJ_EVENT_TRANSLATION == 1 -//! Specify whether info events are printed too. -#define FSFW_DEBUG_INFO 1 -#include "objects/translateObjects.h" -#include "events/translateEvents.h" -#else -#endif - -//! When using the newlib nano library, C99 support for stdio facilities -//! will not be provided. This define should be set to 1 if this is the case. -#define FSFW_NO_C99_IO 1 - -//! Specify whether a special mode store is used for Subsystem components. -#define FSFW_USE_MODESTORE 0 - -//! Defines if the real time scheduler for linux should be used. -//! If set to 0, this will also disable priority settings for linux -//! as most systems will not allow to set nice values without privileges -//! For embedded linux system set this to 1. -//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run -#define FSFW_USE_REALTIME_FOR_LINUX 1 - -namespace fsfwconfig { -//! Default timestamp size. The default timestamp will be an eight byte CDC -//! short timestamp. -static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 8; - -//! Configure the allocated pool sizes for the event manager. -static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240; -static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120; -static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120; - -//! Defines the FIFO depth of each commanding service base which -//! also determines how many commands a CSB service can handle in one cycle -//! simulataneously. This will increase the required RAM for -//! each CSB service ! -static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6; - -static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124; - -static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 1500; - -} - -#endif /* CONFIG_FSFWCONFIG_H_ */ diff --git a/unittest/testcfg/OBSWConfig.h.in b/unittest/testcfg/OBSWConfig.h.in deleted file mode 100644 index 34eda31f..00000000 --- a/unittest/testcfg/OBSWConfig.h.in +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef TESTCFG_OBSWCONFIG_H_ -#define TESTCFG_OBSWCONFIG_H_ - - - - - -#endif /* TESTCFG_OBSWCONFIG_H_ */ diff --git a/unittest/testcfg/TestsConfig.h.in b/unittest/testcfg/TestsConfig.h.in deleted file mode 100644 index 7d950070..00000000 --- a/unittest/testcfg/TestsConfig.h.in +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_ -#define FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_ - -#define FSFW_ADD_DEFAULT_FACTORY_FUNCTIONS 1 - -#ifdef __cplusplus - -#include "objects/systemObjectList.h" -#include "events/subsystemIdRanges.h" -#include "returnvalues/classIds.h" - -namespace config { -#endif - -/* Add mission configuration flags here */ - -#ifdef __cplusplus -} -#endif - -#endif /* FSFW_UNITTEST_CONFIG_TESTSCONFIG_H_ */ diff --git a/unittest/testcfg/devices/logicalAddresses.cpp b/unittest/testcfg/devices/logicalAddresses.cpp deleted file mode 100644 index c7ce314d..00000000 --- a/unittest/testcfg/devices/logicalAddresses.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "logicalAddresses.h" - - - - diff --git a/unittest/testcfg/devices/logicalAddresses.h b/unittest/testcfg/devices/logicalAddresses.h deleted file mode 100644 index cdf87025..00000000 --- a/unittest/testcfg/devices/logicalAddresses.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef CONFIG_DEVICES_LOGICALADDRESSES_H_ -#define CONFIG_DEVICES_LOGICALADDRESSES_H_ - -#include -#include -#include - -namespace addresses { - /* Logical addresses have uint32_t datatype */ - enum logicalAddresses: address_t { - }; -} - - -#endif /* CONFIG_DEVICES_LOGICALADDRESSES_H_ */ diff --git a/unittest/testcfg/devices/powerSwitcherList.cpp b/unittest/testcfg/devices/powerSwitcherList.cpp deleted file mode 100644 index 343f78d0..00000000 --- a/unittest/testcfg/devices/powerSwitcherList.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "powerSwitcherList.h" - - - diff --git a/unittest/testcfg/devices/powerSwitcherList.h b/unittest/testcfg/devices/powerSwitcherList.h deleted file mode 100644 index 86ddea57..00000000 --- a/unittest/testcfg/devices/powerSwitcherList.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CONFIG_DEVICES_POWERSWITCHERLIST_H_ -#define CONFIG_DEVICES_POWERSWITCHERLIST_H_ - -namespace switches { - /* Switches are uint8_t datatype and go from 0 to 255 */ - enum switcherList { - }; - -} - - -#endif /* CONFIG_DEVICES_POWERSWITCHERLIST_H_ */ diff --git a/unittest/testcfg/events/subsystemIdRanges.h b/unittest/testcfg/events/subsystemIdRanges.h deleted file mode 100644 index 26af041e..00000000 --- a/unittest/testcfg/events/subsystemIdRanges.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ -#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ - -#include -#include "commonSubsystemIds.h" -#include - -/** - * @brief Custom subsystem IDs can be added here - * @details - * Subsystem IDs are used to create unique events. - */ -namespace SUBSYSTEM_ID { -enum: uint8_t { - SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE, -}; -} - -#endif /* CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ */ diff --git a/unittest/testcfg/ipc/MissionMessageTypes.cpp b/unittest/testcfg/ipc/MissionMessageTypes.cpp deleted file mode 100644 index d68cb58c..00000000 --- a/unittest/testcfg/ipc/MissionMessageTypes.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "MissionMessageTypes.h" - -#include - -void messagetypes::clearMissionMessage(CommandMessage* message) { - switch(message->getMessageType()) { - default: - break; - } -} - - diff --git a/unittest/testcfg/ipc/MissionMessageTypes.h b/unittest/testcfg/ipc/MissionMessageTypes.h deleted file mode 100644 index 832d8e58..00000000 --- a/unittest/testcfg/ipc/MissionMessageTypes.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CONFIG_IPC_MISSIONMESSAGETYPES_H_ -#define CONFIG_IPC_MISSIONMESSAGETYPES_H_ - -#include - -class CommandMessage; - -/** - * Custom command messages are specified here. - * Most messages needed to use FSFW are already located in - * - * @param message Generic Command Message - */ -namespace messagetypes{ -enum MESSAGE_TYPE { - MISSION_MESSAGE_TYPE_START = FW_MESSAGES_COUNT, -}; - -void clearMissionMessage(CommandMessage* message); -} - -#endif /* CONFIG_IPC_MISSIONMESSAGETYPES_H_ */ diff --git a/unittest/testcfg/objects/systemObjectList.h b/unittest/testcfg/objects/systemObjectList.h deleted file mode 100644 index 9ed43873..00000000 --- a/unittest/testcfg/objects/systemObjectList.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ -#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ - -#include -#include "commonObjects.h" -#include - -// The objects will be instantiated in the ID order -namespace objects { - enum sourceObjects: uint32_t { - /* All addresses between start and end are reserved for the FSFW */ - FSFW_CONFIG_RESERVED_START = PUS_SERVICE_1_VERIFICATION, - FSFW_CONFIG_RESERVED_END = TM_STORE, - - CCSDS_DISTRIBUTOR = 10, - PUS_DISTRIBUTOR = 11, - TM_FUNNEL = 12, - - UDP_BRIDGE = 15, - UDP_POLLING_TASK = 16, - - TEST_ECHO_COM_IF = 20, - TEST_DEVICE = 21, - - HK_RECEIVER_MOCK = 22, - TEST_LOCAL_POOL_OWNER_BASE = 25, - - SHARED_SET_ID = 26 - - }; -} - -#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */ diff --git a/unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp b/unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp deleted file mode 100644 index e3ee874a..00000000 --- a/unittest/testcfg/pollingsequence/PollingSequenceFactory.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "PollingSequenceFactory.h" - -#include - -#include -#include -#include - -ReturnValue_t pst::pollingSequenceInitDefault( - FixedTimeslotTaskIF *thisSequence) { - /* Length of a communication cycle */ - uint32_t length = thisSequence->getPeriodMs(); - - /* Add polling sequence table here */ - thisSequence->addSlot(objects::TEST_DEVICE, 0, - DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::TEST_DEVICE, 0.3, - DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::TEST_DEVICE, 0.45 * length, - DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::TEST_DEVICE, 0.6 * length, - DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::TEST_DEVICE, 0.8 * length, - DeviceHandlerIF::GET_READ); - - if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) { - return HasReturnvaluesIF::RETURN_OK; - } - else { -#if FSFW_CPP_OSTREAM_ENABLED - sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" - << std::endl; -#else - sif::printError("pst::pollingSequenceInitDefault: Sequence invalid!"); -#endif - return HasReturnvaluesIF::RETURN_FAILED; - } -} - diff --git a/unittest/testcfg/pollingsequence/PollingSequenceFactory.h b/unittest/testcfg/pollingsequence/PollingSequenceFactory.h deleted file mode 100644 index c5d41b7d..00000000 --- a/unittest/testcfg/pollingsequence/PollingSequenceFactory.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef POLLINGSEQUENCEFACTORY_H_ -#define POLLINGSEQUENCEFACTORY_H_ - -#include - -class FixedTimeslotTaskIF; - -/** - * All device handlers are scheduled by adding them into Polling Sequence Tables (PST) - * to satisfy stricter timing requirements of device communication, - * A device handler has four different communication steps: - * 1. DeviceHandlerIF::SEND_WRITE -> Send write via interface - * 2. DeviceHandlerIF::GET_WRITE -> Get confirmation for write - * 3. DeviceHandlerIF::SEND_READ -> Send read request - * 4. DeviceHandlerIF::GET_READ -> Read from interface - * The PST specifies precisely when the respective ComIF functions are called - * during the communication cycle time. - * The task is created using the FixedTimeslotTaskIF, - * which utilises the underlying Operating System Abstraction Layer (OSAL) - * - * @param thisSequence FixedTimeslotTaskIF * object is passed inside the Factory class when creating the PST - * @return - */ -namespace pst { - -/* Default PST */ -ReturnValue_t pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence); - - -} - -#endif /* POLLINGSEQUENCEINIT_H_ */ diff --git a/unittest/testcfg/returnvalues/classIds.h b/unittest/testcfg/returnvalues/classIds.h deleted file mode 100644 index 7a292708..00000000 --- a/unittest/testcfg/returnvalues/classIds.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef CONFIG_RETURNVALUES_CLASSIDS_H_ -#define CONFIG_RETURNVALUES_CLASSIDS_H_ - -#include "commonClassIds.h" -#include - -/** - * @brief CLASS_ID defintions which are required for custom returnvalues. - */ -namespace CLASS_ID { -enum { - MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT, -}; -} - - -#endif /* CONFIG_RETURNVALUES_CLASSIDS_H_ */ diff --git a/unittest/testcfg/tmtc/apid.h b/unittest/testcfg/tmtc/apid.h deleted file mode 100644 index 0172f6e3..00000000 --- a/unittest/testcfg/tmtc/apid.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef CONFIG_TMTC_APID_H_ -#define CONFIG_TMTC_APID_H_ - -#include - -/** - * Application Process Definition: entity, uniquely identified by an - * application process ID (APID), capable of generating telemetry source - * packets and receiving telecommand packets. - * - * Chose APID(s) for mission and define it here. - */ -namespace apid { - static const uint16_t EIVE_OBSW = 0x65; -} - - -#endif /* CONFIG_TMTC_APID_H_ */ diff --git a/unittest/testcfg/tmtc/pusIds.h b/unittest/testcfg/tmtc/pusIds.h deleted file mode 100644 index 821a9982..00000000 --- a/unittest/testcfg/tmtc/pusIds.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef CONFIG_TMTC_PUSIDS_HPP_ -#define CONFIG_TMTC_PUSIDS_HPP_ - -#include - -namespace pus { -enum Ids: uint8_t { - PUS_SERVICE_1 = 1, - PUS_SERVICE_2 = 2, - PUS_SERVICE_3 = 3, - PUS_SERVICE_5 = 5, - PUS_SERVICE_6 = 6, - PUS_SERVICE_8 = 8, - PUS_SERVICE_9 = 9, - PUS_SERVICE_11 = 11, - PUS_SERVICE_17 = 17, - PUS_SERVICE_19 = 19, - PUS_SERVICE_20 = 20, - PUS_SERVICE_23 = 23, - PUS_SERVICE_200 = 200, - PUS_SERVICE_201 = 201, -}; -}; - -#endif /* CONFIG_TMTC_PUSIDS_HPP_ */ From 5e42618dfdc1bbbb91e1f241ecd6fd6396c3788c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 19:44:58 +0200 Subject: [PATCH 05/14] removed references to removed module --- CMakeLists.txt | 2 +- bsp_q7s/core/CoreController.cpp | 1 - bsp_q7s/memory/SdCardManager.cpp | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb944393..8d76f2fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,7 @@ if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG)) endif() if(EIVE_BUILD_UNITTESTS) - add_subdirectory(${LIB_CATCH2_PATH}) + # add_subdirectory(${LIB_CATCH2_PATH}) add_subdirectory(${UNITTEST_PATH}) endif() diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index b899e60f..d8149ccb 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -6,7 +6,6 @@ #include "fsfw/FSFWVersion.h" #include "fsfw/timemanager/Stopwatch.h" #include "fsfw/serviceinterface/ServiceInterface.h" -#include "fsfw/osal/linux/Timer.h" #if OBSW_USE_TMTC_TCP_BRIDGE == 0 #include "fsfw/osal/common/UdpTmTcBridge.h" #else diff --git a/bsp_q7s/memory/SdCardManager.cpp b/bsp_q7s/memory/SdCardManager.cpp index 873bb6a4..ebebf854 100644 --- a/bsp_q7s/memory/SdCardManager.cpp +++ b/bsp_q7s/memory/SdCardManager.cpp @@ -1,4 +1,3 @@ -#include #include "SdCardManager.h" #include "scratchApi.h" From 01e9ef64c9362204ae1ddd66f0ba5d9d0ebedd34 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 20:05:59 +0200 Subject: [PATCH 06/14] moved command executor --- bsp_q7s/memory/SdCardManager.h | 2 +- fsfw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp_q7s/memory/SdCardManager.h b/bsp_q7s/memory/SdCardManager.h index 1a86f711..6f03e7f1 100644 --- a/bsp_q7s/memory/SdCardManager.h +++ b/bsp_q7s/memory/SdCardManager.h @@ -1,7 +1,7 @@ #ifndef BSP_Q7S_MEMORY_SDCARDACCESSMANAGER_H_ #define BSP_Q7S_MEMORY_SDCARDACCESSMANAGER_H_ -#include +#include "fsfw_hal/linux/CommandExecutor.h" #include "definitions.h" #include "returnvalues/classIds.h" #include "events/subsystemIdRanges.h" diff --git a/fsfw b/fsfw index 4130dd9e..d6938171 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 4130dd9e32eb1d4a5b0e993408ae614952bdd005 +Subproject commit d693817158af209b34c49ea09c6863a7a2bc1fbe From 667a893d01d193a6d1efe2d2e5407c98f56a1c03 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 20:06:18 +0200 Subject: [PATCH 07/14] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index d6938171..0dedd8f2 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit d693817158af209b34c49ea09c6863a7a2bc1fbe +Subproject commit 0dedd8f2a18b619f4b5003e701e7bb40c0ac4d61 From 7c673d6e7fd2d703ca64d7f5b7a0f5a1a459c3ed Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 17:55:36 +0200 Subject: [PATCH 08/14] bugfixes in max31685, indexing adapted --- bsp_hosted/fsfwconfig/devices/gpioIds.h | 32 ++-- bsp_q7s/core/ObjectFactory.cpp | 178 +++++++++--------- bsp_q7s/gpio/gpioCallbacks.cpp | 32 ++-- common/config/commonObjects.h | 32 ++-- linux/fsfwconfig/devices/addresses.h | 32 ++-- linux/fsfwconfig/devices/gpioIds.h | 32 ++-- .../pollingSequenceFactory.cpp | 164 ++++++++-------- mission/devices/Max31865PT1000Handler.cpp | 64 ++++--- mission/devices/Max31865PT1000Handler.h | 13 +- tmtc | 2 +- 10 files changed, 294 insertions(+), 287 deletions(-) diff --git a/bsp_hosted/fsfwconfig/devices/gpioIds.h b/bsp_hosted/fsfwconfig/devices/gpioIds.h index df49c0b7..53a53677 100644 --- a/bsp_hosted/fsfwconfig/devices/gpioIds.h +++ b/bsp_hosted/fsfwconfig/devices/gpioIds.h @@ -27,22 +27,22 @@ namespace gpioIds { TEST_ID_0, TEST_ID_1, - RTD_IC3, - RTD_IC4, - RTD_IC5, - RTD_IC6, - RTD_IC7, - RTD_IC8, - RTD_IC9, - RTD_IC10, - RTD_IC11, - RTD_IC12, - RTD_IC13, - RTD_IC14, - RTD_IC15, - RTD_IC16, - RTD_IC17, - RTD_IC18, + RTD_IC_0, + RTD_IC_1, + RTD_IC_2, + RTD_IC_3, + RTD_IC_4, + RTD_IC_5, + RTD_IC_6, + RTD_IC_7, + RTD_IC_8, + RTD_IC_9, + RTD_IC_10, + RTD_IC_11, + RTD_IC_12, + RTD_IC_13, + RTD_IC_14, + RTD_IC_15, SPI_MUX_BIT_1, SPI_MUX_BIT_2, diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 16e3da95..c6062926 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -136,7 +136,7 @@ void ObjectFactory::produce(void* args) { #endif /* OBSW_ADD_SYRLINKS == 1 */ #if OBSW_ADD_RTD_DEVICES == 1 - createRtdComponents(); + createRtdComponents(gpioComIF); #endif /* OBSW_ADD_RTD_DEVICES == 1 */ I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, @@ -641,148 +641,152 @@ void ObjectFactory::createSyrlinksComponents() { void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) { GpioCookie* rtdGpioCookie = new GpioCookie; + GpioCallback* gpioRtdIc0 = new GpioCallback("Chip select RTD IC0", gpio::OUT, gpio::HIGH, + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_0, gpioRtdIc0); + GpioCallback* gpioRtdIc1 = new GpioCallback("Chip select RTD IC1", gpio::OUT, gpio::HIGH, + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_1, gpioRtdIc1); + GpioCallback* gpioRtdIc2 = new GpioCallback("Chip select RTD IC2", gpio::OUT, gpio::HIGH, + &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_2, gpioRtdIc2); GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC3, gpioRtdIc3); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc3); GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC4, gpioRtdIc4); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc4); GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC5, gpioRtdIc5); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc5); GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC6, gpioRtdIc6); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc6); GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC7, gpioRtdIc7); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc7); GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC8, gpioRtdIc8); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc8); GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC9, gpioRtdIc9); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc9); GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC10, gpioRtdIc10); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc10); GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC11, gpioRtdIc11); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc11); GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC12, gpioRtdIc12); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc12); GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC13, gpioRtdIc13); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc13); GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC14, gpioRtdIc14); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc14); GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC15, gpioRtdIc15); - GpioCallback* gpioRtdIc16 = new GpioCallback("Chip select RTD IC16", gpio::OUT, gpio::HIGH, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC16, gpioRtdIc16); - GpioCallback* gpioRtdIc17 = new GpioCallback("Chip select RTD IC17", gpio::OUT, gpio::HIGH, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC17, gpioRtdIc17); - GpioCallback* gpioRtdIc18 = new GpioCallback("Chip select RTD IC18", gpio::OUT, gpio::HIGH, - &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC18, gpioRtdIc18); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc15); gpioComIF->addGpios(rtdGpioCookie); - SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc0 = new SpiCookie(addresses::RTD_IC_0, gpioIds::RTD_IC_0, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc1 = new SpiCookie(addresses::RTD_IC_1, gpioIds::RTD_IC_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC5, gpioIds::RTD_IC5, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc2 = new SpiCookie(addresses::RTD_IC_2, gpioIds::RTD_IC_2, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC6, gpioIds::RTD_IC6, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC_3, gpioIds::RTD_IC_3, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC7, gpioIds::RTD_IC7, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC_4, gpioIds::RTD_IC_4, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC8, gpioIds::RTD_IC8, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC_5, gpioIds::RTD_IC_5, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC9, gpioIds::RTD_IC9, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC_6, gpioIds::RTD_IC_6, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC10, gpioIds::RTD_IC10, + SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC_7, gpioIds::RTD_IC_7, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC11, gpioIds::RTD_IC11, + SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC_8, gpioIds::RTD_IC_8, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC12, gpioIds::RTD_IC12, + SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC_9, gpioIds::RTD_IC_9, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC13, gpioIds::RTD_IC13, + SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC_10, gpioIds::RTD_IC_10, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC14, gpioIds::RTD_IC14, + SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC_11, gpioIds::RTD_IC_11, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC15, gpioIds::RTD_IC15, + SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC_12, gpioIds::RTD_IC_12, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc16 = new SpiCookie(addresses::RTD_IC16, gpioIds::RTD_IC16, + SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC_13, gpioIds::RTD_IC_13, std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc17 = new SpiCookie(addresses::RTD_IC17, gpioIds::RTD_IC17, + SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC_14, gpioIds::RTD_IC_14, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc18 = new SpiCookie(addresses::RTD_IC18, gpioIds::RTD_IC18, + SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC_15, gpioIds::RTD_IC_15, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC3, objects::SPI_COM_IF, - spiRtdIc3, 0); // 0 is switchId - Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC4, objects::SPI_COM_IF, - spiRtdIc4, 0); - Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC5, objects::SPI_COM_IF, - spiRtdIc5, 0); - Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC6, objects::SPI_COM_IF, - spiRtdIc6, 0); - Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC7, objects::SPI_COM_IF, - spiRtdIc7, 0); - Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC8, objects::SPI_COM_IF, - spiRtdIc8, 0); - Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC9, objects::SPI_COM_IF, - spiRtdIc9, 0); - Max31865PT1000Handler* rtdIc10 = new Max31865PT1000Handler(objects::RTD_IC10, - objects::SPI_COM_IF, spiRtdIc10, 0); - Max31865PT1000Handler* rtdIc11 = new Max31865PT1000Handler(objects::RTD_IC11, - objects::SPI_COM_IF, spiRtdIc11, 0); - Max31865PT1000Handler* rtdIc12 = new Max31865PT1000Handler(objects::RTD_IC12, - objects::SPI_COM_IF, spiRtdIc12, 0); - Max31865PT1000Handler* rtdIc13 = new Max31865PT1000Handler(objects::RTD_IC13, - objects::SPI_COM_IF, spiRtdIc13, 0); - Max31865PT1000Handler* rtdIc14 = new Max31865PT1000Handler(objects::RTD_IC14, - objects::SPI_COM_IF, spiRtdIc14, 0); - Max31865PT1000Handler* rtdIc15 = new Max31865PT1000Handler(objects::RTD_IC15, - objects::SPI_COM_IF, spiRtdIc15, 0); - Max31865PT1000Handler* rtdIc16 = new Max31865PT1000Handler(objects::RTD_IC16, - objects::SPI_COM_IF, spiRtdIc16, 0); - Max31865PT1000Handler* rtdIc17 = new Max31865PT1000Handler(objects::RTD_IC17, - objects::SPI_COM_IF, spiRtdIc17, 0); - Max31865PT1000Handler* rtdIc18 = new Max31865PT1000Handler(objects::RTD_IC18, - objects::SPI_COM_IF, spiRtdIc18, 0); + Max31865PT1000Handler* rtdIc0 = new Max31865PT1000Handler(objects::RTD_IC_0, objects::SPI_COM_IF, + spiRtdIc0); + Max31865PT1000Handler* rtdIc1 = new Max31865PT1000Handler(objects::RTD_IC_1, objects::SPI_COM_IF, + spiRtdIc1); + Max31865PT1000Handler* rtdIc2 = new Max31865PT1000Handler(objects::RTD_IC_2, objects::SPI_COM_IF, + spiRtdIc2); + Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC_3, objects::SPI_COM_IF, + spiRtdIc3); + Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC_4, objects::SPI_COM_IF, + spiRtdIc4); + Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC_5, objects::SPI_COM_IF, + spiRtdIc5); + Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC_6, objects::SPI_COM_IF, + spiRtdIc6); + Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC_7, + objects::SPI_COM_IF, spiRtdIc7); + Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC_8, + objects::SPI_COM_IF, spiRtdIc8); + Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC_9, + objects::SPI_COM_IF, spiRtdIc9); + Max31865PT1000Handler* rtdIc10 = new Max31865PT1000Handler(objects::RTD_IC_10, + objects::SPI_COM_IF, spiRtdIc10); + Max31865PT1000Handler* rtdIc11 = new Max31865PT1000Handler(objects::RTD_IC_11, + objects::SPI_COM_IF, spiRtdIc11); + Max31865PT1000Handler* rtdIc12 = new Max31865PT1000Handler(objects::RTD_IC_12, + objects::SPI_COM_IF, spiRtdIc12); + Max31865PT1000Handler* rtdIc13 = new Max31865PT1000Handler(objects::RTD_IC_13, + objects::SPI_COM_IF, spiRtdIc13); + Max31865PT1000Handler* rtdIc14 = new Max31865PT1000Handler(objects::RTD_IC_14, + objects::SPI_COM_IF, spiRtdIc14); + Max31865PT1000Handler* rtdIc15 = new Max31865PT1000Handler(objects::RTD_IC_15, + objects::SPI_COM_IF, spiRtdIc15); - (void) rtdIc3; - (void) rtdIc4; - (void) rtdIc5; - (void) rtdIc6; - (void) rtdIc7; - (void) rtdIc8; - (void) rtdIc9; - (void) rtdIc10; - (void) rtdIc11; - (void) rtdIc12; - (void) rtdIc13; - (void) rtdIc14; - (void) rtdIc15; - (void) rtdIc16; - (void) rtdIc17; - (void) rtdIc18; + rtdIc0->setStartUpImmediately(); + rtdIc1->setStartUpImmediately(); + rtdIc2->setStartUpImmediately(); + + static_cast(rtdIc0); + static_cast(rtdIc1); + static_cast(rtdIc2); + static_cast(rtdIc3); + static_cast(rtdIc4); + static_cast(rtdIc5); + static_cast(rtdIc6); + static_cast(rtdIc7); + static_cast(rtdIc8); + static_cast(rtdIc9); + static_cast(rtdIc10); + static_cast(rtdIc11); + static_cast(rtdIc12); + static_cast(rtdIc13); + static_cast(rtdIc14); + static_cast(rtdIc15); } void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) { diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index 8280b1e9..27ae18d0 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -72,82 +72,82 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Lev } else if (value == gpio::LOW) { switch (gpioId) { - case(gpioIds::RTD_IC3): { + case(gpioIds::RTD_IC_0): { enableDecoderTcsIc1(); selectY7(); break; } - case(gpioIds::RTD_IC4): { + case(gpioIds::RTD_IC_1): { enableDecoderTcsIc1(); selectY6(); break; } - case(gpioIds::RTD_IC5): { + case(gpioIds::RTD_IC_2): { enableDecoderTcsIc1(); selectY5(); break; } - case(gpioIds::RTD_IC6): { + case(gpioIds::RTD_IC_3): { enableDecoderTcsIc1(); selectY4(); break; } - case(gpioIds::RTD_IC7): { + case(gpioIds::RTD_IC_4): { enableDecoderTcsIc1(); selectY3(); break; } - case(gpioIds::RTD_IC8): { + case(gpioIds::RTD_IC_5): { enableDecoderTcsIc1(); selectY2(); break; } - case(gpioIds::RTD_IC9): { + case(gpioIds::RTD_IC_6): { enableDecoderTcsIc1(); selectY1(); break; } - case(gpioIds::RTD_IC10): { + case(gpioIds::RTD_IC_7): { enableDecoderTcsIc1(); selectY0(); break; } - case(gpioIds::RTD_IC11): { + case(gpioIds::RTD_IC_8): { enableDecoderTcsIc2(); selectY7(); break; } - case(gpioIds::RTD_IC12): { + case(gpioIds::RTD_IC_9): { enableDecoderTcsIc2(); selectY6(); break; } - case(gpioIds::RTD_IC13): { + case(gpioIds::RTD_IC_10): { enableDecoderTcsIc2(); selectY5(); break; } - case(gpioIds::RTD_IC14): { + case(gpioIds::RTD_IC_11): { enableDecoderTcsIc2(); selectY4(); break; } - case(gpioIds::RTD_IC15): { + case(gpioIds::RTD_IC_12): { enableDecoderTcsIc2(); selectY3(); break; } - case(gpioIds::RTD_IC16): { + case(gpioIds::RTD_IC_13): { enableDecoderTcsIc2(); selectY2(); break; } - case(gpioIds::RTD_IC17): { + case(gpioIds::RTD_IC_14): { enableDecoderTcsIc2(); selectY1(); break; } - case(gpioIds::RTD_IC18): { + case(gpioIds::RTD_IC_15): { enableDecoderTcsIc2(); selectY0(); break; diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index 43cd396c..9e4418d2 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -47,22 +47,22 @@ enum commonObjects: uint32_t { * Not yet specified which pt1000 will measure which device/location in the satellite. * Therefore object ids are named according to the IC naming of the RTDs in the schematic. */ - RTD_IC3 = 0x44420016, - RTD_IC4 = 0x44420017, - RTD_IC5 = 0x44420018, - RTD_IC6 = 0x44420019, - RTD_IC7 = 0x44420020, - RTD_IC8 = 0x44420021, - RTD_IC9 = 0x44420022, - RTD_IC10 = 0x44420023, - RTD_IC11 = 0x44420024, - RTD_IC12 = 0x44420025, - RTD_IC13 = 0x44420026, - RTD_IC14 = 0x44420027, - RTD_IC15 = 0x44420028, - RTD_IC16 = 0x44420029, - RTD_IC17 = 0x44420030, - RTD_IC18 = 0x44420031, + RTD_IC_0 = 0x44420016, + RTD_IC_1 = 0x44420017, + RTD_IC_2 = 0x44420018, + RTD_IC_3 = 0x44420019, + RTD_IC_4 = 0x44420020, + RTD_IC_5 = 0x44420021, + RTD_IC_6 = 0x44420022, + RTD_IC_7 = 0x44420023, + RTD_IC_8 = 0x44420024, + RTD_IC_9 = 0x44420025, + RTD_IC_10 = 0x44420026, + RTD_IC_11 = 0x44420027, + RTD_IC_12 = 0x44420028, + RTD_IC_13 = 0x44420029, + RTD_IC_14 = 0x44420030, + RTD_IC_15 = 0x44420031, SUS_1 = 0x44120032, SUS_2 = 0x44120033, diff --git a/linux/fsfwconfig/devices/addresses.h b/linux/fsfwconfig/devices/addresses.h index 9d620475..945c2eb7 100644 --- a/linux/fsfwconfig/devices/addresses.h +++ b/linux/fsfwconfig/devices/addresses.h @@ -49,22 +49,22 @@ namespace addresses { }; enum spiAddresses: address_t { - RTD_IC3, - RTD_IC4, - RTD_IC5, - RTD_IC6, - RTD_IC7, - RTD_IC8, - RTD_IC9, - RTD_IC10, - RTD_IC11, - RTD_IC12, - RTD_IC13, - RTD_IC14, - RTD_IC15, - RTD_IC16, - RTD_IC17, - RTD_IC18, + RTD_IC_0, + RTD_IC_1, + RTD_IC_2, + RTD_IC_3, + RTD_IC_4, + RTD_IC_5, + RTD_IC_6, + RTD_IC_7, + RTD_IC_8, + RTD_IC_9, + RTD_IC_10, + RTD_IC_11, + RTD_IC_12, + RTD_IC_13, + RTD_IC_14, + RTD_IC_15, RW1, RW2, RW3, diff --git a/linux/fsfwconfig/devices/gpioIds.h b/linux/fsfwconfig/devices/gpioIds.h index 5f09e5f6..62913d5a 100644 --- a/linux/fsfwconfig/devices/gpioIds.h +++ b/linux/fsfwconfig/devices/gpioIds.h @@ -34,22 +34,22 @@ enum gpioId_t { TEST_ID_0, TEST_ID_1, - RTD_IC3, - RTD_IC4, - RTD_IC5, - RTD_IC6, - RTD_IC7, - RTD_IC8, - RTD_IC9, - RTD_IC10, - RTD_IC11, - RTD_IC12, - RTD_IC13, - RTD_IC14, - RTD_IC15, - RTD_IC16, - RTD_IC17, - RTD_IC18, + RTD_IC_0, + RTD_IC_1, + RTD_IC_2, + RTD_IC_3, + RTD_IC_4, + RTD_IC_5, + RTD_IC_6, + RTD_IC_7, + RTD_IC_8, + RTD_IC_9, + RTD_IC_10, + RTD_IC_11, + RTD_IC_12, + RTD_IC_13, + RTD_IC_14, + RTD_IC_15, CS_SUS_1, CS_SUS_2, diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 96950006..887f0f5c 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -36,22 +36,22 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { DeviceHandlerIF::PERFORM_OPERATION); #endif #if OBSW_ADD_RTD_DEVICES == 1 - thisSequence->addSlot(objects::RTD_IC3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC5, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC6, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC7, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC8, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC9, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC10, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC11, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC12, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC13, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC14, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC15, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC16, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC17, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RTD_IC18, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_0, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_1, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_2, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_5, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_6, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_7, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_8, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_9, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_10, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_11, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_12, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_13, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_14, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::RTD_IC_15, length * 0, DeviceHandlerIF::PERFORM_OPERATION); #endif /* OBSW_ADD_RTD_DEVICES */ #if OBSW_ADD_TMP_DEVICES == 1 @@ -59,22 +59,22 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE); #endif #if OBSW_ADD_RTD_DEVICES == 1 - thisSequence->addSlot(objects::RTD_IC3, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC4, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC5, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC6, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC7, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC8, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC9, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC10, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC11, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC12, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC13, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC14, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC15, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC16, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC17, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RTD_IC18, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_0, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_1, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_2, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_3, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_4, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_5, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_6, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_7, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_8, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_9, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_10, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_11, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_12, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_13, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_14, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RTD_IC_15, length * 0.2, DeviceHandlerIF::SEND_WRITE); #endif /* OBSW_ADD_RTD_DEVICES */ #if OBSW_ADD_TMP_DEVICES == 1 @@ -82,22 +82,22 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.4, DeviceHandlerIF::GET_WRITE); #endif #if OBSW_ADD_RTD_DEVICES == 1 - thisSequence->addSlot(objects::RTD_IC3, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC4, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC5, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC6, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC7, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC8, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC9, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC10, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC11, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC12, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC13, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC14, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC15, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC16, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC17, length * 0.4, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RTD_IC18, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_0, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_1, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_2, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_3, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_4, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_5, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_6, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_7, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_8, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_9, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_10, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_11, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_12, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_13, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_14, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RTD_IC_15, length * 0.4, DeviceHandlerIF::GET_WRITE); #endif /* OBSW_ADD_RTD_DEVICES */ #if OBSW_ADD_TMP_DEVICES == 1 @@ -105,22 +105,22 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.6, DeviceHandlerIF::SEND_READ); #endif #if OBSW_ADD_RTD_DEVICES == 1 - thisSequence->addSlot(objects::RTD_IC3, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC4, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC5, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC6, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC7, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC8, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC9, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC10, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC11, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC12, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC13, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC14, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC15, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC16, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC17, length * 0.6, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RTD_IC18, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_0, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_1, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_2, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_3, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_4, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_5, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_6, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_7, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_8, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_9, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_10, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_11, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_12, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_13, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_14, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RTD_IC_15, length * 0.6, DeviceHandlerIF::SEND_READ); #endif /* OBSW_ADD_RTD_DEVICES */ #if OBSW_ADD_TMP_DEVICES == 1 @@ -128,22 +128,22 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ); #endif #if OBSW_ADD_RTD_DEVICES == 1 - thisSequence->addSlot(objects::RTD_IC3, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC4, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC5, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC6, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC7, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC8, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC9, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC10, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC11, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC12, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC13, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC14, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC15, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC16, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC17, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RTD_IC18, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_0, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_1, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_2, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_3, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_4, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_5, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_6, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_7, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_8, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_9, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_10, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_11, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_12, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_13, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_14, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RTD_IC_15, length * 0.8, DeviceHandlerIF::GET_READ); #endif /* OBSW_ADD_RTD_DEVICES */ #if OBSW_ADD_RAD_SENSORS == 1 @@ -439,8 +439,8 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { #endif #if OBSW_ADD_ACS_BOARD == 1 - bool enableAside = false; - bool enableBside = true; + bool enableAside = true; + bool enableBside = false; if(enableAside) { // A side thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, diff --git a/mission/devices/Max31865PT1000Handler.cpp b/mission/devices/Max31865PT1000Handler.cpp index ac33e01d..450d34f3 100644 --- a/mission/devices/Max31865PT1000Handler.cpp +++ b/mission/devices/Max31865PT1000Handler.cpp @@ -5,10 +5,10 @@ #include #include -Max31865PT1000Handler::Max31865PT1000Handler(object_id_t objectId, - object_id_t comIF, CookieIF *comCookie, uint8_t switchId): - DeviceHandlerBase(objectId, comIF, comCookie), switchId(switchId), - sensorDataset(this), sensorDatasetSid(sensorDataset.getSid()) { +Max31865PT1000Handler::Max31865PT1000Handler(object_id_t objectId, object_id_t comIF, + CookieIF *comCookie): + DeviceHandlerBase(objectId, comIF, comCookie), sensorDataset(this), + sensorDatasetSid(sensorDataset.getSid()) { #if OBSW_VERBOSE_LEVEL >= 1 debugDivider = new PeriodicOperationDivider(0); #endif @@ -33,8 +33,8 @@ void Max31865PT1000Handler::doStartUp() { if(internalState == InternalState::CONFIGURE) { if(commandExecuted) { - internalState = InternalState::REQUEST_CONFIG; commandExecuted = false; + internalState = InternalState::REQUEST_CONFIG; } } @@ -323,26 +323,32 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply( break; } case(Max31865Definitions::REQUEST_LOW_THRESHOLD): { - uint16_t readLowThreshold = packet[0] << 8 | packet[1]; + uint16_t readLowThreshold = packet[1] << 8 | packet[2]; if(readLowThreshold != LOW_THRESHOLD) { -#if FSFW_CPP_OSTREAM_ENABLED == 1 && OBSW_DEBUG_RTD == 1 - sif::error - << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between written " - << "and readback value of low threshold register" - << std::endl; +#if FSFW_VERBOSE_LEVEL >= 1 +#if FSFW_CPP_OSTREAM_ENABLED == 1 + sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between " << + "written and readback value of low threshold register" << std::endl; +#else + sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between " + "written and readback value of low threshold register\n"); +#endif #endif } commandExecuted = true; break; } case(Max31865Definitions::REQUEST_HIGH_THRESHOLD): { - uint16_t readHighThreshold = packet[0] << 8 | packet[1]; + uint16_t readHighThreshold = packet[1] << 8 | packet[2]; if(readHighThreshold != HIGH_THRESHOLD) { -#if FSFW_CPP_OSTREAM_ENABLED == 1 && OBSW_DEBUG_RTD == 1 - sif::error - << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between written " - << "and readback value of high threshold register" - << std::endl; +#if FSFW_VERBOSE_LEVEL >= 1 +#if FSFW_CPP_OSTREAM_ENABLED == 1 + sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Missmatch between " << + "written and readback value of high threshold register" << std::endl; +#else + sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Missmatch between " + "written and readback value of high threshold register\n"); +#endif #endif } commandExecuted = true; @@ -365,30 +371,28 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply( // calculate approximation float approxTemp = adcCode / 32.0 - 256.0; +#if OBSW_DEBUG_RTD == 1 #if OBSW_VERBOSE_LEVEL >= 1 if(debugDivider->checkAndIncrement()) { #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::info << "Max31865PT1000Handler::interpretDeviceReply: Measured " - << "resistance is " << rtdValue << " Ohms." << std::endl; - sif::info << "Approximated temperature is " << approxTemp << " C" - << std::endl; + sif::info << "Max31865: Measured resistance is " << rtdValue << " Ohms." << std::endl; + sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl; #else - sif::printInfo("Max31865PT1000Handler::interpretDeviceReply: Measured resistance is %f" - " Ohms.\n", rtdValue); + sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue); sif::printInfo("Approximated temperature is %f C\n", approxTemp); #endif - sensorDataset.setChanged(true); } #endif - +#endif PoolReadGuard pg(&sensorDataset); if(pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) { // Configuration error #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::debug << "Max31865PT1000Handler::interpretDeviceReply: Error reading dataset!" + sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Error reading dataset!" << std::endl; #else - sif::printDebug("Max31865PT1000Handler::interpretDeviceReply: Error reading dataset!\n"); + sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: " + "Error reading dataset!\n"); #endif return pg.getReadResult(); } @@ -407,10 +411,10 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply( faultByte = packet[1]; #if OBSW_VERBOSE_LEVEL >= 1 #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::info << "Max31865PT1000Handler::interpretDeviceReply: Fault byte" + sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Fault byte" " is: 0b" << std::bitset<8>(faultByte) << std::endl; #else - sif::printInfo("Max31865PT1000Handler::interpretDeviceReply: Fault byte" + sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Fault byte" " is: 0b" BYTE_TO_BINARY_PATTERN "\n", BYTE_TO_BINARY(faultByte)); #endif #endif @@ -459,7 +463,7 @@ void Max31865PT1000Handler::debugInterface(uint8_t positionTracker, uint32_t Max31865PT1000Handler::getTransitionDelayMs( Mode_t modeFrom, Mode_t modeTo) { - return 20000; + return 25000; } ReturnValue_t Max31865PT1000Handler::getSwitches( diff --git a/mission/devices/Max31865PT1000Handler.h b/mission/devices/Max31865PT1000Handler.h index f3240788..ad412ef1 100644 --- a/mission/devices/Max31865PT1000Handler.h +++ b/mission/devices/Max31865PT1000Handler.h @@ -30,8 +30,7 @@ */ class Max31865PT1000Handler: public DeviceHandlerBase { public: - Max31865PT1000Handler(object_id_t objectId, object_id_t comIF, - CookieIF * comCookie, uint8_t switchId); + Max31865PT1000Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie); virtual~ Max31865PT1000Handler(); // Configuration in 8 digit code: @@ -47,15 +46,15 @@ public: static constexpr uint8_t DEFAULT_CONFIG = 0b11000001; /** - * Expected temperature range is -100°C and 100°C. + * Expected temperature range is -100 C and 100 C. * If there are temperatures beyond this range there must be a fault. * The threshold variables cause the MAX1385 to signal an error in case the measured resistance - * indicates a temperature higher than 100°C or lower than -100°C. + * indicates a temperature higher than 100 C or lower than -100 C. * Default settings of MAX13865 are 0xFFFF for the high threshold register and 0x0 for the * low threshold register. */ - static constexpr uint16_t HIGH_THRESHOLD = 11298; // = 100°C - static constexpr uint16_t LOW_THRESHOLD = 4902; // = -100°C + static constexpr uint16_t HIGH_THRESHOLD = 11298; // = 100 C + static constexpr uint16_t LOW_THRESHOLD = 4902; // = -100 C static constexpr float RTD_RREF_PT1000 = 4020.0; //!< Ohm static constexpr float RTD_RESISTANCE0_PT1000 = 1000.0; //!< Ohm @@ -85,7 +84,7 @@ protected: void modeChanged() override; private: - const uint8_t switchId; + uint8_t switchId = 0; enum class InternalState { NONE, diff --git a/tmtc b/tmtc index 4325b8cc..423f1fbb 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 4325b8ccaa0495eb8b23f4b6aeec3165c62e7bd1 +Subproject commit 423f1fbb2c9f93f6eb3f3ae8ecbbdbfa30002596 From dcdf0c98439e92e1ef3b9766db2d2eead2e06cdf Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 18:03:00 +0200 Subject: [PATCH 09/14] updated object translation file --- generators/bsp_q7s_objects.csv | 38 ++++---- generators/objects/translateObjects.cpp | 86 +++++++++++-------- generators/requirements.txt | 1 + linux/fsfwconfig/objects/translateObjects.cpp | 86 +++++++++++-------- 4 files changed, 127 insertions(+), 84 deletions(-) create mode 100644 generators/requirements.txt diff --git a/generators/bsp_q7s_objects.csv b/generators/bsp_q7s_objects.csv index 4930f7a0..24035373 100644 --- a/generators/bsp_q7s_objects.csv +++ b/generators/bsp_q7s_objects.csv @@ -45,22 +45,22 @@ 0x444100A4;HEATER_HANDLER 0x44420004;TMP1075_HANDLER_1 0x44420005;TMP1075_HANDLER_2 -0x44420016;RTD_IC3 -0x44420017;RTD_IC4 -0x44420018;RTD_IC5 -0x44420019;RTD_IC6 -0x44420020;RTD_IC7 -0x44420021;RTD_IC8 -0x44420022;RTD_IC9 -0x44420023;RTD_IC10 -0x44420024;RTD_IC11 -0x44420025;RTD_IC12 -0x44420026;RTD_IC13 -0x44420027;RTD_IC14 -0x44420028;RTD_IC15 -0x44420029;RTD_IC16 -0x44420030;RTD_IC17 -0x44420031;RTD_IC18 +0x44420016;RTD_IC_0 +0x44420017;RTD_IC_1 +0x44420018;RTD_IC_2 +0x44420019;RTD_IC_3 +0x44420020;RTD_IC_4 +0x44420021;RTD_IC_5 +0x44420022;RTD_IC_6 +0x44420023;RTD_IC_7 +0x44420024;RTD_IC_8 +0x44420025;RTD_IC_9 +0x44420026;RTD_IC_10 +0x44420027;RTD_IC_11 +0x44420028;RTD_IC_12 +0x44420029;RTD_IC_13 +0x44420030;RTD_IC_14 +0x44420031;RTD_IC_15 0x445300A3;SYRLINKS_HK_HANDLER 0x49000000;ARDUINO_COM_IF 0x49010005;GPIO_IF @@ -73,6 +73,12 @@ 0x50000300;TMTC_BRIDGE 0x50000400;TMTC_POLLING_TASK 0x50000500;FILE_SYSTEM_HANDLER +0x50000600;PTME +0x50000700;PAPB_VC0 +0x50000701;PAPB_VC1 +0x50000702;PAPB_VC2 +0x50000703;PAPB_VC3 +0x50000800;CCSDS_HANDLER 0x51000500;PUS_SERVICE_6 0x53000000;FSFW_OBJECTS_START 0x53000001;PUS_SERVICE_1_VERIFICATION diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 23a232c8..4b256595 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 105 translations. - * Generated on: 2021-08-31 10:31:24 + * Contains 111 translations. + * Generated on: 2021-10-12 18:02:43 */ #include "translateObjects.h" @@ -53,22 +53,22 @@ const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER"; const char *HEATER_HANDLER_STRING = "HEATER_HANDLER"; const char *TMP1075_HANDLER_1_STRING = "TMP1075_HANDLER_1"; const char *TMP1075_HANDLER_2_STRING = "TMP1075_HANDLER_2"; -const char *RTD_IC3_STRING = "RTD_IC3"; -const char *RTD_IC4_STRING = "RTD_IC4"; -const char *RTD_IC5_STRING = "RTD_IC5"; -const char *RTD_IC6_STRING = "RTD_IC6"; -const char *RTD_IC7_STRING = "RTD_IC7"; -const char *RTD_IC8_STRING = "RTD_IC8"; -const char *RTD_IC9_STRING = "RTD_IC9"; -const char *RTD_IC10_STRING = "RTD_IC10"; -const char *RTD_IC11_STRING = "RTD_IC11"; -const char *RTD_IC12_STRING = "RTD_IC12"; -const char *RTD_IC13_STRING = "RTD_IC13"; -const char *RTD_IC14_STRING = "RTD_IC14"; -const char *RTD_IC15_STRING = "RTD_IC15"; -const char *RTD_IC16_STRING = "RTD_IC16"; -const char *RTD_IC17_STRING = "RTD_IC17"; -const char *RTD_IC18_STRING = "RTD_IC18"; +const char *RTD_IC_0_STRING = "RTD_IC_0"; +const char *RTD_IC_1_STRING = "RTD_IC_1"; +const char *RTD_IC_2_STRING = "RTD_IC_2"; +const char *RTD_IC_3_STRING = "RTD_IC_3"; +const char *RTD_IC_4_STRING = "RTD_IC_4"; +const char *RTD_IC_5_STRING = "RTD_IC_5"; +const char *RTD_IC_6_STRING = "RTD_IC_6"; +const char *RTD_IC_7_STRING = "RTD_IC_7"; +const char *RTD_IC_8_STRING = "RTD_IC_8"; +const char *RTD_IC_9_STRING = "RTD_IC_9"; +const char *RTD_IC_10_STRING = "RTD_IC_10"; +const char *RTD_IC_11_STRING = "RTD_IC_11"; +const char *RTD_IC_12_STRING = "RTD_IC_12"; +const char *RTD_IC_13_STRING = "RTD_IC_13"; +const char *RTD_IC_14_STRING = "RTD_IC_14"; +const char *RTD_IC_15_STRING = "RTD_IC_15"; const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER"; const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF"; const char *GPIO_IF_STRING = "GPIO_IF"; @@ -81,6 +81,12 @@ const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR"; const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE"; const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK"; const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER"; +const char *PTME_STRING = "PTME"; +const char *PAPB_VC0_STRING = "PAPB_VC0"; +const char *PAPB_VC1_STRING = "PAPB_VC1"; +const char *PAPB_VC2_STRING = "PAPB_VC2"; +const char *PAPB_VC3_STRING = "PAPB_VC3"; +const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START"; const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION"; @@ -209,37 +215,37 @@ const char* translateObject(object_id_t object) { case 0x44420005: return TMP1075_HANDLER_2_STRING; case 0x44420016: - return RTD_IC3_STRING; + return RTD_IC_0_STRING; case 0x44420017: - return RTD_IC4_STRING; + return RTD_IC_1_STRING; case 0x44420018: - return RTD_IC5_STRING; + return RTD_IC_2_STRING; case 0x44420019: - return RTD_IC6_STRING; + return RTD_IC_3_STRING; case 0x44420020: - return RTD_IC7_STRING; + return RTD_IC_4_STRING; case 0x44420021: - return RTD_IC8_STRING; + return RTD_IC_5_STRING; case 0x44420022: - return RTD_IC9_STRING; + return RTD_IC_6_STRING; case 0x44420023: - return RTD_IC10_STRING; + return RTD_IC_7_STRING; case 0x44420024: - return RTD_IC11_STRING; + return RTD_IC_8_STRING; case 0x44420025: - return RTD_IC12_STRING; + return RTD_IC_9_STRING; case 0x44420026: - return RTD_IC13_STRING; + return RTD_IC_10_STRING; case 0x44420027: - return RTD_IC14_STRING; + return RTD_IC_11_STRING; case 0x44420028: - return RTD_IC15_STRING; + return RTD_IC_12_STRING; case 0x44420029: - return RTD_IC16_STRING; + return RTD_IC_13_STRING; case 0x44420030: - return RTD_IC17_STRING; + return RTD_IC_14_STRING; case 0x44420031: - return RTD_IC18_STRING; + return RTD_IC_15_STRING; case 0x445300A3: return SYRLINKS_HK_HANDLER_STRING; case 0x49000000: @@ -264,6 +270,18 @@ const char* translateObject(object_id_t object) { return TMTC_POLLING_TASK_STRING; case 0x50000500: return FILE_SYSTEM_HANDLER_STRING; + case 0x50000600: + return PTME_STRING; + case 0x50000700: + return PAPB_VC0_STRING; + case 0x50000701: + return PAPB_VC1_STRING; + case 0x50000702: + return PAPB_VC2_STRING; + case 0x50000703: + return PAPB_VC3_STRING; + case 0x50000800: + return CCSDS_HANDLER_STRING; case 0x51000500: return PUS_SERVICE_6_STRING; case 0x53000000: diff --git a/generators/requirements.txt b/generators/requirements.txt new file mode 100644 index 00000000..0aa54598 --- /dev/null +++ b/generators/requirements.txt @@ -0,0 +1 @@ +colorlog>=5.0.0 diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 23a232c8..4b256595 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 105 translations. - * Generated on: 2021-08-31 10:31:24 + * Contains 111 translations. + * Generated on: 2021-10-12 18:02:43 */ #include "translateObjects.h" @@ -53,22 +53,22 @@ const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER"; const char *HEATER_HANDLER_STRING = "HEATER_HANDLER"; const char *TMP1075_HANDLER_1_STRING = "TMP1075_HANDLER_1"; const char *TMP1075_HANDLER_2_STRING = "TMP1075_HANDLER_2"; -const char *RTD_IC3_STRING = "RTD_IC3"; -const char *RTD_IC4_STRING = "RTD_IC4"; -const char *RTD_IC5_STRING = "RTD_IC5"; -const char *RTD_IC6_STRING = "RTD_IC6"; -const char *RTD_IC7_STRING = "RTD_IC7"; -const char *RTD_IC8_STRING = "RTD_IC8"; -const char *RTD_IC9_STRING = "RTD_IC9"; -const char *RTD_IC10_STRING = "RTD_IC10"; -const char *RTD_IC11_STRING = "RTD_IC11"; -const char *RTD_IC12_STRING = "RTD_IC12"; -const char *RTD_IC13_STRING = "RTD_IC13"; -const char *RTD_IC14_STRING = "RTD_IC14"; -const char *RTD_IC15_STRING = "RTD_IC15"; -const char *RTD_IC16_STRING = "RTD_IC16"; -const char *RTD_IC17_STRING = "RTD_IC17"; -const char *RTD_IC18_STRING = "RTD_IC18"; +const char *RTD_IC_0_STRING = "RTD_IC_0"; +const char *RTD_IC_1_STRING = "RTD_IC_1"; +const char *RTD_IC_2_STRING = "RTD_IC_2"; +const char *RTD_IC_3_STRING = "RTD_IC_3"; +const char *RTD_IC_4_STRING = "RTD_IC_4"; +const char *RTD_IC_5_STRING = "RTD_IC_5"; +const char *RTD_IC_6_STRING = "RTD_IC_6"; +const char *RTD_IC_7_STRING = "RTD_IC_7"; +const char *RTD_IC_8_STRING = "RTD_IC_8"; +const char *RTD_IC_9_STRING = "RTD_IC_9"; +const char *RTD_IC_10_STRING = "RTD_IC_10"; +const char *RTD_IC_11_STRING = "RTD_IC_11"; +const char *RTD_IC_12_STRING = "RTD_IC_12"; +const char *RTD_IC_13_STRING = "RTD_IC_13"; +const char *RTD_IC_14_STRING = "RTD_IC_14"; +const char *RTD_IC_15_STRING = "RTD_IC_15"; const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER"; const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF"; const char *GPIO_IF_STRING = "GPIO_IF"; @@ -81,6 +81,12 @@ const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR"; const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE"; const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK"; const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER"; +const char *PTME_STRING = "PTME"; +const char *PAPB_VC0_STRING = "PAPB_VC0"; +const char *PAPB_VC1_STRING = "PAPB_VC1"; +const char *PAPB_VC2_STRING = "PAPB_VC2"; +const char *PAPB_VC3_STRING = "PAPB_VC3"; +const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START"; const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION"; @@ -209,37 +215,37 @@ const char* translateObject(object_id_t object) { case 0x44420005: return TMP1075_HANDLER_2_STRING; case 0x44420016: - return RTD_IC3_STRING; + return RTD_IC_0_STRING; case 0x44420017: - return RTD_IC4_STRING; + return RTD_IC_1_STRING; case 0x44420018: - return RTD_IC5_STRING; + return RTD_IC_2_STRING; case 0x44420019: - return RTD_IC6_STRING; + return RTD_IC_3_STRING; case 0x44420020: - return RTD_IC7_STRING; + return RTD_IC_4_STRING; case 0x44420021: - return RTD_IC8_STRING; + return RTD_IC_5_STRING; case 0x44420022: - return RTD_IC9_STRING; + return RTD_IC_6_STRING; case 0x44420023: - return RTD_IC10_STRING; + return RTD_IC_7_STRING; case 0x44420024: - return RTD_IC11_STRING; + return RTD_IC_8_STRING; case 0x44420025: - return RTD_IC12_STRING; + return RTD_IC_9_STRING; case 0x44420026: - return RTD_IC13_STRING; + return RTD_IC_10_STRING; case 0x44420027: - return RTD_IC14_STRING; + return RTD_IC_11_STRING; case 0x44420028: - return RTD_IC15_STRING; + return RTD_IC_12_STRING; case 0x44420029: - return RTD_IC16_STRING; + return RTD_IC_13_STRING; case 0x44420030: - return RTD_IC17_STRING; + return RTD_IC_14_STRING; case 0x44420031: - return RTD_IC18_STRING; + return RTD_IC_15_STRING; case 0x445300A3: return SYRLINKS_HK_HANDLER_STRING; case 0x49000000: @@ -264,6 +270,18 @@ const char* translateObject(object_id_t object) { return TMTC_POLLING_TASK_STRING; case 0x50000500: return FILE_SYSTEM_HANDLER_STRING; + case 0x50000600: + return PTME_STRING; + case 0x50000700: + return PAPB_VC0_STRING; + case 0x50000701: + return PAPB_VC1_STRING; + case 0x50000702: + return PAPB_VC2_STRING; + case 0x50000703: + return PAPB_VC3_STRING; + case 0x50000800: + return CCSDS_HANDLER_STRING; case 0x51000500: return PUS_SERVICE_6_STRING; case 0x53000000: From 30cf0c7aad9315d4b1135eeb33b39c41d1e3a9ca Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 18:34:04 +0200 Subject: [PATCH 10/14] ADIS devices working now --- .../pollingSequenceFactory.cpp | 40 +++++++++---------- tmtc | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 887f0f5c..225fffd8 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -465,16 +465,16 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ); -// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, -// DeviceHandlerIF::PERFORM_OPERATION); -// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, -// DeviceHandlerIF::SEND_WRITE); -// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, -// DeviceHandlerIF::GET_WRITE); -// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.75, -// DeviceHandlerIF::SEND_READ); -// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, -// DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, + DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, + DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.75, + DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, + DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); @@ -512,16 +512,16 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ); -// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, -// DeviceHandlerIF::PERFORM_OPERATION); -// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.3, -// DeviceHandlerIF::SEND_WRITE); -// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6, -// DeviceHandlerIF::GET_WRITE); -// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.75, -// DeviceHandlerIF::SEND_READ); -// thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.85, -// DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, + DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.3, + DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6, + DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.75, + DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.85, + DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); diff --git a/tmtc b/tmtc index 423f1fbb..5976e657 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 423f1fbb2c9f93f6eb3f3ae8ecbbdbfa30002596 +Subproject commit 5976e657353661587d26b1312d5fe099b7011273 From ccb3a236023eedf0b21020ecf60bc77e77eec016 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Oct 2021 13:20:03 +0200 Subject: [PATCH 11/14] tmtc update --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 5976e657..b2cc2354 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5976e657353661587d26b1312d5fe099b7011273 +Subproject commit b2cc2354d410b0bc0d80c481bfd37afc580e63cf From 0237a22ae99cbceae838c6b6b30b360c3b285b0f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Oct 2021 15:42:55 +0200 Subject: [PATCH 12/14] using old names again --- bsp_hosted/fsfwconfig/devices/gpioIds.h | 8 +-- bsp_q7s/core/ObjectFactory.cpp | 96 ++++++++++++------------- bsp_q7s/gpio/gpioCallbacks.cpp | 60 ++++++++-------- common/config/commonObjects.h | 32 ++++----- linux/fsfwconfig/devices/addresses.h | 6 +- linux/fsfwconfig/devices/gpioIds.h | 6 +- 6 files changed, 104 insertions(+), 104 deletions(-) diff --git a/bsp_hosted/fsfwconfig/devices/gpioIds.h b/bsp_hosted/fsfwconfig/devices/gpioIds.h index 53a53677..1ab55d08 100644 --- a/bsp_hosted/fsfwconfig/devices/gpioIds.h +++ b/bsp_hosted/fsfwconfig/devices/gpioIds.h @@ -27,10 +27,7 @@ namespace gpioIds { TEST_ID_0, TEST_ID_1, - RTD_IC_0, - RTD_IC_1, - RTD_IC_2, - RTD_IC_3, + RTD_IC_3, RTD_IC_4, RTD_IC_5, RTD_IC_6, @@ -43,6 +40,9 @@ namespace gpioIds { RTD_IC_13, RTD_IC_14, RTD_IC_15, + RTD_IC_16, + RTD_IC_17, + RTD_IC_18, SPI_MUX_BIT_1, SPI_MUX_BIT_2, diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index c6062926..66357373 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -643,128 +643,128 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) { GpioCallback* gpioRtdIc0 = new GpioCallback("Chip select RTD IC0", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_0, gpioRtdIc0); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc0); GpioCallback* gpioRtdIc1 = new GpioCallback("Chip select RTD IC1", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_1, gpioRtdIc1); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc1); GpioCallback* gpioRtdIc2 = new GpioCallback("Chip select RTD IC2", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_2, gpioRtdIc2); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc2); GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc3); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc3); GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc4); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc4); GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc5); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc5); GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc6); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc6); GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc7); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc7); GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc8); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc8); GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc9); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc9); GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc10); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc10); GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc11); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc11); GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc12); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc12); GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc13); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_16, gpioRtdIc13); GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc14); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_17, gpioRtdIc14); GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc15); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_18, gpioRtdIc15); gpioComIF->addGpios(rtdGpioCookie); - SpiCookie* spiRtdIc0 = new SpiCookie(addresses::RTD_IC_0, gpioIds::RTD_IC_0, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc0 = new SpiCookie(addresses::RTD_IC_3, gpioIds::RTD_IC_3, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc1 = new SpiCookie(addresses::RTD_IC_1, gpioIds::RTD_IC_1, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc1 = new SpiCookie(addresses::RTD_IC_4, gpioIds::RTD_IC_4, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc2 = new SpiCookie(addresses::RTD_IC_2, gpioIds::RTD_IC_2, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc2 = new SpiCookie(addresses::RTD_IC_5, gpioIds::RTD_IC_5, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC_3, gpioIds::RTD_IC_3, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC_6, gpioIds::RTD_IC_6, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC_4, gpioIds::RTD_IC_4, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC_7, gpioIds::RTD_IC_7, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC_5, gpioIds::RTD_IC_5, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC_8, gpioIds::RTD_IC_8, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC_6, gpioIds::RTD_IC_6, q7s::SPI_DEFAULT_DEV, + SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC_9, gpioIds::RTD_IC_9, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC_7, gpioIds::RTD_IC_7, + SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC_10, gpioIds::RTD_IC_10, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC_8, gpioIds::RTD_IC_8, + SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC_11, gpioIds::RTD_IC_11, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC_9, gpioIds::RTD_IC_9, + SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC_12, gpioIds::RTD_IC_12, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC_10, gpioIds::RTD_IC_10, + SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC_13, gpioIds::RTD_IC_13, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC_11, gpioIds::RTD_IC_11, + SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC_14, gpioIds::RTD_IC_14, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC_12, gpioIds::RTD_IC_12, + SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC_15, gpioIds::RTD_IC_15, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC_13, gpioIds::RTD_IC_13, + SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC_16, gpioIds::RTD_IC_16, std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC_14, gpioIds::RTD_IC_14, + SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC_17, gpioIds::RTD_IC_17, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC_15, gpioIds::RTD_IC_15, + SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC_18, gpioIds::RTD_IC_18, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); - Max31865PT1000Handler* rtdIc0 = new Max31865PT1000Handler(objects::RTD_IC_0, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc0 = new Max31865PT1000Handler(objects::RTD_IC_6, objects::SPI_COM_IF, spiRtdIc0); - Max31865PT1000Handler* rtdIc1 = new Max31865PT1000Handler(objects::RTD_IC_1, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc1 = new Max31865PT1000Handler(objects::RTD_IC_4, objects::SPI_COM_IF, spiRtdIc1); - Max31865PT1000Handler* rtdIc2 = new Max31865PT1000Handler(objects::RTD_IC_2, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc2 = new Max31865PT1000Handler(objects::RTD_IC_5, objects::SPI_COM_IF, spiRtdIc2); - Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC_3, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC_6, objects::SPI_COM_IF, spiRtdIc3); - Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC_4, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC_7, objects::SPI_COM_IF, spiRtdIc4); - Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC_5, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC_8, objects::SPI_COM_IF, spiRtdIc5); - Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC_6, objects::SPI_COM_IF, + Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC_9, objects::SPI_COM_IF, spiRtdIc6); - Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC_7, + Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC_10, objects::SPI_COM_IF, spiRtdIc7); - Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC_8, + Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC_11, objects::SPI_COM_IF, spiRtdIc8); - Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC_9, + Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC_12, objects::SPI_COM_IF, spiRtdIc9); - Max31865PT1000Handler* rtdIc10 = new Max31865PT1000Handler(objects::RTD_IC_10, + Max31865PT1000Handler* rtdIc10 = new Max31865PT1000Handler(objects::RTD_IC_13, objects::SPI_COM_IF, spiRtdIc10); - Max31865PT1000Handler* rtdIc11 = new Max31865PT1000Handler(objects::RTD_IC_11, + Max31865PT1000Handler* rtdIc11 = new Max31865PT1000Handler(objects::RTD_IC_14, objects::SPI_COM_IF, spiRtdIc11); - Max31865PT1000Handler* rtdIc12 = new Max31865PT1000Handler(objects::RTD_IC_12, + Max31865PT1000Handler* rtdIc12 = new Max31865PT1000Handler(objects::RTD_IC_15, objects::SPI_COM_IF, spiRtdIc12); - Max31865PT1000Handler* rtdIc13 = new Max31865PT1000Handler(objects::RTD_IC_13, + Max31865PT1000Handler* rtdIc13 = new Max31865PT1000Handler(objects::RTD_IC_16, objects::SPI_COM_IF, spiRtdIc13); - Max31865PT1000Handler* rtdIc14 = new Max31865PT1000Handler(objects::RTD_IC_14, + Max31865PT1000Handler* rtdIc14 = new Max31865PT1000Handler(objects::RTD_IC_17, objects::SPI_COM_IF, spiRtdIc14); - Max31865PT1000Handler* rtdIc15 = new Max31865PT1000Handler(objects::RTD_IC_15, + Max31865PT1000Handler* rtdIc15 = new Max31865PT1000Handler(objects::RTD_IC_18, objects::SPI_COM_IF, spiRtdIc15); rtdIc0->setStartUpImmediately(); diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index 27ae18d0..b1eefac7 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -72,82 +72,82 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Lev } else if (value == gpio::LOW) { switch (gpioId) { - case(gpioIds::RTD_IC_0): { - enableDecoderTcsIc1(); - selectY7(); - break; - } - case(gpioIds::RTD_IC_1): { - enableDecoderTcsIc1(); - selectY6(); - break; - } - case(gpioIds::RTD_IC_2): { - enableDecoderTcsIc1(); - selectY5(); - break; - } case(gpioIds::RTD_IC_3): { enableDecoderTcsIc1(); - selectY4(); + selectY7(); break; } case(gpioIds::RTD_IC_4): { enableDecoderTcsIc1(); - selectY3(); + selectY6(); break; } case(gpioIds::RTD_IC_5): { enableDecoderTcsIc1(); - selectY2(); + selectY5(); break; } case(gpioIds::RTD_IC_6): { enableDecoderTcsIc1(); - selectY1(); + selectY4(); break; } case(gpioIds::RTD_IC_7): { enableDecoderTcsIc1(); - selectY0(); + selectY3(); break; } case(gpioIds::RTD_IC_8): { - enableDecoderTcsIc2(); - selectY7(); + enableDecoderTcsIc1(); + selectY2(); break; } case(gpioIds::RTD_IC_9): { - enableDecoderTcsIc2(); - selectY6(); + enableDecoderTcsIc1(); + selectY1(); break; } case(gpioIds::RTD_IC_10): { - enableDecoderTcsIc2(); - selectY5(); + enableDecoderTcsIc1(); + selectY0(); break; } case(gpioIds::RTD_IC_11): { enableDecoderTcsIc2(); - selectY4(); + selectY7(); break; } case(gpioIds::RTD_IC_12): { enableDecoderTcsIc2(); - selectY3(); + selectY6(); break; } case(gpioIds::RTD_IC_13): { enableDecoderTcsIc2(); - selectY2(); + selectY5(); break; } case(gpioIds::RTD_IC_14): { enableDecoderTcsIc2(); - selectY1(); + selectY4(); break; } case(gpioIds::RTD_IC_15): { + enableDecoderTcsIc2(); + selectY3(); + break; + } + case(gpioIds::RTD_IC_16): { + enableDecoderTcsIc2(); + selectY2(); + break; + } + case(gpioIds::RTD_IC_17): { + enableDecoderTcsIc2(); + selectY1(); + break; + } + case(gpioIds::RTD_IC_18): { enableDecoderTcsIc2(); selectY0(); break; diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index 9e4418d2..dc18995e 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -47,22 +47,22 @@ enum commonObjects: uint32_t { * Not yet specified which pt1000 will measure which device/location in the satellite. * Therefore object ids are named according to the IC naming of the RTDs in the schematic. */ - RTD_IC_0 = 0x44420016, - RTD_IC_1 = 0x44420017, - RTD_IC_2 = 0x44420018, - RTD_IC_3 = 0x44420019, - RTD_IC_4 = 0x44420020, - RTD_IC_5 = 0x44420021, - RTD_IC_6 = 0x44420022, - RTD_IC_7 = 0x44420023, - RTD_IC_8 = 0x44420024, - RTD_IC_9 = 0x44420025, - RTD_IC_10 = 0x44420026, - RTD_IC_11 = 0x44420027, - RTD_IC_12 = 0x44420028, - RTD_IC_13 = 0x44420029, - RTD_IC_14 = 0x44420030, - RTD_IC_15 = 0x44420031, + RTD_IC_3 = 0x44420016, + RTD_IC_4 = 0x44420017, + RTD_IC_5 = 0x44420018, + RTD_IC_6 = 0x44420019, + RTD_IC_7 = 0x44420020, + RTD_IC_8 = 0x44420021, + RTD_IC_9 = 0x44420022, + RTD_IC_10 = 0x44420023, + RTD_IC_11 = 0x44420024, + RTD_IC_12 = 0x44420025, + RTD_IC_13 = 0x44420026, + RTD_IC_14 = 0x44420027, + RTD_IC_15 = 0x44420028, + RTD_IC_16 = 0x44420029, + RTD_IC_17 = 0x44420030, + RTD_IC_18 = 0x44420031, SUS_1 = 0x44120032, SUS_2 = 0x44120033, diff --git a/linux/fsfwconfig/devices/addresses.h b/linux/fsfwconfig/devices/addresses.h index 945c2eb7..94f22c54 100644 --- a/linux/fsfwconfig/devices/addresses.h +++ b/linux/fsfwconfig/devices/addresses.h @@ -49,9 +49,6 @@ namespace addresses { }; enum spiAddresses: address_t { - RTD_IC_0, - RTD_IC_1, - RTD_IC_2, RTD_IC_3, RTD_IC_4, RTD_IC_5, @@ -65,6 +62,9 @@ namespace addresses { RTD_IC_13, RTD_IC_14, RTD_IC_15, + RTD_IC_16, + RTD_IC_17, + RTD_IC_18, RW1, RW2, RW3, diff --git a/linux/fsfwconfig/devices/gpioIds.h b/linux/fsfwconfig/devices/gpioIds.h index 62913d5a..ebe8a3eb 100644 --- a/linux/fsfwconfig/devices/gpioIds.h +++ b/linux/fsfwconfig/devices/gpioIds.h @@ -34,9 +34,6 @@ enum gpioId_t { TEST_ID_0, TEST_ID_1, - RTD_IC_0, - RTD_IC_1, - RTD_IC_2, RTD_IC_3, RTD_IC_4, RTD_IC_5, @@ -50,6 +47,9 @@ enum gpioId_t { RTD_IC_13, RTD_IC_14, RTD_IC_15, + RTD_IC_16, + RTD_IC_17, + RTD_IC_18, CS_SUS_1, CS_SUS_2, From c56fc09da70c1483ea7d609206348a6d8a2964f1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Oct 2021 15:52:22 +0200 Subject: [PATCH 13/14] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 0dedd8f2..eba2f87b 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 0dedd8f2a18b619f4b5003e701e7bb40c0ac4d61 +Subproject commit eba2f87b36429fc814f9d4768c68fd2827f4c410 From dac30684379935edef64b8638d01e57eb0a43a19 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Oct 2021 15:54:30 +0200 Subject: [PATCH 14/14] updated object translations --- generators/bsp_q7s_objects.csv | 32 +++++++------- generators/objects/translateObjects.cpp | 44 +++++++++---------- linux/fsfwconfig/objects/translateObjects.cpp | 44 +++++++++---------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/generators/bsp_q7s_objects.csv b/generators/bsp_q7s_objects.csv index 24035373..3d8a4d40 100644 --- a/generators/bsp_q7s_objects.csv +++ b/generators/bsp_q7s_objects.csv @@ -45,22 +45,22 @@ 0x444100A4;HEATER_HANDLER 0x44420004;TMP1075_HANDLER_1 0x44420005;TMP1075_HANDLER_2 -0x44420016;RTD_IC_0 -0x44420017;RTD_IC_1 -0x44420018;RTD_IC_2 -0x44420019;RTD_IC_3 -0x44420020;RTD_IC_4 -0x44420021;RTD_IC_5 -0x44420022;RTD_IC_6 -0x44420023;RTD_IC_7 -0x44420024;RTD_IC_8 -0x44420025;RTD_IC_9 -0x44420026;RTD_IC_10 -0x44420027;RTD_IC_11 -0x44420028;RTD_IC_12 -0x44420029;RTD_IC_13 -0x44420030;RTD_IC_14 -0x44420031;RTD_IC_15 +0x44420016;RTD_IC_3 +0x44420017;RTD_IC_4 +0x44420018;RTD_IC_5 +0x44420019;RTD_IC_6 +0x44420020;RTD_IC_7 +0x44420021;RTD_IC_8 +0x44420022;RTD_IC_9 +0x44420023;RTD_IC_10 +0x44420024;RTD_IC_11 +0x44420025;RTD_IC_12 +0x44420026;RTD_IC_13 +0x44420027;RTD_IC_14 +0x44420028;RTD_IC_15 +0x44420029;RTD_IC_16 +0x44420030;RTD_IC_17 +0x44420031;RTD_IC_18 0x445300A3;SYRLINKS_HK_HANDLER 0x49000000;ARDUINO_COM_IF 0x49010005;GPIO_IF diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 4b256595..15f82c2c 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 111 translations. - * Generated on: 2021-10-12 18:02:43 + * Generated on: 2021-10-13 15:54:21 */ #include "translateObjects.h" @@ -53,9 +53,6 @@ const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER"; const char *HEATER_HANDLER_STRING = "HEATER_HANDLER"; const char *TMP1075_HANDLER_1_STRING = "TMP1075_HANDLER_1"; const char *TMP1075_HANDLER_2_STRING = "TMP1075_HANDLER_2"; -const char *RTD_IC_0_STRING = "RTD_IC_0"; -const char *RTD_IC_1_STRING = "RTD_IC_1"; -const char *RTD_IC_2_STRING = "RTD_IC_2"; const char *RTD_IC_3_STRING = "RTD_IC_3"; const char *RTD_IC_4_STRING = "RTD_IC_4"; const char *RTD_IC_5_STRING = "RTD_IC_5"; @@ -69,6 +66,9 @@ const char *RTD_IC_12_STRING = "RTD_IC_12"; const char *RTD_IC_13_STRING = "RTD_IC_13"; const char *RTD_IC_14_STRING = "RTD_IC_14"; const char *RTD_IC_15_STRING = "RTD_IC_15"; +const char *RTD_IC_16_STRING = "RTD_IC_16"; +const char *RTD_IC_17_STRING = "RTD_IC_17"; +const char *RTD_IC_18_STRING = "RTD_IC_18"; const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER"; const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF"; const char *GPIO_IF_STRING = "GPIO_IF"; @@ -215,37 +215,37 @@ const char* translateObject(object_id_t object) { case 0x44420005: return TMP1075_HANDLER_2_STRING; case 0x44420016: - return RTD_IC_0_STRING; - case 0x44420017: - return RTD_IC_1_STRING; - case 0x44420018: - return RTD_IC_2_STRING; - case 0x44420019: return RTD_IC_3_STRING; - case 0x44420020: + case 0x44420017: return RTD_IC_4_STRING; - case 0x44420021: + case 0x44420018: return RTD_IC_5_STRING; - case 0x44420022: + case 0x44420019: return RTD_IC_6_STRING; - case 0x44420023: + case 0x44420020: return RTD_IC_7_STRING; - case 0x44420024: + case 0x44420021: return RTD_IC_8_STRING; - case 0x44420025: + case 0x44420022: return RTD_IC_9_STRING; - case 0x44420026: + case 0x44420023: return RTD_IC_10_STRING; - case 0x44420027: + case 0x44420024: return RTD_IC_11_STRING; - case 0x44420028: + case 0x44420025: return RTD_IC_12_STRING; - case 0x44420029: + case 0x44420026: return RTD_IC_13_STRING; - case 0x44420030: + case 0x44420027: return RTD_IC_14_STRING; - case 0x44420031: + case 0x44420028: return RTD_IC_15_STRING; + case 0x44420029: + return RTD_IC_16_STRING; + case 0x44420030: + return RTD_IC_17_STRING; + case 0x44420031: + return RTD_IC_18_STRING; case 0x445300A3: return SYRLINKS_HK_HANDLER_STRING; case 0x49000000: diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 4b256595..15f82c2c 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 111 translations. - * Generated on: 2021-10-12 18:02:43 + * Generated on: 2021-10-13 15:54:21 */ #include "translateObjects.h" @@ -53,9 +53,6 @@ const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER"; const char *HEATER_HANDLER_STRING = "HEATER_HANDLER"; const char *TMP1075_HANDLER_1_STRING = "TMP1075_HANDLER_1"; const char *TMP1075_HANDLER_2_STRING = "TMP1075_HANDLER_2"; -const char *RTD_IC_0_STRING = "RTD_IC_0"; -const char *RTD_IC_1_STRING = "RTD_IC_1"; -const char *RTD_IC_2_STRING = "RTD_IC_2"; const char *RTD_IC_3_STRING = "RTD_IC_3"; const char *RTD_IC_4_STRING = "RTD_IC_4"; const char *RTD_IC_5_STRING = "RTD_IC_5"; @@ -69,6 +66,9 @@ const char *RTD_IC_12_STRING = "RTD_IC_12"; const char *RTD_IC_13_STRING = "RTD_IC_13"; const char *RTD_IC_14_STRING = "RTD_IC_14"; const char *RTD_IC_15_STRING = "RTD_IC_15"; +const char *RTD_IC_16_STRING = "RTD_IC_16"; +const char *RTD_IC_17_STRING = "RTD_IC_17"; +const char *RTD_IC_18_STRING = "RTD_IC_18"; const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER"; const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF"; const char *GPIO_IF_STRING = "GPIO_IF"; @@ -215,37 +215,37 @@ const char* translateObject(object_id_t object) { case 0x44420005: return TMP1075_HANDLER_2_STRING; case 0x44420016: - return RTD_IC_0_STRING; - case 0x44420017: - return RTD_IC_1_STRING; - case 0x44420018: - return RTD_IC_2_STRING; - case 0x44420019: return RTD_IC_3_STRING; - case 0x44420020: + case 0x44420017: return RTD_IC_4_STRING; - case 0x44420021: + case 0x44420018: return RTD_IC_5_STRING; - case 0x44420022: + case 0x44420019: return RTD_IC_6_STRING; - case 0x44420023: + case 0x44420020: return RTD_IC_7_STRING; - case 0x44420024: + case 0x44420021: return RTD_IC_8_STRING; - case 0x44420025: + case 0x44420022: return RTD_IC_9_STRING; - case 0x44420026: + case 0x44420023: return RTD_IC_10_STRING; - case 0x44420027: + case 0x44420024: return RTD_IC_11_STRING; - case 0x44420028: + case 0x44420025: return RTD_IC_12_STRING; - case 0x44420029: + case 0x44420026: return RTD_IC_13_STRING; - case 0x44420030: + case 0x44420027: return RTD_IC_14_STRING; - case 0x44420031: + case 0x44420028: return RTD_IC_15_STRING; + case 0x44420029: + return RTD_IC_16_STRING; + case 0x44420030: + return RTD_IC_17_STRING; + case 0x44420031: + return RTD_IC_18_STRING; case 0x445300A3: return SYRLINKS_HK_HANDLER_STRING; case 0x49000000: