that is annoying
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-06-28 13:35:38 +02:00
parent eb27ab4bb0
commit 4c63fed69d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -246,12 +246,13 @@ 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) {
uint32_t currenRate = ptmeConfig.getRate();
// 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))) {
(((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_LOW) and
(currenRate != RATE_100KBPS))) or
((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_HIGH) and
(currenRate != RATE_500KBPS))))) {
initPtmeUpdateAfterXCycles();
updateContext.enableTransmitAfterPtmeUpdate = true;
updateContext.updateClockRate = true;