hopefully those were the last fixes
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
This commit is contained in:
parent
f2a2c73984
commit
57b41701ce
@ -62,9 +62,9 @@
|
|||||||
#include "mission/system/acs/acsModeTree.h"
|
#include "mission/system/acs/acsModeTree.h"
|
||||||
#include "mission/system/com/SyrlinksFdir.h"
|
#include "mission/system/com/SyrlinksFdir.h"
|
||||||
#include "mission/system/com/comModeTree.h"
|
#include "mission/system/com/comModeTree.h"
|
||||||
#include "mission/system/power/GomspacePowerFdir.h"
|
|
||||||
#include "mission/system/fdir/RtdFdir.h"
|
#include "mission/system/fdir/RtdFdir.h"
|
||||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||||
|
#include "mission/system/power/GomspacePowerFdir.h"
|
||||||
#include "mission/system/tree/payloadModeTree.h"
|
#include "mission/system/tree/payloadModeTree.h"
|
||||||
#include "mission/system/tree/tcsModeTree.h"
|
#include "mission/system/tree/tcsModeTree.h"
|
||||||
#include "mission/tmtc/tmFilters.h"
|
#include "mission/tmtc/tmFilters.h"
|
||||||
|
@ -28,7 +28,8 @@ void SyrlinksHandler::doStartUp() {
|
|||||||
if (commandExecuted) {
|
if (commandExecuted) {
|
||||||
// Go to normal mode immediately and disable transmitter on startup.
|
// Go to normal mode immediately and disable transmitter on startup.
|
||||||
setMode(_MODE_TO_ON);
|
setMode(_MODE_TO_ON);
|
||||||
internalState = InternalState::TX_TRANSITION;
|
internalState = InternalState::IDLE;
|
||||||
|
transState = TransitionState::IDLE;
|
||||||
commandExecuted = false;
|
commandExecuted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -761,11 +762,13 @@ void SyrlinksHandler::setDebugMode(bool enable) { this->debugMode = enable; }
|
|||||||
|
|
||||||
void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||||
Mode_t tgtMode = getBaseMode(getMode());
|
Mode_t tgtMode = getBaseMode(getMode());
|
||||||
if (transState == TransitionState::DONE) {
|
auto doneHandler = [&]() {
|
||||||
internalState = InternalState::IDLE;
|
internalState = InternalState::IDLE;
|
||||||
transState = TransitionState::IDLE;
|
transState = TransitionState::IDLE;
|
||||||
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
||||||
return;
|
};
|
||||||
|
if (transState == TransitionState::DONE) {
|
||||||
|
return doneHandler();
|
||||||
}
|
}
|
||||||
auto txStandbyHandler = [&]() {
|
auto txStandbyHandler = [&]() {
|
||||||
txDataset.setReportingEnabled(false);
|
txDataset.setReportingEnabled(false);
|
||||||
@ -777,13 +780,20 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
|||||||
txDataset.setReportingEnabled(true);
|
txDataset.setReportingEnabled(true);
|
||||||
poolManager.changeCollectionInterval(txDataset.getSid(), 10.0);
|
poolManager.changeCollectionInterval(txDataset.getSid(), 10.0);
|
||||||
poolManager.changeCollectionInterval(temperatureSet.getSid(), 5.0);
|
poolManager.changeCollectionInterval(temperatureSet.getSid(), 5.0);
|
||||||
internalState = InternalState::TX_TRANSITION;
|
|
||||||
transState = tgtTransitionState;
|
transState = tgtTransitionState;
|
||||||
|
internalState = InternalState::TX_TRANSITION;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) {
|
if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) {
|
||||||
|
// If submode has not changed, no special transition handling necessary.
|
||||||
if (getSubmode() == subModeFrom) {
|
if (getSubmode() == subModeFrom) {
|
||||||
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
return doneHandler();
|
||||||
}
|
}
|
||||||
|
// Transition is on-going, wait for it to finish.
|
||||||
|
if (transState != TransitionState::IDLE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Transition start logic.
|
||||||
switch (getSubmode()) {
|
switch (getSubmode()) {
|
||||||
case (com::Submode::RX_AND_TX_DEFAULT_DATARATE): {
|
case (com::Submode::RX_AND_TX_DEFAULT_DATARATE): {
|
||||||
auto currentDatarate = com::getCurrentDatarate();
|
auto currentDatarate = com::getCurrentDatarate();
|
||||||
@ -817,6 +827,7 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
|||||||
}
|
}
|
||||||
} else if (tgtMode == HasModesIF::MODE_OFF) {
|
} else if (tgtMode == HasModesIF::MODE_OFF) {
|
||||||
txStandbyHandler();
|
txStandbyHandler();
|
||||||
|
} else {
|
||||||
|
return doneHandler();
|
||||||
}
|
}
|
||||||
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user