From 0466622a16c8eec8478384f895143027e0d9d6ed Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 22 Feb 2023 18:07:15 +0100 Subject: [PATCH 01/15] tweaks for ACS scheduling --- bsp_q7s/core/scheduling.cpp | 2 +- common/config/eive/definitions.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bsp_q7s/core/scheduling.cpp b/bsp_q7s/core/scheduling.cpp index 3c3695dd..db6f3c91 100644 --- a/bsp_q7s/core/scheduling.cpp +++ b/bsp_q7s/core/scheduling.cpp @@ -404,7 +404,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction #ifdef RELEASE_BUILD static constexpr float acsPstPeriod = 0.4; #else - static constexpr float acsPstPeriod = 0.8; + static constexpr float acsPstPeriod = 0.4; #endif FixedTimeslotTaskIF* acsTcsPst = factory.createFixedTimeslotTask( "ACS_TCS_PST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc); diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index c87c89ff..edeb3765 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -62,7 +62,8 @@ static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30; static constexpr uint32_t SCHED_BLOCK_3_READ_IMTQ_MGM_MS = 42; static constexpr uint32_t SCHED_BLOCK_4_ACS_CTRL_MS = 45; static constexpr uint32_t SCHED_BLOCK_5_ACTUATOR_MS = 50; -static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 75; +static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 90; +static constexpr uint32_t SCHED_BLOCK_RTD = 150; static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300; // 15 ms for FM @@ -76,6 +77,7 @@ static constexpr float SCHED_BLOCK_5_PERIOD = static_cast(SCHED_BLOCK_5_A static constexpr float SCHED_BLOCK_6_PERIOD = static_cast(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0; static constexpr float SCHED_BLOCK_7_PERIOD = static_cast(SCHED_BLOCK_7_RW_READ_MS) / 400.0; +static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast(SCHED_BLOCK_RTD) / 400.0; } // namespace acs From 9f83a4969084e483030da420476fca391be73e1b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 11:46:30 +0100 Subject: [PATCH 02/15] remove shadowed member variables --- fsfw | 2 +- mission/system/objects/AcsBoardAssembly.h | 2 -- mission/system/objects/SusAssembly.h | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fsfw b/fsfw index 2efff4d2..bd208038 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 2efff4d2c5ef82b5b62567ab1bb0ee53aeed6a5a +Subproject commit bd208038dd85a94dce8c763397ad5ac7eae76402 diff --git a/mission/system/objects/AcsBoardAssembly.h b/mission/system/objects/AcsBoardAssembly.h index 1fe3336d..0c25396f 100644 --- a/mission/system/objects/AcsBoardAssembly.h +++ b/mission/system/objects/AcsBoardAssembly.h @@ -108,8 +108,6 @@ class AcsBoardAssembly : public DualLaneAssemblyBase { static constexpr pcdu::Switches SWITCH_A = pcdu::Switches::PDU1_CH7_ACS_A_SIDE_3V3; static constexpr pcdu::Switches SWITCH_B = pcdu::Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3; - bool tryingOtherSide = false; - bool dualModeErrorSwitch = true; AcsBoardHelper helper; GpioIF* gpioIF = nullptr; diff --git a/mission/system/objects/SusAssembly.h b/mission/system/objects/SusAssembly.h index 673e91f5..e95803df 100644 --- a/mission/system/objects/SusAssembly.h +++ b/mission/system/objects/SusAssembly.h @@ -50,8 +50,6 @@ class SusAssembly : public DualLaneAssemblyBase { SusAssHelper helper; PowerSwitchIF* pwrSwitcher = nullptr; - bool tryingOtherSide = false; - bool dualModeErrorSwitch = true; ReturnValue_t initialize() override; // AssemblyBase overrides From ba9268aae6facfe45256c00702ba4d29cc763e78 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 11:49:13 +0100 Subject: [PATCH 03/15] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a29477a..7433bb7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ will consitute of a breaking change warranting a new major release: - Usage of floats as iterators and using them to calculate a uint8_t index in `SusConverter` - Removed unused variables in the `AcsController` +- Remove shadowing variables inside ACS assembly classes. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/385 # [v1.30.0] From bd60255220ab958a67fa971bf1329dab5d2b6ac4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 11:57:12 +0100 Subject: [PATCH 04/15] interior structure changes, use new sched block --- CHANGELOG.md | 2 ++ bsp_q7s/core/scheduling.cpp | 2 +- bsp_q7s/core/scheduling.h | 3 +-- fsfw | 2 +- linux/devices/CMakeLists.txt | 5 +++-- linux/fsfwconfig/CMakeLists.txt | 3 +-- mission/controller/acs/Guidance.cpp | 3 +-- mission/controller/acs/MultiplicativeKalmanFilter.cpp | 7 +++---- mission/core/CMakeLists.txt | 3 ++- .../core/pollingSeqTables.cpp | 4 ++-- .../core/pollingSeqTables.h | 0 mission/devices/ImtqHandler.cpp | 2 +- mission/tmtc/CfdpTmFunnel.cpp | 2 +- mission/tmtc/PusTmFunnel.cpp | 2 +- mission/tmtc/VirtualChannel.cpp | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) rename linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp => mission/core/pollingSeqTables.cpp (99%) rename linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h => mission/core/pollingSeqTables.h (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a29477a..2fdfa306 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ will consitute of a breaking change warranting a new major release: - All `targetQuat` functions in `Guidance` now return the target quaternion (target in ECI frame), which is passed on to `CtrlValData`. +- Moved polling sequence table definitions and source code to `mission/core` folder. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/395 ## Added diff --git a/bsp_q7s/core/scheduling.cpp b/bsp_q7s/core/scheduling.cpp index db6f3c91..6dc7fceb 100644 --- a/bsp_q7s/core/scheduling.cpp +++ b/bsp_q7s/core/scheduling.cpp @@ -17,10 +17,10 @@ #include "fsfw/tasks/FixedTimeslotTaskIF.h" #include "fsfw/tasks/PeriodicTaskIF.h" #include "fsfw/tasks/TaskFactory.h" +#include "mission/core/pollingSeqTables.h" #include "mission/core/scheduling.h" #include "mission/devices/devicedefinitions/Max31865Definitions.h" #include "mission/utility/InitMission.h" -#include "pollingsequence/pollingSequenceFactory.h" /* This is configured for linux without CR */ #ifdef PLATFORM_UNIX diff --git a/bsp_q7s/core/scheduling.h b/bsp_q7s/core/scheduling.h index 2241e683..e49ce036 100644 --- a/bsp_q7s/core/scheduling.h +++ b/bsp_q7s/core/scheduling.h @@ -1,11 +1,10 @@ #ifndef BSP_Q7S_INITMISSION_H_ #define BSP_Q7S_INITMISSION_H_ -#include - #include #include "fsfw/tasks/definitions.h" +#include "mission/core/pollingSeqTables.h" using pst::AcsPstCfg; diff --git a/fsfw b/fsfw index 2efff4d2..bd208038 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 2efff4d2c5ef82b5b62567ab1bb0ee53aeed6a5a +Subproject commit bd208038dd85a94dce8c763397ad5ac7eae76402 diff --git a/linux/devices/CMakeLists.txt b/linux/devices/CMakeLists.txt index 17d842ea..22b39840 100644 --- a/linux/devices/CMakeLists.txt +++ b/linux/devices/CMakeLists.txt @@ -3,8 +3,9 @@ if(EIVE_BUILD_GPSD_GPS_HANDLER) endif() target_sources( - ${OBSW_NAME} PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp - ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp) + ${OBSW_NAME} + PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp + ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp) add_subdirectory(ploc) diff --git a/linux/fsfwconfig/CMakeLists.txt b/linux/fsfwconfig/CMakeLists.txt index bfede452..d5b5e7e5 100644 --- a/linux/fsfwconfig/CMakeLists.txt +++ b/linux/fsfwconfig/CMakeLists.txt @@ -1,5 +1,4 @@ -target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp - pollingsequence/pollingSequenceFactory.cpp) +target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp) target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 2346d18f..031cd384 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -111,8 +111,7 @@ void Guidance::targetQuatPtgSingleAxis(timeval now, double posSatE[3], double ve if (sightAngleSun < critSightAngle) { strBlindAvoidFlag = true; } - } - else { + } else { if (sightAngleSun < blindEnd * exclAngle) { double normBlindRefRate = acsParameters.targetModeControllerParameters.blindRotRate; double blindRefRate[3] = {0, 0, 0}; diff --git a/mission/controller/acs/MultiplicativeKalmanFilter.cpp b/mission/controller/acs/MultiplicativeKalmanFilter.cpp index d90f3f51..5bae4624 100644 --- a/mission/controller/acs/MultiplicativeKalmanFilter.cpp +++ b/mission/controller/acs/MultiplicativeKalmanFilter.cpp @@ -1098,7 +1098,7 @@ void MultiplicativeKalmanFilter::reset(acsctrl::MekfData *mekfData) { } void MultiplicativeKalmanFilter::updateDataSetWithoutData(acsctrl::MekfData *mekfData, - MekfStatus mekfStatus) { + MekfStatus mekfStatus) { { PoolReadGuard pg(mekfData); if (pg.getReadResult() == returnvalue::OK) { @@ -1114,9 +1114,8 @@ void MultiplicativeKalmanFilter::updateDataSetWithoutData(acsctrl::MekfData *mek } } -void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData, - MekfStatus mekfStatus, double quat[4], - double satRotRate[3]) { +void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData, MekfStatus mekfStatus, + double quat[4], double satRotRate[3]) { { PoolReadGuard pg(mekfData); if (pg.getReadResult() == returnvalue::OK) { diff --git a/mission/core/CMakeLists.txt b/mission/core/CMakeLists.txt index fc6e1cff..ce731219 100644 --- a/mission/core/CMakeLists.txt +++ b/mission/core/CMakeLists.txt @@ -1 +1,2 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp) +target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp + pollingSeqTables.cpp) diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/mission/core/pollingSeqTables.cpp similarity index 99% rename from linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp rename to mission/core/pollingSeqTables.cpp index 1f3e65de..0b134d87 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/mission/core/pollingSeqTables.cpp @@ -1,4 +1,4 @@ -#include "pollingSequenceFactory.h" +#include "pollingSeqTables.h" #include #include @@ -659,7 +659,7 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg DeviceHandlerIF::GET_READ); } - thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * 0.5, 0); + thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * config::acs::SCHED_BLOCK_RTD_PERIOD, 0); return returnvalue::OK; } diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h b/mission/core/pollingSeqTables.h similarity index 100% rename from linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h rename to mission/core/pollingSeqTables.h diff --git a/mission/devices/ImtqHandler.cpp b/mission/devices/ImtqHandler.cpp index 18c002c4..aa935ce5 100644 --- a/mission/devices/ImtqHandler.cpp +++ b/mission/devices/ImtqHandler.cpp @@ -256,7 +256,7 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi ReturnValue_t ImtqHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { ReturnValue_t result; ReturnValue_t status = returnvalue::OK; - if(getMode() != MODE_NORMAL) { + if (getMode() != MODE_NORMAL) { // Ignore replies during transitions. return returnvalue::OK; } diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index 779e9aa8..32dba7fe 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -21,7 +21,7 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) { break; } count++; - if(count == 500) { + if (count == 500) { sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl; break; } diff --git a/mission/tmtc/PusTmFunnel.cpp b/mission/tmtc/PusTmFunnel.cpp index e239afc9..974cdca0 100644 --- a/mission/tmtc/PusTmFunnel.cpp +++ b/mission/tmtc/PusTmFunnel.cpp @@ -21,7 +21,7 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) { break; } count++; - if(count == 500) { + if (count == 500) { sif::error << "PusTmFunnel: Possible message storm detected" << std::endl; break; } diff --git a/mission/tmtc/VirtualChannel.cpp b/mission/tmtc/VirtualChannel.cpp index 64c7b006..6a24cc09 100644 --- a/mission/tmtc/VirtualChannel.cpp +++ b/mission/tmtc/VirtualChannel.cpp @@ -50,7 +50,7 @@ ReturnValue_t VirtualChannel::performOperation() { } count++; - if(count == 500) { + if (count == 500) { sif::error << "VirtualChannel: Possible message storm detected" << std::endl; break; } From 89f6314a183b87bf421d2698ec0704606688de18 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 15:32:40 +0100 Subject: [PATCH 05/15] prep v1.31.0 --- CHANGELOG.md | 4 +++- CMakeLists.txt | 2 +- tmtc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb5ea9d0..32b638d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,9 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -eive-tmtc: v2.15.1 +# [v1.31.0] + +eive-tmtc: v2.15.2 ## Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index 44dce9b9..1c698dfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) -set(OBSW_VERSION_MINOR 30) +set(OBSW_VERSION_MINOR 31) set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) diff --git a/tmtc b/tmtc index a04bd8aa..0bb1f575 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit a04bd8aa738ca14cb3d5badffd00e91047730d5e +Subproject commit 0bb1f57599bfa0120e527fb24ffddae425ef1910 From 91af3ac497b520932aa9adb71c937c4fbbbcc5d2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 15:40:06 +0100 Subject: [PATCH 06/15] skip private retval --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 2 +- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_returnvalues.csv | 1 - generators/bsp_q7s_returnvalues.csv | 1 - generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- mission/system/objects/Stack5VHandler.h | 1 + tmtc | 2 +- 10 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 5e660026..e35a31ef 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 260 translations. * @details - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 3d4c4d42..63e56ef2 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 148 translations. - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 2b045d89..4c6d37e8 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -2,7 +2,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h 0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h 0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h -0x6300;NVMB_Busy;No description;0;NVM_PARAM_BASE;mission/system/objects/Stack5VHandler.h 0x5100;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h 0x5101;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h 0x5102;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 449307cd..6f215a94 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -2,7 +2,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h 0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h 0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h -0x6300;NVMB_Busy;No description;0;NVM_PARAM_BASE;mission/system/objects/Stack5VHandler.h 0x5100;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h 0x5101;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h 0x5102;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 5e660026..e35a31ef 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 260 translations. * @details - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 68273aa5..70bcf3ad 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 153 translations. - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 5e660026..e35a31ef 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 260 translations. * @details - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 68273aa5..70bcf3ad 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 153 translations. - * Generated on: 2023-02-23 15:20:41 + * Generated on: 2023-02-23 15:39:20 */ #include "translateObjects.h" diff --git a/mission/system/objects/Stack5VHandler.h b/mission/system/objects/Stack5VHandler.h index 7ade81e5..46fc963a 100644 --- a/mission/system/objects/Stack5VHandler.h +++ b/mission/system/objects/Stack5VHandler.h @@ -10,6 +10,7 @@ enum class HandlerState { SWITCH_PENDING, IDLE }; class Stack5VHandler { public: + //! [EXPORT] : [SKIP] static constexpr ReturnValue_t BUSY = returnvalue::makeCode(1, 0); Stack5VHandler(PowerSwitchIF& switcher); diff --git a/tmtc b/tmtc index 0bb1f575..75a8712f 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 0bb1f57599bfa0120e527fb24ffddae425ef1910 +Subproject commit 75a8712f9124ca1ea51f12aed4d66f6946d8231c From 152a9b2dce8953144d897dbf592fc4eb0a9645de Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 15:46:53 +0100 Subject: [PATCH 07/15] bump eive-tmtc again --- CHANGELOG.md | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b638d0..210e8bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: # [v1.31.0] -eive-tmtc: v2.15.2 +eive-tmtc: v2.16.0 ## Fixed diff --git a/tmtc b/tmtc index 75a8712f..24f0d8e1 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 75a8712f9124ca1ea51f12aed4d66f6946d8231c +Subproject commit 24f0d8e1a6a8ea1323623932e699326214c78159 From 59b80807baa3f2236399744361c48f24136510d6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 18:34:28 +0100 Subject: [PATCH 08/15] possible fix but not sure --- mission/controller/AcsController.cpp | 30 +++++++++++++-------------- mission/controller/AcsController.h | 12 ++++++----- mission/system/objects/ComSubsystem.h | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 81e5b1ca..7643edaa 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -432,14 +432,15 @@ ReturnValue_t AcsController::commandActuators(int16_t xDipole, int16_t yDipole, return returnvalue::OK; } -void AcsController::updateActuatorCmdData(int16_t mtqTargetDipole[3]) { +void AcsController::updateActuatorCmdData(const int16_t *mtqTargetDipole) { double rwTargetTorque[4] = {0.0, 0.0, 0.0, 0.0}; int32_t rwTargetSpeed[4] = {0, 0, 0, 0}; updateActuatorCmdData(rwTargetTorque, rwTargetSpeed, mtqTargetDipole); } -void AcsController::updateActuatorCmdData(double rwTargetTorque[4], int32_t rwTargetSpeed[4], - int16_t mtqTargetDipole[3]) { +void AcsController::updateActuatorCmdData(const double *rwTargetTorque, + const int32_t *rwTargetSpeed, + const int16_t *mtqTargetDipole) { { PoolReadGuard pg(&actuatorCmdData); if (pg.getReadResult() == returnvalue::OK) { @@ -452,22 +453,19 @@ void AcsController::updateActuatorCmdData(double rwTargetTorque[4], int32_t rwTa } void AcsController::updateCtrlValData(double errAng) { - double unitQuat[4] = {0, 0, 0, 1}; - { - PoolReadGuard pg(&ctrlValData); - if (pg.getReadResult() == returnvalue::OK) { - std::memcpy(ctrlValData.tgtQuat.value, unitQuat, 4 * sizeof(double)); - ctrlValData.tgtQuat.setValid(false); - std::memcpy(ctrlValData.errQuat.value, unitQuat, 4 * sizeof(double)); - ctrlValData.errQuat.setValid(false); - ctrlValData.errAng.value = errAng; - ctrlValData.errAng.setValid(true); - ctrlValData.setValidity(true, false); - } + PoolReadGuard pg(&ctrlValData); + if (pg.getReadResult() == returnvalue::OK) { + std::memcpy(ctrlValData.tgtQuat.value, UNIT_QUAT, 4 * sizeof(double)); + ctrlValData.tgtQuat.setValid(false); + std::memcpy(ctrlValData.errQuat.value, UNIT_QUAT, 4 * sizeof(double)); + ctrlValData.errQuat.setValid(false); + ctrlValData.errAng.value = errAng; + ctrlValData.errAng.setValid(true); + ctrlValData.setValidity(true, false); } } -void AcsController::updateCtrlValData(double tgtQuat[4], double errQuat[4], double errAng) { +void AcsController::updateCtrlValData(const double *tgtQuat, const double *errQuat, double errAng) { { PoolReadGuard pg(&ctrlValData); if (pg.getReadResult() == returnvalue::OK) { diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index a36f99ee..eaf80a23 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -40,6 +40,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes void performPointingCtrl(); private: + static constexpr double UNIT_QUAT[4] = {0, 0, 0, 1}; + AcsParameters acsParameters; SensorProcessing sensorProcessing; Navigation navigation; @@ -84,11 +86,11 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes ReturnValue_t commandActuators(int16_t xDipole, int16_t yDipole, int16_t zDipole, uint16_t dipoleTorqueDuration, int32_t rw1Speed, int32_t rw2Speed, int32_t rw3Speed, int32_t rw4Speed, uint16_t rampTime); - void updateActuatorCmdData(int16_t mtqTargetDipole[3]); - void updateActuatorCmdData(double rwTargetTorque[4], int32_t rwTargetSpeed[4], - int16_t mtqTargetDipole[3]); + void updateActuatorCmdData(const int16_t* mtqTargetDipole); + void updateActuatorCmdData(const double* rwTargetTorque, const int32_t* rwTargetSpeed, + const int16_t* mtqTargetDipole); void updateCtrlValData(double errAng); - void updateCtrlValData(double tgtQuat[4], double errQuat[4], double errAng); + void updateCtrlValData(const double* tgtQuat, const double* errQuat, double errAng); void disableCtrlValData(); /* ACS Sensor Values */ @@ -187,7 +189,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes PoolEntry tgtQuat = PoolEntry(4); PoolEntry errQuat = PoolEntry(4); PoolEntry errAng = PoolEntry(); - PoolEntry tgtRotRate = PoolEntry(4); + PoolEntry tgtRotRate = PoolEntry(3); // Actuator CMD acsctrl::ActuatorCmdData actuatorCmdData; diff --git a/mission/system/objects/ComSubsystem.h b/mission/system/objects/ComSubsystem.h index 50f34b0d..ca09a434 100644 --- a/mission/system/objects/ComSubsystem.h +++ b/mission/system/objects/ComSubsystem.h @@ -17,8 +17,8 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF { * @param maxNumberOfSequences * @param maxNumberOfTables * @param transmitterTimeout Maximum time the transmitter of the syrlinks - * will be - * enabled + * will + * be enabled */ ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables, uint32_t transmitterTimeout); From 0907e8f5e520fdff70af0868fa6b3b12b4f5d2ae Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 18:39:14 +0100 Subject: [PATCH 09/15] use more constants --- mission/controller/AcsController.cpp | 48 +++++++++++----------------- mission/controller/AcsController.h | 2 ++ 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 7643edaa..6b821a08 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -433,22 +433,18 @@ ReturnValue_t AcsController::commandActuators(int16_t xDipole, int16_t yDipole, } void AcsController::updateActuatorCmdData(const int16_t *mtqTargetDipole) { - double rwTargetTorque[4] = {0.0, 0.0, 0.0, 0.0}; - int32_t rwTargetSpeed[4] = {0, 0, 0, 0}; - updateActuatorCmdData(rwTargetTorque, rwTargetSpeed, mtqTargetDipole); + updateActuatorCmdData(RW_OFF_TORQUE, RW_OFF_SPEED, mtqTargetDipole); } void AcsController::updateActuatorCmdData(const double *rwTargetTorque, const int32_t *rwTargetSpeed, const int16_t *mtqTargetDipole) { - { - PoolReadGuard pg(&actuatorCmdData); - if (pg.getReadResult() == returnvalue::OK) { - std::memcpy(actuatorCmdData.rwTargetTorque.value, rwTargetTorque, 4 * sizeof(double)); - std::memcpy(actuatorCmdData.rwTargetSpeed.value, rwTargetSpeed, 4 * sizeof(int32_t)); - std::memcpy(actuatorCmdData.mtqTargetDipole.value, mtqTargetDipole, 3 * sizeof(int16_t)); - actuatorCmdData.setValidity(true, true); - } + PoolReadGuard pg(&actuatorCmdData); + if (pg.getReadResult() == returnvalue::OK) { + std::memcpy(actuatorCmdData.rwTargetTorque.value, rwTargetTorque, 4 * sizeof(double)); + std::memcpy(actuatorCmdData.rwTargetSpeed.value, rwTargetSpeed, 4 * sizeof(int32_t)); + std::memcpy(actuatorCmdData.mtqTargetDipole.value, mtqTargetDipole, 3 * sizeof(int16_t)); + actuatorCmdData.setValidity(true, true); } } @@ -466,28 +462,22 @@ void AcsController::updateCtrlValData(double errAng) { } void AcsController::updateCtrlValData(const double *tgtQuat, const double *errQuat, double errAng) { - { - PoolReadGuard pg(&ctrlValData); - if (pg.getReadResult() == returnvalue::OK) { - std::memcpy(ctrlValData.tgtQuat.value, tgtQuat, 4 * sizeof(double)); - std::memcpy(ctrlValData.errQuat.value, errQuat, 4 * sizeof(double)); - ctrlValData.errAng.value = errAng; - ctrlValData.setValidity(true, true); - } + PoolReadGuard pg(&ctrlValData); + if (pg.getReadResult() == returnvalue::OK) { + std::memcpy(ctrlValData.tgtQuat.value, tgtQuat, 4 * sizeof(double)); + std::memcpy(ctrlValData.errQuat.value, errQuat, 4 * sizeof(double)); + ctrlValData.errAng.value = errAng; + ctrlValData.setValidity(true, true); } } void AcsController::disableCtrlValData() { - double unitQuat[4] = {0, 0, 0, 1}; - double errAng = 0; - { - PoolReadGuard pg(&ctrlValData); - if (pg.getReadResult() == returnvalue::OK) { - std::memcpy(ctrlValData.tgtQuat.value, unitQuat, 4 * sizeof(double)); - std::memcpy(ctrlValData.errQuat.value, unitQuat, 4 * sizeof(double)); - ctrlValData.errAng.value = errAng; - ctrlValData.setValidity(false, true); - } + PoolReadGuard pg(&ctrlValData); + if (pg.getReadResult() == returnvalue::OK) { + std::memcpy(ctrlValData.tgtQuat.value, UNIT_QUAT, 4 * sizeof(double)); + std::memcpy(ctrlValData.errQuat.value, UNIT_QUAT, 4 * sizeof(double)); + ctrlValData.errAng.value = 0; + ctrlValData.setValidity(false, true); } } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index eaf80a23..1b57a32a 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -41,6 +41,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes private: static constexpr double UNIT_QUAT[4] = {0, 0, 0, 1}; + static constexpr double RW_OFF_TORQUE[4] = {0.0, 0.0, 0.0, 0.0}; + static constexpr int32_t RW_OFF_SPEED[4] = {0, 0, 0, 0}; AcsParameters acsParameters; SensorProcessing sensorProcessing; From ee974d0e2d199c76642bbef6e743381698430fac Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 18:41:25 +0100 Subject: [PATCH 10/15] register ADIS config set pool variables --- CHANGELOG.md | 4 ++++ .../devicedefinitions/GyroADIS1650XDefinitions.h | 14 +++++++++----- mission/system/objects/ComSubsystem.h | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e570a0..94a66058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- ADIS1650X configuration set was empty because the local pool variables were not registered. + # [v1.31.0] eive-tmtc: v2.16.0 diff --git a/mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h b/mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h index 89a0c918..3cfda2d4 100644 --- a/mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h +++ b/mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h @@ -147,11 +147,15 @@ class AdisGyroConfigDataset : public StaticLocalDataSet<5> { setAllVariablesReadOnly(); } - lp_var_t diagStatReg = lp_var_t(sid.objectId, ADIS1650X::DIAG_STAT_REGISTER); - lp_var_t filterSetting = lp_var_t(sid.objectId, ADIS1650X::FILTER_SETTINGS); - lp_var_t rangMdl = lp_var_t(sid.objectId, ADIS1650X::RANG_MDL); - lp_var_t mscCtrlReg = lp_var_t(sid.objectId, ADIS1650X::MSC_CTRL_REGISTER); - lp_var_t decRateReg = lp_var_t(sid.objectId, ADIS1650X::DEC_RATE_REGISTER); + lp_var_t diagStatReg = + lp_var_t(sid.objectId, ADIS1650X::DIAG_STAT_REGISTER, this); + lp_var_t filterSetting = + lp_var_t(sid.objectId, ADIS1650X::FILTER_SETTINGS, this); + lp_var_t rangMdl = lp_var_t(sid.objectId, ADIS1650X::RANG_MDL, this); + lp_var_t mscCtrlReg = + lp_var_t(sid.objectId, ADIS1650X::MSC_CTRL_REGISTER, this); + lp_var_t decRateReg = + lp_var_t(sid.objectId, ADIS1650X::DEC_RATE_REGISTER, this); private: friend class GyroADIS1650XHandler; diff --git a/mission/system/objects/ComSubsystem.h b/mission/system/objects/ComSubsystem.h index 50f34b0d..ca09a434 100644 --- a/mission/system/objects/ComSubsystem.h +++ b/mission/system/objects/ComSubsystem.h @@ -17,8 +17,8 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF { * @param maxNumberOfSequences * @param maxNumberOfTables * @param transmitterTimeout Maximum time the transmitter of the syrlinks - * will be - * enabled + * will + * be enabled */ ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables, uint32_t transmitterTimeout); From 8da373542ed6b90736eef15257e23a96390e470b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 18:51:31 +0100 Subject: [PATCH 11/15] changelog --- CHANGELOG.md | 6 ++++++ .../controller/controllerdefinitions/AcsCtrlDefinitions.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e570a0..e032c95d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- ACS Controller: Correction for size of MEKF dataset and some optimization and possible fixes + for actuator control. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/403 + # [v1.31.0] eive-tmtc: v2.16.0 diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 0675262c..c3509a04 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -110,7 +110,7 @@ static constexpr uint8_t SUS_SET_PROCESSED_ENTRIES = 15; static constexpr uint8_t GYR_SET_RAW_ENTRIES = 4; static constexpr uint8_t GYR_SET_PROCESSED_ENTRIES = 5; static constexpr uint8_t GPS_SET_PROCESSED_ENTRIES = 4; -static constexpr uint8_t MEKF_SET_ENTRIES = 2; +static constexpr uint8_t MEKF_SET_ENTRIES = 3; static constexpr uint8_t CTRL_VAL_SET_ENTRIES = 4; static constexpr uint8_t ACT_CMD_SET_ENTRIES = 3; From 089d04646aa820c6021cbef043a3bfc4d878932a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 18:53:29 +0100 Subject: [PATCH 12/15] prep v1.31.1 --- CHANGELOG.md | 2 ++ CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e032c95d..5e921cc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v1.31.1] + ## Fixed - ACS Controller: Correction for size of MEKF dataset and some optimization and possible fixes diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c698dfe..a0768ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) set(OBSW_VERSION_MINOR 31) -set(OBSW_VERSION_REVISION 0) +set(OBSW_VERSION_REVISION 1) # set(CMAKE_VERBOSE TRUE) From e33a0fd60bd6512b08189500fabf134af91e7c4d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Feb 2023 19:51:07 +0100 Subject: [PATCH 13/15] that was definitely a fix --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a294062a..dd893586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,8 @@ will consitute of a breaking change warranting a new major release: - ADIS1650X configuration set was empty because the local pool variables were not registered. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/402 -- ACS Controller: Correction for size of MEKF dataset and some optimization and possible fixes - for actuator control. +- ACS Controller: Correction for size of MEKF dataset and some optimization and fixes + for actuator control which lead to a crash. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/403 # [v1.31.0] From eb2a0604e9da750fcb07d848de9db12c88bdae57 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 24 Feb 2023 01:09:00 +0100 Subject: [PATCH 14/15] rang mdl pool entry --- mission/devices/GyroADIS1650XHandler.cpp | 1 + mission/devices/GyroADIS1650XHandler.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mission/devices/GyroADIS1650XHandler.cpp b/mission/devices/GyroADIS1650XHandler.cpp index 0993e233..daff1b06 100644 --- a/mission/devices/GyroADIS1650XHandler.cpp +++ b/mission/devices/GyroADIS1650XHandler.cpp @@ -385,6 +385,7 @@ ReturnValue_t GyroADIS1650XHandler::initializeLocalDataPool(localpool::DataPool localDataPoolMap.emplace(ADIS1650X::DIAG_STAT_REGISTER, new PoolEntry()); localDataPoolMap.emplace(ADIS1650X::FILTER_SETTINGS, new PoolEntry()); + localDataPoolMap.emplace(ADIS1650X::RANG_MDL, &rangMdl); localDataPoolMap.emplace(ADIS1650X::MSC_CTRL_REGISTER, new PoolEntry()); localDataPoolMap.emplace(ADIS1650X::DEC_RATE_REGISTER, new PoolEntry()); poolManager.subscribeForRegularPeriodicPacket( diff --git a/mission/devices/GyroADIS1650XHandler.h b/mission/devices/GyroADIS1650XHandler.h index 34335c51..d348baa2 100644 --- a/mission/devices/GyroADIS1650XHandler.h +++ b/mission/devices/GyroADIS1650XHandler.h @@ -63,6 +63,8 @@ class GyroADIS1650XHandler : public DeviceHandlerBase { InternalState internalState = InternalState::STARTUP; bool commandExecuted = false; + PoolEntry rangMdl = PoolEntry(); + void prepareReadCommand(uint8_t *regList, size_t len); BurstModes getBurstMode(); From 104d9647fece4fa2d917557e36601d0c86cdd833 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 24 Feb 2023 01:09:40 +0100 Subject: [PATCH 15/15] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd893586..51b7209d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- ADIS1650X: Added missing MDL_RANG pool entry for configuration set + # [v1.31.1] ## Fixed