resolve merge conflicts properly
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-07-07 12:24:48 +02:00
parent c0ae25a973
commit 43d86c9aad
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 7 additions and 7 deletions

View File

@ -1706,7 +1706,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
}
htrCtx.switchState =
static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
static_cast<heater::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
// Heater off
if (htrCtx.switchState == heater::SwitchState::OFF) {
if (ctrlCtx.sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
@ -1780,7 +1780,7 @@ void ThermalController::heaterTransitionControl(
if (heaterStates[i].switchTransition) {
if (currentHeaterStates[i] == heaterStates[i].target) {
// Required for max heater period control
if (currentHeaterStates[i] == HeaterHandler::SwitchState::ON) {
if (currentHeaterStates[i] == heater::SwitchState::ON) {
heaterStates[i].heaterOnPeriod.setTimeout(MAX_HEATER_ON_DURATIONS_MS[i]);
heaterStates[i].heaterOnPeriod.resetTimer();
} else {
@ -1808,13 +1808,13 @@ void ThermalController::heaterMaxDurationControl(
heaterStates[i].heaterOnPeriod.hasTimedOut()) {
heaterStates[i].switchTransition = false;
heaterStates[i].heaterSwitchControlCycles = 0;
heaterHandler.switchHeater(static_cast<heater::Switch>(i), HeaterHandler::SwitchState::OFF);
heaterHandler.switchHeater(static_cast<heater::Switch>(i), heater::SwitchState::OFF);
triggerEvent(tcsCtrl::TCS_HEATER_MAX_BURN_TIME_REACHED, static_cast<uint32_t>(i),
MAX_HEATER_ON_DURATIONS_MS[i]);
// The heater might still be one for some thermal components, so cross-check
// those components
crossCheckHeaterStateOfComponentsWhenHeaterGoesOff(static_cast<heater::Switch>(i));
} else if (currentHeaterStates[i] == HeaterHandler::SwitchState::OFF) {
} else if (currentHeaterStates[i] == heater::SwitchState::OFF) {
heaterStates[i].heaterOnPeriod.resetTimer();
}
}
@ -1874,13 +1874,13 @@ void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::Swit
thermalStates[componentIdx].heaterSwitch = switchNr;
thermalStates[componentIdx].heating = true;
thermalStates[componentIdx].heaterStartTime = currentTime.tv_sec;
triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_ON, static_cast<uint32_t>(currThermalComponent),
triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_ON, static_cast<uint32_t>(ctrlCtx.thermalComponent),
static_cast<uint32_t>(switchNr));
} else {
heaterHandler.switchHeater(switchNr, targetState);
thermalStates[componentIdx].heating = false;
thermalStates[componentIdx].heaterEndTime = currentTime.tv_sec;
triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_OFF, static_cast<uint32_t>(currThermalComponent),
triggerEvent(tcsCtrl::TCS_SWITCHING_HEATER_OFF, static_cast<uint32_t>(ctrlCtx.thermalComponent),
static_cast<uint32_t>(switchNr));
}
}

View File

@ -421,7 +421,7 @@ ReturnValue_t HeaterHandler::getAllSwitchStates(std::array<heater::SwitchState,
bool HeaterHandler::allSwitchesOff() {
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
for (power::Switch_t switchNr = 0; switchNr < heater::NUMBER_OF_SWITCHES; switchNr++) {
if (heaterVec.at(switchNr).switchState == SwitchState::ON) {
if (heaterVec.at(switchNr).switchState == heater::SwitchState::ON) {
return false;
}
}