add start method for uart man
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-11-15 17:40:19 +01:00
parent 38e74e6eaf
commit 2b4ec6d274
5 changed files with 28 additions and 21 deletions

View File

@ -94,6 +94,9 @@ ReturnValue_t PlocSupvUartManager::initialize() {
ReturnValue_t PlocSupvUartManager::performOperation(uint8_t operationCode) {
bool putTaskToSleep = false;
while (true) {
lock->lockMutex();
state = InternalState::SLEEPING;
lock->unlockMutex();
semaphore->acquire();
while (true) {
putTaskToSleep = handleUartReception();
@ -289,6 +292,14 @@ void PlocSupvUartManager::stop() {
state = InternalState::GO_TO_SLEEP;
}
void PlocSupvUartManager::start() {
MutexGuard mg(lock);
if (state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) {
return;
}
semaphore->release();
}
void PlocSupvUartManager::executeFullCheckMemoryCommand() {
ReturnValue_t result;
if (update.crcShouldBeChecked) {