resolve merge conflicts properly
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
c0ae25a973
commit
43d86c9aad
@ -1706,7 +1706,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
htrCtx.switchState =
|
htrCtx.switchState =
|
||||||
static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
|
static_cast<heater::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
|
||||||
// Heater off
|
// Heater off
|
||||||
if (htrCtx.switchState == heater::SwitchState::OFF) {
|
if (htrCtx.switchState == heater::SwitchState::OFF) {
|
||||||
if (ctrlCtx.sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
|
if (ctrlCtx.sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
|
||||||
@ -1780,7 +1780,7 @@ void ThermalController::heaterTransitionControl(
|
|||||||
if (heaterStates[i].switchTransition) {
|
if (heaterStates[i].switchTransition) {
|
||||||
if (currentHeaterStates[i] == heaterStates[i].target) {
|
if (currentHeaterStates[i] == heaterStates[i].target) {
|
||||||
// Required for max heater period control
|
// 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.setTimeout(MAX_HEATER_ON_DURATIONS_MS[i]);
|
||||||
heaterStates[i].heaterOnPeriod.resetTimer();
|
heaterStates[i].heaterOnPeriod.resetTimer();
|
||||||
} else {
|
} else {
|
||||||
@ -1808,13 +1808,13 @@ void ThermalController::heaterMaxDurationControl(
|
|||||||
heaterStates[i].heaterOnPeriod.hasTimedOut()) {
|
heaterStates[i].heaterOnPeriod.hasTimedOut()) {
|
||||||
heaterStates[i].switchTransition = false;
|
heaterStates[i].switchTransition = false;
|
||||||
heaterStates[i].heaterSwitchControlCycles = 0;
|
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),
|
triggerEvent(tcsCtrl::TCS_HEATER_MAX_BURN_TIME_REACHED, static_cast<uint32_t>(i),
|
||||||
MAX_HEATER_ON_DURATIONS_MS[i]);
|
MAX_HEATER_ON_DURATIONS_MS[i]);
|
||||||
// The heater might still be one for some thermal components, so cross-check
|
// The heater might still be one for some thermal components, so cross-check
|
||||||
// those components
|
// those components
|
||||||
crossCheckHeaterStateOfComponentsWhenHeaterGoesOff(static_cast<heater::Switch>(i));
|
crossCheckHeaterStateOfComponentsWhenHeaterGoesOff(static_cast<heater::Switch>(i));
|
||||||
} else if (currentHeaterStates[i] == HeaterHandler::SwitchState::OFF) {
|
} else if (currentHeaterStates[i] == heater::SwitchState::OFF) {
|
||||||
heaterStates[i].heaterOnPeriod.resetTimer();
|
heaterStates[i].heaterOnPeriod.resetTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1874,13 +1874,13 @@ void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::Swit
|
|||||||
thermalStates[componentIdx].heaterSwitch = switchNr;
|
thermalStates[componentIdx].heaterSwitch = switchNr;
|
||||||
thermalStates[componentIdx].heating = true;
|
thermalStates[componentIdx].heating = true;
|
||||||
thermalStates[componentIdx].heaterStartTime = currentTime.tv_sec;
|
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));
|
static_cast<uint32_t>(switchNr));
|
||||||
} else {
|
} else {
|
||||||
heaterHandler.switchHeater(switchNr, targetState);
|
heaterHandler.switchHeater(switchNr, targetState);
|
||||||
thermalStates[componentIdx].heating = false;
|
thermalStates[componentIdx].heating = false;
|
||||||
thermalStates[componentIdx].heaterEndTime = currentTime.tv_sec;
|
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));
|
static_cast<uint32_t>(switchNr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -421,7 +421,7 @@ ReturnValue_t HeaterHandler::getAllSwitchStates(std::array<heater::SwitchState,
|
|||||||
bool HeaterHandler::allSwitchesOff() {
|
bool HeaterHandler::allSwitchesOff() {
|
||||||
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||||
for (power::Switch_t switchNr = 0; switchNr < heater::NUMBER_OF_SWITCHES; switchNr++) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user