From e7a1c9f402c576685428d7b919ad874dd98f4486 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 6 Mar 2023 14:25:26 +0100 Subject: [PATCH] some tweaks for acs brd devs --- mission/devices/GyrAdis1650XHandler.cpp | 5 +++-- mission/devices/GyrL3gCustomHandler.cpp | 4 ++-- mission/devices/MgmLis3CustomHandler.cpp | 2 +- mission/devices/MgmRm3100CustomHandler.cpp | 2 +- mission/system/objects/ImtqAssembly.cpp | 4 +--- tmtc | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mission/devices/GyrAdis1650XHandler.cpp b/mission/devices/GyrAdis1650XHandler.cpp index 1a91d36f..73e9a0cd 100644 --- a/mission/devices/GyrAdis1650XHandler.cpp +++ b/mission/devices/GyrAdis1650XHandler.cpp @@ -48,7 +48,7 @@ void GyrAdis1650XHandler::doShutDown() { updatePeriodicReply(false, adis1650x::REPLY); internalState = InternalState::NONE; commandExecuted = false; - setMode(_MODE_POWER_DOWN); + setMode(MODE_OFF); } } @@ -90,7 +90,8 @@ void GyrAdis1650XHandler::fillCommandAndReplyMap() { ReturnValue_t GyrAdis1650XHandler::scanForReply(const uint8_t *start, size_t remainingSize, DeviceCommandId_t *foundId, size_t *foundLen) { - if (breakCountdown.isBusy() or getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON) { + if (breakCountdown.isBusy() or getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON or + getMode() == _MODE_POWER_DOWN) { return IGNORE_FULL_PACKET; } if (remainingSize != sizeof(acs::Adis1650XReply)) { diff --git a/mission/devices/GyrL3gCustomHandler.cpp b/mission/devices/GyrL3gCustomHandler.cpp index 4bd5069f..d3624bdf 100644 --- a/mission/devices/GyrL3gCustomHandler.cpp +++ b/mission/devices/GyrL3gCustomHandler.cpp @@ -44,7 +44,7 @@ void GyrL3gCustomHandler::doShutDown() { internalState = InternalState::NONE; updatePeriodicReply(false, l3gd20h::REPLY); commandExecuted = false; - setMode(_MODE_POWER_DOWN); + setMode(MODE_OFF); } } @@ -100,7 +100,7 @@ ReturnValue_t GyrL3gCustomHandler::buildCommandFromCommand(DeviceCommandId_t dev ReturnValue_t GyrL3gCustomHandler::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, size_t *foundLen) { - if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON) { + if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON or getMode() == _MODE_POWER_DOWN) { return IGNORE_FULL_PACKET; } if (len != sizeof(acs::GyroL3gReply)) { diff --git a/mission/devices/MgmLis3CustomHandler.cpp b/mission/devices/MgmLis3CustomHandler.cpp index 7968abd7..151d321d 100644 --- a/mission/devices/MgmLis3CustomHandler.cpp +++ b/mission/devices/MgmLis3CustomHandler.cpp @@ -37,7 +37,7 @@ void MgmLis3CustomHandler::doShutDown() { updatePeriodicReply(false, REPLY); commandExecuted = false; internalState = InternalState::NONE; - setMode(_MODE_POWER_DOWN); + setMode(MODE_OFF); } } diff --git a/mission/devices/MgmRm3100CustomHandler.cpp b/mission/devices/MgmRm3100CustomHandler.cpp index 90fe58e2..f6f86950 100644 --- a/mission/devices/MgmRm3100CustomHandler.cpp +++ b/mission/devices/MgmRm3100CustomHandler.cpp @@ -38,7 +38,7 @@ void MgmRm3100CustomHandler::doShutDown() { } if (internalState == InternalState::SHUTDOWN and commandExecuted) { updatePeriodicReply(false, REPLY); - setMode(_MODE_POWER_DOWN); + setMode(MODE_OFF); commandExecuted = false; } } diff --git a/mission/system/objects/ImtqAssembly.cpp b/mission/system/objects/ImtqAssembly.cpp index de4e9b45..14d90b75 100644 --- a/mission/system/objects/ImtqAssembly.cpp +++ b/mission/system/objects/ImtqAssembly.cpp @@ -51,6 +51,4 @@ ReturnValue_t ImtqAssembly::checkAndHandleHealthState(Mode_t deviceMode, Submode return OK; } -void ImtqAssembly::handleChildrenLostMode(ReturnValue_t result) { - startTransition(mode, submode); -} +void ImtqAssembly::handleChildrenLostMode(ReturnValue_t result) { startTransition(mode, submode); } diff --git a/tmtc b/tmtc index 208d3286..9462a6e2 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 208d328683a9911ecaa1d60abd3b8a9e3a841c37 +Subproject commit 9462a6e2459e11ac03c2bb9694772959ac228cd0