From ec95792bc33c95c43f5279d3463ea7f7e570dc10 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 27 Mar 2023 15:00:40 +0200 Subject: [PATCH 1/4] ACS board devs go to on first --- CHANGELOG.md | 5 +++++ mission/acs/GyrAdis1650XHandler.cpp | 6 +----- mission/acs/GyrAdis1650XHandler.h | 1 - mission/acs/GyrL3gCustomHandler.cpp | 6 +----- mission/acs/GyrL3gCustomHandler.h | 1 - mission/acs/MgmLis3CustomHandler.cpp | 2 +- mission/acs/MgmRm3100CustomHandler.cpp | 2 +- tmtc | 2 +- 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d16da7fc..8e2ea200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- Proper Faulty/External Control handling for the dual lane assemblies. +- ACS board devices: Go to ON mode instead of going to NORMAL mode directly. + ## Changed - Enabled periodic hosuekeeping generation for release images. diff --git a/mission/acs/GyrAdis1650XHandler.cpp b/mission/acs/GyrAdis1650XHandler.cpp index dd30775e..74af9eda 100644 --- a/mission/acs/GyrAdis1650XHandler.cpp +++ b/mission/acs/GyrAdis1650XHandler.cpp @@ -28,11 +28,7 @@ void GyrAdis1650XHandler::doStartUp() { } if (breakCountdown.hasTimedOut()) { updatePeriodicReply(true, adis1650x::REPLY); - if (goToNormalMode) { - setMode(MODE_NORMAL); - } else { - setMode(MODE_ON); - } + setMode(MODE_ON); internalState = InternalState::NONE; } } diff --git a/mission/acs/GyrAdis1650XHandler.h b/mission/acs/GyrAdis1650XHandler.h index 5a2a2842..02a7c251 100644 --- a/mission/acs/GyrAdis1650XHandler.h +++ b/mission/acs/GyrAdis1650XHandler.h @@ -47,7 +47,6 @@ class GyrAdis1650XHandler : public DeviceHandlerBase { AdisGyroConfigDataset configDataset; double sensitivity = adis1650x::SENSITIVITY_UNSET; - bool goToNormalMode = false; bool warningSwitch = true; enum class InternalState { NONE, STARTUP, SHUTDOWN }; diff --git a/mission/acs/GyrL3gCustomHandler.cpp b/mission/acs/GyrL3gCustomHandler.cpp index b235a2ef..abcb664a 100644 --- a/mission/acs/GyrL3gCustomHandler.cpp +++ b/mission/acs/GyrL3gCustomHandler.cpp @@ -23,11 +23,7 @@ void GyrL3gCustomHandler::doStartUp() { if (internalState == InternalState::STARTUP) { if (commandExecuted) { - if (goNormalModeImmediately) { - setMode(MODE_NORMAL); - } else { - setMode(_MODE_TO_ON); - } + setMode(MODE_ON); internalState = InternalState::NONE; commandExecuted = false; } diff --git a/mission/acs/GyrL3gCustomHandler.h b/mission/acs/GyrL3gCustomHandler.h index 44ddd826..3e4942cc 100644 --- a/mission/acs/GyrL3gCustomHandler.h +++ b/mission/acs/GyrL3gCustomHandler.h @@ -69,7 +69,6 @@ class GyrL3gCustomHandler : public DeviceHandlerBase { bool commandExecuted = false; uint8_t statusReg = 0; - bool goNormalModeImmediately = false; uint8_t ctrlReg1Value = l3gd20h::CTRL_REG_1_VAL; uint8_t ctrlReg2Value = l3gd20h::CTRL_REG_2_VAL; diff --git a/mission/acs/MgmLis3CustomHandler.cpp b/mission/acs/MgmLis3CustomHandler.cpp index f081cd7e..d1dd5eff 100644 --- a/mission/acs/MgmLis3CustomHandler.cpp +++ b/mission/acs/MgmLis3CustomHandler.cpp @@ -20,7 +20,7 @@ void MgmLis3CustomHandler::doStartUp() { } if (internalState == InternalState::STARTUP) { if (commandExecuted) { - setMode(MODE_NORMAL); + setMode(MODE_ON); internalState = InternalState::NONE; commandExecuted = false; } diff --git a/mission/acs/MgmRm3100CustomHandler.cpp b/mission/acs/MgmRm3100CustomHandler.cpp index 891fad0f..e57effda 100644 --- a/mission/acs/MgmRm3100CustomHandler.cpp +++ b/mission/acs/MgmRm3100CustomHandler.cpp @@ -25,7 +25,7 @@ void MgmRm3100CustomHandler::doStartUp() { if (commandExecuted) { commandExecuted = false; internalState = InternalState::NONE; - setMode(MODE_NORMAL); + setMode(MODE_ON); } } } diff --git a/tmtc b/tmtc index f6fcb2fb..333faaa5 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit f6fcb2fb282d79b1e250722eba46a319603b0232 +Subproject commit 333faaa5f70646bfde1101f8e0538505574d1d7e From 80ad923181c23d4862ec1d129251f5681c9a197b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 27 Mar 2023 15:03:54 +0200 Subject: [PATCH 2/4] SUS goes to MODE_ON in startup now --- CHANGELOG.md | 1 + mission/acs/SusHandler.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2ea200..7cb32c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ will consitute of a breaking change warranting a new major release: - Proper Faulty/External Control handling for the dual lane assemblies. - ACS board devices: Go to ON mode instead of going to NORMAL mode directly. +- SUS device handlers: Go to ON mode on startup instead of NORMAL mode. ## Changed diff --git a/mission/acs/SusHandler.cpp b/mission/acs/SusHandler.cpp index 46255165..0032a11d 100644 --- a/mission/acs/SusHandler.cpp +++ b/mission/acs/SusHandler.cpp @@ -20,7 +20,7 @@ void SusHandler::doStartUp() { } if (internalState == InternalState::STARTUP) { if (commandExecuted) { - setMode(MODE_NORMAL); + setMode(MODE_ON); internalState = InternalState::NONE; commandExecuted = false; } From e0f5d049e30a10688e345a890081d3e36af75458 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 27 Mar 2023 15:15:20 +0200 Subject: [PATCH 3/4] compile fixes --- mission/acs/GyrAdis1650XHandler.cpp | 2 -- mission/acs/GyrAdis1650XHandler.h | 1 - mission/acs/GyrL3gCustomHandler.cpp | 2 -- mission/acs/GyrL3gCustomHandler.h | 5 ----- 4 files changed, 10 deletions(-) diff --git a/mission/acs/GyrAdis1650XHandler.cpp b/mission/acs/GyrAdis1650XHandler.cpp index 74af9eda..63a28366 100644 --- a/mission/acs/GyrAdis1650XHandler.cpp +++ b/mission/acs/GyrAdis1650XHandler.cpp @@ -204,8 +204,6 @@ adis1650x::BurstModes GyrAdis1650XHandler::getBurstMode() { return adis1650x::burstModeFromMscCtrl(currentCtrlReg); } -void GyrAdis1650XHandler::setToGoToNormalModeImmediately() { goToNormalMode = true; } - void GyrAdis1650XHandler::enablePeriodicPrintouts(bool enable, uint8_t divider) { periodicPrintout = enable; debugDivider.setDivider(divider); diff --git a/mission/acs/GyrAdis1650XHandler.h b/mission/acs/GyrAdis1650XHandler.h index 02a7c251..5d906f61 100644 --- a/mission/acs/GyrAdis1650XHandler.h +++ b/mission/acs/GyrAdis1650XHandler.h @@ -21,7 +21,6 @@ class GyrAdis1650XHandler : public DeviceHandlerBase { adis1650x::Type type); void enablePeriodicPrintouts(bool enable, uint8_t divider); - void setToGoToNormalModeImmediately(); // DeviceHandlerBase abstract function implementation void doStartUp() override; diff --git a/mission/acs/GyrL3gCustomHandler.cpp b/mission/acs/GyrL3gCustomHandler.cpp index abcb664a..fd576791 100644 --- a/mission/acs/GyrL3gCustomHandler.cpp +++ b/mission/acs/GyrL3gCustomHandler.cpp @@ -141,8 +141,6 @@ uint32_t GyrL3gCustomHandler::getTransitionDelayMs(Mode_t from, Mode_t to) { return this->transitionDelayMs; } -void GyrL3gCustomHandler::setToGoToNormalMode(bool enable) { this->goNormalModeImmediately = true; } - ReturnValue_t GyrL3gCustomHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(l3gd20h::ANG_VELOC_X, new PoolEntry({0.0})); diff --git a/mission/acs/GyrL3gCustomHandler.h b/mission/acs/GyrL3gCustomHandler.h index 3e4942cc..08d1b706 100644 --- a/mission/acs/GyrL3gCustomHandler.h +++ b/mission/acs/GyrL3gCustomHandler.h @@ -32,11 +32,6 @@ class GyrL3gCustomHandler : public DeviceHandlerBase { */ void setAbsoluteLimits(float limitX, float limitY, float limitZ); - /** - * @brief Configure device handler to go to normal mode immediately - */ - void setToGoToNormalMode(bool enable); - protected: /* DeviceHandlerBase overrides */ ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override; From f8ff9c355c8b2b1e6f46661db54cd702c4c37e35 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 27 Mar 2023 16:10:50 +0200 Subject: [PATCH 4/4] shorter delay between file swaps --- mission/tmtc/PersistentLogTmStoreTask.cpp | 8 ++------ mission/tmtc/PersistentSingleTmStoreTask.cpp | 10 ++-------- tmtc | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/mission/tmtc/PersistentLogTmStoreTask.cpp b/mission/tmtc/PersistentLogTmStoreTask.cpp index ccabb16d..1faba222 100644 --- a/mission/tmtc/PersistentLogTmStoreTask.cpp +++ b/mission/tmtc/PersistentLogTmStoreTask.cpp @@ -33,12 +33,8 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) { stateHandlingForStore(handleOneStore(stores.miscStore, miscStoreContext)); if (not someonesBusy) { TaskFactory::delayTask(100); - } else /* and graceDelayDuringDumping.hasTimedOut()*/ { - if (someFileWasSwapped) { - TaskFactory::delayTask(20); - } - // TaskFactory::delayTask(2); - // graceDelayDuringDumping.resetTimer(); + } else if (someFileWasSwapped) { + TaskFactory::delayTask(10); } } } diff --git a/mission/tmtc/PersistentSingleTmStoreTask.cpp b/mission/tmtc/PersistentSingleTmStoreTask.cpp index a814694e..be300d91 100644 --- a/mission/tmtc/PersistentSingleTmStoreTask.cpp +++ b/mission/tmtc/PersistentSingleTmStoreTask.cpp @@ -18,14 +18,8 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) { bool busy = handleOneStore(storeWithQueue, dumpContext); if (not busy) { TaskFactory::delayTask(100); - } else { - if (fileHasSwapped) { - TaskFactory::delayTask(20); - } - // if (fileHasSwapped and graceDelayDuringDumping.hasTimedOut()) { - // TaskFactory::delayTask(2); - // graceDelayDuringDumping.resetTimer(); - // } + } else if (fileHasSwapped) { + TaskFactory::delayTask(10); } } } diff --git a/tmtc b/tmtc index f6fcb2fb..3f352346 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit f6fcb2fb282d79b1e250722eba46a319603b0232 +Subproject commit 3f3523465a141bc2a2c36cbc9cbbf6ab7b3a9d70