TCS Observability #733
@ -1781,7 +1781,7 @@ void ThermalController::heaterTransitionControl(
|
||||
if (currentHeaterStates[i] == heaterStates[i].target) {
|
||||
// Required for max heater period control
|
||||
if (currentHeaterStates[i] == heater::SwitchState::ON) {
|
||||
heaterStates[i].heaterOnPeriod.setTimeout(MAX_HEATER_ON_DURATIONS[i]);
|
||||
heaterStates[i].heaterOnPeriod.setTimeout(MAX_HEATER_ON_DURATIONS_MS[i]);
|
||||
heaterStates[i].heaterOnPeriod.resetTimer();
|
||||
} else {
|
||||
// The heater might still be one for some thermal components, so cross-check
|
||||
@ -1809,6 +1809,8 @@ void ThermalController::heaterMaxDurationControl(
|
||||
heaterStates[i].switchTransition = false;
|
||||
heaterStates[i].heaterSwitchControlCycles = 0;
|
||||
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));
|
||||
|
@ -35,23 +35,23 @@ class ThermalController : public ExtendedControllerBase {
|
||||
static constexpr int16_t SANITY_LIMIT_UPPER_TEMP = 160;
|
||||
|
||||
// 1 hour
|
||||
static constexpr uint32_t MAX_HEATER_ON_DURATION_MS = 60 * 60 * 1000;
|
||||
static constexpr uint32_t MAX_HEATER_ON_DURATIONS[8] = {// PLOC PROC board
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
static constexpr uint32_t DEFAULT_MAX_HEATER_ON_DURATION_MS = 60 * 60 * 1000;
|
||||
static constexpr uint32_t MAX_HEATER_ON_DURATIONS_MS[8] = {// PLOC PROC board
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// PCDU PDU
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// ACS Board
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// OBC Board
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// Camera
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// STR
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// DRO
|
||||
MAX_HEATER_ON_DURATION_MS,
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS,
|
||||
// S-Band
|
||||
MAX_HEATER_ON_DURATION_MS};
|
||||
DEFAULT_MAX_HEATER_ON_DURATION_MS};
|
||||
|
||||
ThermalController(object_id_t objectId, HeaterHandler& heater,
|
||||
const std::atomic_bool& tcsBoardShortUnavailable, bool pollPcdu1Tmp);
|
||||
|
@ -100,6 +100,8 @@ static constexpr Event MGT_OVERHEATING = MAKE_EVENT(8, severity::HIGH);
|
||||
static constexpr Event TCS_SWITCHING_HEATER_ON = MAKE_EVENT(9, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] P1: Module index. P2: Heater index
|
||||
static constexpr Event TCS_SWITCHING_HEATER_OFF = MAKE_EVENT(10, severity::INFO);
|
||||
//! [EXPORT] : [COMMENT] P1: Heater index. P2: Maximum burn time for heater.
|
||||
static constexpr Event TCS_HEATER_MAX_BURN_TIME_REACHED = MAKE_EVENT(11, severity::MEDIUM);
|
||||
|
||||
enum SetId : uint32_t {
|
||||
SENSOR_TEMPERATURES = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user