important bugfix for PLOC SUPV
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-12-23 12:14:01 +01:00
parent cfae090de4
commit 8fedaa43e9
2 changed files with 10 additions and 6 deletions

View File

@ -97,8 +97,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const uint32_t COPY_ADC_TO_MRAM_TIMEOUT = 70000;
// 60 s
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
// 5 s
static const uint32_t BOOT_TIMEOUT = 5000;
// 4 s
static const uint32_t BOOT_TIMEOUT = 4000;
enum class StartupState : uint8_t { OFF, BOOTING, SET_TIME, SET_TIME_EXECUTING, ON };
static constexpr bool SET_TIME_DURING_BOOT = true;

View File

@ -100,6 +100,7 @@ ReturnValue_t PlocSupvUartManager::performOperation(uint8_t operationCode) {
state = InternalState::SLEEPING;
lock->unlockMutex();
semaphore->acquire();
putTaskToSleep = false;
while (true) {
if (putTaskToSleep) {
performUartShutdown();
@ -295,11 +296,14 @@ void PlocSupvUartManager::stop() {
}
void PlocSupvUartManager::start() {
MutexGuard mg(lock);
if (state != InternalState::SLEEPING and state != InternalState::GO_TO_SLEEP) {
return;
{
MutexGuard mg(lock);
if (state != InternalState::SLEEPING and state != InternalState::GO_TO_SLEEP) {
return;
}
state = InternalState::DEFAULT;
}
state = InternalState::DEFAULT;
semaphore->release();
}