mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #288, made setFrequency methods virtual
* rounding in setFrequency of com system * minor fixes in com/modulator
This commit is contained in:
committed by
Roland Winklmeier
parent
89806e69ce
commit
d6cc6e3dd3
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user