This commit is contained in:
parent
cf582dd6a4
commit
fdf1c7a611
@ -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;
|
||||
|
@ -14,7 +14,8 @@ enum Switch : uint8_t {
|
||||
HEATER_5_STR,
|
||||
HEATER_6_DRO,
|
||||
HEATER_7_S_BAND,
|
||||
NUMBER_OF_SWITCHES
|
||||
NUMBER_OF_SWITCHES = 8,
|
||||
HEATER_NONE = 0xff
|
||||
};
|
||||
|
||||
enum SwitchState : uint8_t { ON = 1, OFF = 0 };
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit ba47757b508976943f2e042a8f42673ba1424a28
|
||||
Subproject commit e27ad147d4a3e8090f5a3efa18c1abbb0912a4b3
|
Loading…
Reference in New Issue
Block a user