some adaptions, heater to off seems to work
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Robin Müller 2023-04-03 14:38:00 +02:00
parent f4b47a24c0
commit a8a0299b46
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 3 additions and 6 deletions

2
fsfw

@ -1 +1 @@
Subproject commit 4f632e2c6866cee88dd9920a965aa0d079799aa3
Subproject commit e2e87b149d91c51196c76d6b84243fce1c77a28a

View File

@ -1615,15 +1615,12 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
// still check whether components are out of range, which might be important information for the
// top level control loop.
if (heaterStates[htrCtx.switchNr].switchTransition) {
sif::debug << " heater in switch transition" << std::endl;
htrCtx.doHeaterHandling = false;
heaterCtrlCheckUpperLimits(htrCtx);
} else {
// Heater off
htrCtx.switchState = heaterHandler.getSwitchState(htrCtx.switchNr);
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
// sif::debug << " heater off" << std::endl;
// TODO: check NOP limit and maybe trigger fdir
if (sensorTemp < htrCtx.tempLimit.opLowerLimit) {
heaterHandler.switchHeater(htrCtx.switchNr, HeaterHandler::SwitchState::ON);
sif::info << "ThermalController::checkLimitsAndCtrlHeater: Heater "
@ -1637,7 +1634,6 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
heaterCtrlCheckUpperLimits(htrCtx);
// Heater on
} else if (heaterHandler.getSwitchState(htrCtx.switchNr) == HeaterHandler::SwitchState::ON) {
// sif::debug << " heater on" << std::endl;
if (thermalStates[thermalComponent].heating) {
// We are already in a heating cycle, so need to check whether heating task is complete.
if (sensorTemp >= htrCtx.tempLimit.opLowerLimit + TEMP_OFFSET) {

View File

@ -292,7 +292,8 @@ void HeaterHandler::handleSwitchOnCommand(heater::Switchers heaterIdx) {
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF && heater.waitMainSwitchOn) {
// Just waiting for the main switch being set on
return;
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF) {
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF or
mainSwitchState == PowerSwitchIF::SWITCH_UNKNOWN) {
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_ON);
heater.mainSwitchCountdown.setTimeout(mainLineSwitcher->getSwitchDelayMs());
heater.waitMainSwitchOn = true;