diff --git a/linux/devices/ploc/PlocSupvUartMan.cpp b/linux/devices/ploc/PlocSupvUartMan.cpp index 047bef59..8b341c56 100644 --- a/linux/devices/ploc/PlocSupvUartMan.cpp +++ b/linux/devices/ploc/PlocSupvUartMan.cpp @@ -289,6 +289,9 @@ ReturnValue_t PlocSupvUartManager::initiateUpdateContinuation() { void PlocSupvUartManager::stop() { MutexGuard mg(lock); + if(state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) { + return; + } state = InternalState::GO_TO_SLEEP; } @@ -297,6 +300,7 @@ void PlocSupvUartManager::start() { if (state != InternalState::SLEEPING and state != InternalState::GO_TO_SLEEP) { return; } + state = InternalState::DEFAULT; semaphore->release(); }