Fix GUI cockpit component bug due to wrong frequency unit.

X-Plane is using kHz for COM frequencies, hence the default unit
was kHz. But the GUI cockpit component expects Mhz.
This commit is contained in:
Roland Winklmeier
2014-06-20 12:30:18 +02:00
parent 325af5b174
commit a0f0c31a7f

View File

@@ -231,19 +231,19 @@ namespace BlackGui
void CCockpitV1Component::updateComFrequencyDisplaysFromObjects(const CComSystem &com1, const CComSystem &com2)
{
double freq = com1.getFrequencyActive().valueRounded(3);
double freq = com1.getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3);
if (freq != this->ui->ds_CockpitCom1Active->value())
this->ui->ds_CockpitCom1Active->setValue(freq);
freq = com2.getFrequencyActive().valueRounded(3);
freq = com2.getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3);
if (freq != this->ui->ds_CockpitCom2Active->value())
this->ui->ds_CockpitCom2Active->setValue(freq);
freq = com1.getFrequencyStandby().valueRounded(3);
freq = com1.getFrequencyStandby().valueRounded(CFrequencyUnit::MHz(), 3);
if (freq != this->ui->ds_CockpitCom1Standby->value())
this->ui->ds_CockpitCom1Standby->setValue(freq);
freq = com2.getFrequencyStandby().valueRounded(3);
freq = com2.getFrequencyStandby().valueRounded(CFrequencyUnit::MHz(), 3);
if (freq != this->ui->ds_CockpitCom2Standby->value())
this->ui->ds_CockpitCom2Standby->setValue(freq);
}