Merge branch 'tcs-heater-upper-limit' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2023-07-07 11:50:32 +02:00
3 changed files with 15 additions and 8 deletions

View File

@ -419,13 +419,13 @@ ReturnValue_t HeaterHandler::getAllSwitchStates(std::array<heater::SwitchState,
}
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(); }