this is better to read..
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main Build queued...

This commit is contained in:
2023-07-06 12:04:36 +02:00
parent 1e98fcbbd5
commit 1d4b815452
2 changed files with 6 additions and 5 deletions

View File

@ -419,13 +419,13 @@ ReturnValue_t HeaterHandler::getAllSwitchStates(std::array<SwitchState, 8>& stat
}
bool HeaterHandler::allSwitchesOff() {
bool allSwitchesOrd = false;
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
/* Or all switches. As soon one switch is on, allSwitchesOrd will be true */
for (power::Switch_t switchNr = 0; switchNr < heater::NUMBER_OF_SWITCHES; switchNr++) {
allSwitchesOrd = allSwitchesOrd || heaterVec.at(switchNr).switchState;
if (heaterVec.at(switchNr).switchState == SwitchState::ON) {
return false;
}
}
return !allSwitchesOrd;
return true;
}
MessageQueueId_t HeaterHandler::getCommandQueue() const { return commandQueue->getId(); }