fix and optimization
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
b0a38136c1
commit
eb27ab4bb0
@ -246,7 +246,12 @@ ReturnValue_t CcsdsIpCoreHandler::checkModeCommand(Mode_t mode, Submode_t submod
|
||||
void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
triggerEvent(CHANGING_MODE, mode, submode);
|
||||
if (mode == HasModesIF::MODE_ON) {
|
||||
if (this->submode != submode) {
|
||||
// Check whether the rate actually changes.
|
||||
if ((this->submode != submode) and
|
||||
((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_LOW) and
|
||||
ptmeConfig.getRate() != RATE_100KBPS)) or
|
||||
((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_HIGH) and
|
||||
ptmeConfig.getRate() != RATE_500KBPS))) {
|
||||
initPtmeUpdateAfterXCycles();
|
||||
updateContext.enableTransmitAfterPtmeUpdate = true;
|
||||
updateContext.updateClockRate = true;
|
||||
@ -255,7 +260,6 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
updateContext.setModeAfterUpdate = true;
|
||||
return;
|
||||
}
|
||||
if(ptmeConfig.setRate(bitRate))
|
||||
// No rate change, so enable transmitter right away.
|
||||
enableTransmit();
|
||||
} else if (mode == HasModesIF::MODE_OFF) {
|
||||
|
Loading…
Reference in New Issue
Block a user