v6.1.0-branch #750

Closed
muellerr wants to merge 117 commits from v6.1.0-branch into v6.0.0-branch
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 1d4b815452 - Show all commits

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