From a0f0c31a7f633ec37a334f07e7ae21ddc06388c4 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Fri, 20 Jun 2014 12:30:18 +0200 Subject: [PATCH] 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. --- src/blackgui/cockpitv1component.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blackgui/cockpitv1component.cpp b/src/blackgui/cockpitv1component.cpp index 043f65a08..54a70290e 100644 --- a/src/blackgui/cockpitv1component.cpp +++ b/src/blackgui/cockpitv1component.cpp @@ -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); }