add start method for uart man
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user