seems to work now
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-07-10 18:29:55 +02:00
parent cf582dd6a4
commit fdf1c7a611
Signed by: muellerr
GPG Key ID: 407F9B00F858F270
4 changed files with 6 additions and 7 deletions

View File

@ -1816,8 +1816,7 @@ void ThermalController::heaterMaxDurationControl(
heaterStates[i].trackHeaterMaxBurnTime = false; heaterStates[i].trackHeaterMaxBurnTime = false;
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]);
heaterSwitchHelper(static_cast<heater::Switch>(i), heater::SwitchState::OFF, heaterSwitchHelper(static_cast<heater::Switch>(i), heater::SwitchState::OFF, std::nullopt);
std::nullopt);
// 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));
@ -1867,8 +1866,7 @@ void ThermalController::resetThermalStates() {
} }
} }
void ThermalController::heaterSwitchHelper(heater::Switch switchNr, void ThermalController::heaterSwitchHelper(heater::Switch switchNr, heater::SwitchState targetState,
heater::SwitchState targetState,
std::optional<unsigned> componentIdx) { std::optional<unsigned> componentIdx) {
timeval currentTime; timeval currentTime;
Clock::getClockMonotonic(&currentTime); Clock::getClockMonotonic(&currentTime);

View File

@ -40,7 +40,7 @@ struct ThermalState {
// Is heating on for that thermal module? // Is heating on for that thermal module?
bool heating = false; bool heating = false;
// Which switch is being used for heating the component // 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 // 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. // when a switch command is sent, with no guarantess that the heater actually went on.
uint32_t heaterStartTime = 0; uint32_t heaterStartTime = 0;

View File

@ -14,7 +14,8 @@ enum Switch : uint8_t {
HEATER_5_STR, HEATER_5_STR,
HEATER_6_DRO, HEATER_6_DRO,
HEATER_7_S_BAND, HEATER_7_S_BAND,
NUMBER_OF_SWITCHES NUMBER_OF_SWITCHES = 8,
HEATER_NONE = 0xff
}; };
enum SwitchState : uint8_t { ON = 1, OFF = 0 }; enum SwitchState : uint8_t { ON = 1, OFF = 0 };

2
tmtc

@ -1 +1 @@
Subproject commit ba47757b508976943f2e042a8f42673ba1424a28 Subproject commit e27ad147d4a3e8090f5a3efa18c1abbb0912a4b3