refs #288, made setFrequency methods virtual

* rounding in setFrequency of com system
* minor fixes in com/modulator
This commit is contained in:
Klaus Basan
2014-11-10 20:40:56 +01:00
committed by Roland Winklmeier
parent 89806e69ce
commit d6cc6e3dd3
3 changed files with 45 additions and 13 deletions

View File

@@ -30,20 +30,44 @@ namespace BlackMisc
CComSystem::isValidMilitaryFrequency(this->getFrequencyStandby()));
}
/*
* COM frequency
*/
void CComSystem::setFrequencyActiveMHz(double frequencyMHz)
{
CFrequency f(frequencyMHz, CFrequencyUnit::MHz());
if (f == this->getFrequencyActive()) return; // save all the comparisons / rounding
CComSystem::roundToChannelSpacing(f, this->m_channelSpacing);
this->CModulator::setFrequencyActive(f);
this->setFrequencyActive(f);
}
/*
* COM frequency
*/
void CComSystem::setFrequencyStandbyMHz(double frequencyMHz)
{
CFrequency f(frequencyMHz, CFrequencyUnit::MHz());
if (f == this->getFrequencyStandby()) return; // save all the comparisons / rounding
CComSystem::roundToChannelSpacing(f, this->m_channelSpacing);
CModulator::setFrequencyStandby(f);
this->setFrequencyStandby(f);
}
/*
* COM frequency
*/
void CComSystem::setFrequencyActive(const CFrequency &frequency)
{
if (frequency == this->getFrequencyActive()) { return; } // save all the comparisons / rounding
CFrequency fRounded(frequency);
roundToChannelSpacing(fRounded, this->m_channelSpacing);
this->CModulator::setFrequencyActive(fRounded);
}
/*
* COM frequency
*/
void CComSystem::setFrequencyStandby(const CFrequency &frequency)
{
if (frequency == this->getFrequencyStandby()) { return; } // save all the comparisons / rounding
CFrequency fRounded(frequency);
roundToChannelSpacing(fRounded, this->m_channelSpacing);
this->CModulator::setFrequencyStandby(fRounded);
}
/*