From 3207d25bd31d58c61bb14a294468a556b854f079 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 16:04:45 +0100 Subject: [PATCH] weird errors when going to normal mode --- bsp_q7s/core/ObjectFactory.cpp | 2 +- mission/devices/IMTQHandler.cpp | 5 +++-- mission/devices/IMTQHandler.h | 2 +- .../devicedefinitions/GomspaceDefinitions.h | 16 ++++++++++++++++ tmtc | 2 +- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 09a0a46a..c7e039f9 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -147,7 +147,7 @@ void ObjectFactory::produce(void* args) { new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV); auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); #if OBSW_DEBUG_IMTQ == 1 - imtqHandler->setToGoToNormal(); + imtqHandler->setToGoToNormal(true); imtqHandler->setStartUpImmediately(); #endif #endif diff --git a/mission/devices/IMTQHandler.cpp b/mission/devices/IMTQHandler.cpp index 66394294..3c3e1a66 100644 --- a/mission/devices/IMTQHandler.cpp +++ b/mission/devices/IMTQHandler.cpp @@ -1,11 +1,12 @@ #include "IMTQHandler.h" -#include "OBSWConfig.h" #include #include #include +#include "OBSWConfig.h" + IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) : DeviceHandlerBase(objectId, comIF, comCookie), engHkDataset(this), @@ -694,7 +695,7 @@ void IMTQHandler::fillEngHkDataset(const uint8_t* packet) { #endif } -void IMTQHandler::setToGoToNormal() { mode = MODE_NORMAL; } +void IMTQHandler::setToGoToNormal(bool enable) { this->goToNormalMode = enable; } void IMTQHandler::handleDeviceTM(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId) { if (wiretappingMode == RAW) { diff --git a/mission/devices/IMTQHandler.h b/mission/devices/IMTQHandler.h index 662b555b..f54306f4 100644 --- a/mission/devices/IMTQHandler.h +++ b/mission/devices/IMTQHandler.h @@ -18,7 +18,7 @@ class IMTQHandler : public DeviceHandlerBase { /** * @brief Sets mode to MODE_NORMAL. Can be used for debugging. */ - void setToGoToNormal(); + void setToGoToNormal(bool enable); protected: void doStartUp() override; diff --git a/mission/devices/devicedefinitions/GomspaceDefinitions.h b/mission/devices/devicedefinitions/GomspaceDefinitions.h index fde4e047..995d9a7a 100644 --- a/mission/devices/devicedefinitions/GomspaceDefinitions.h +++ b/mission/devices/devicedefinitions/GomspaceDefinitions.h @@ -360,6 +360,22 @@ enum P60SytemPoolIds : lp_id_t { namespace P60Dock { +enum SwitchChannels : uint8_t { + ACU = 0, + PDU1 = 1, + X3_IDLE = 2, + PDU2_VCC = 3, + ACU_VBAT = 4, + PDU1_VBAT = 5, + X3_IDLE_VBAT = 6, + PDU2_VBAT = 7, + STACK_VBAT = 8, + STACK_3V3 = 9, + STACK_5V = 10, + GS3V3 = 11, + GS5V = 12 +}; + /** Max reply size reached when requesting full hk table */ static const uint16_t MAX_REPLY_LENGTH = 407; diff --git a/tmtc b/tmtc index 50128b73..e710390f 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 50128b7304470281ff90bc3dcc51c714a7e6b99f +Subproject commit e710390f5330e3be1f14ba9c6082cbbfbcd9aec1