mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user