seems to work now
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details

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;
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(&currentTime);

View File

@ -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;

View File

@ -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

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