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:
Robin Müller 2023-07-06 12:04:36 +02:00
parent 1e98fcbbd5
commit 1d4b815452
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 6 additions and 5 deletions

View File

@ -1679,7 +1679,8 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
return;
}
htrCtx.switchState = static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
htrCtx.switchState =
static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
// Heater off
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {

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(); }