logic tweak
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Robin Müller 2023-01-26 16:33:11 +01:00
parent 311c2e947a
commit 693613037a
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 11 additions and 7 deletions

View File

@ -25,7 +25,7 @@ void SyrlinksHandler::doStartUp() {
}
if (internalState == InternalState::ENABLE_TEMPERATURE_PROTECTION) {
if (commandExecuted) {
// Got to normal mode immediately and disable transmitter on startup.
// Go to normal mode immediately and disable transmitter on startup.
setMode(_MODE_TO_NORMAL);
internalState = InternalState::IDLE;
commandExecuted = false;
@ -35,13 +35,17 @@ void SyrlinksHandler::doStartUp() {
void SyrlinksHandler::doShutDown() {
// In any case, always disable TX first.
internalState = InternalState::SET_TX_STANDBY;
commandExecuted = false;
if (commandExecuted) {
temperatureSet.setValidity(false, true);
internalState = InternalState::OFF;
if (internalState != InternalState::SET_TX_STANDBY) {
internalState = InternalState::SET_TX_STANDBY;
commandExecuted = false;
setMode(_MODE_POWER_DOWN);
}
if (internalState == InternalState::SET_TX_STANDBY) {
if (commandExecuted) {
temperatureSet.setValidity(false, true);
internalState = InternalState::OFF;
commandExecuted = false;
setMode(_MODE_POWER_DOWN);
}
}
}