This commit is contained in:
@ -1816,8 +1816,7 @@ void ThermalController::heaterMaxDurationControl(
|
||||
heaterStates[i].trackHeaterMaxBurnTime = false;
|
||||
triggerEvent(tcsCtrl::TCS_HEATER_MAX_BURN_TIME_REACHED, static_cast<uint32_t>(i),
|
||||
MAX_HEATER_ON_DURATIONS_MS[i]);
|
||||
heaterSwitchHelper(static_cast<heater::Switch>(i), heater::SwitchState::OFF,
|
||||
std::nullopt);
|
||||
heaterSwitchHelper(static_cast<heater::Switch>(i), heater::SwitchState::OFF, std::nullopt);
|
||||
// The heater might still be one for some thermal components, so cross-check
|
||||
// those components
|
||||
crossCheckHeaterStateOfComponentsWhenHeaterGoesOff(static_cast<heater::Switch>(i));
|
||||
@ -1867,8 +1866,7 @@ void ThermalController::resetThermalStates() {
|
||||
}
|
||||
}
|
||||
|
||||
void ThermalController::heaterSwitchHelper(heater::Switch switchNr,
|
||||
heater::SwitchState targetState,
|
||||
void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::SwitchState targetState,
|
||||
std::optional<unsigned> componentIdx) {
|
||||
timeval currentTime;
|
||||
Clock::getClockMonotonic(¤tTime);
|
||||
|
@ -40,7 +40,7 @@ struct ThermalState {
|
||||
// Is heating on for that thermal module?
|
||||
bool heating = false;
|
||||
// Which switch is being used for heating the component
|
||||
heater::Switch heaterSwitch = heater::Switch::NUMBER_OF_SWITCHES;
|
||||
heater::Switch heaterSwitch = heater::Switch::HEATER_NONE;
|
||||
// Heater start time and end times as UNIX seconds. Please note that these times will be updated
|
||||
// when a switch command is sent, with no guarantess that the heater actually went on.
|
||||
uint32_t heaterStartTime = 0;
|
||||
|
Reference in New Issue
Block a user