mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
COM audio did not tune in (voice room) if channel was already selected at startup
Reason was: hardcoded channel spacing to 8.33kHz As a result changed to channel spacing based on COM unit, which could also be changed at runtime * the issue itself was in own aircraft context * added functions for channel spacing * changed to COM unit channel spacing (instead of hardcoded spacing)
This commit is contained in:
@@ -22,6 +22,7 @@ using namespace BlackMisc::Audio;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Math;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackCore::Context;
|
||||
using namespace BlackGui::Components;
|
||||
|
||||
namespace BlackGui
|
||||
@@ -90,7 +91,7 @@ namespace BlackGui
|
||||
return msgs;
|
||||
}
|
||||
|
||||
void CCockpitComForm::setVoiceRoomStatus(const Audio::CVoiceRoomList &selectedVoiceRooms)
|
||||
void CCockpitComForm::setVoiceRoomStatus(const CVoiceRoomList &selectedVoiceRooms)
|
||||
{
|
||||
Q_ASSERT_X(selectedVoiceRooms.size() == 2, Q_FUNC_INFO, "Expect 2 voice rooms");
|
||||
const CVoiceRoom room1 = selectedVoiceRooms[0];
|
||||
@@ -229,7 +230,7 @@ namespace BlackGui
|
||||
ui->ds_ComPanelCom2Standby->setValue(freq);
|
||||
}
|
||||
|
||||
this->updateIntegrateFromSimulatorContext();
|
||||
this->updateIntegratedFlagFromSimulatorContext();
|
||||
this->updateActiveCOMUnitLEDs(m_integratedWithSim, com1.isSendEnabled(), com1.isReceiveEnabled(), com2.isSendEnabled(), com2.isReceiveEnabled());
|
||||
}
|
||||
|
||||
@@ -313,7 +314,7 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CCockpitComForm::updateIntegrateFromSimulatorContext()
|
||||
void CCockpitComForm::updateIntegratedFlagFromSimulatorContext()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextSimulator())
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace BlackGui
|
||||
void updateActiveCOMUnitLEDs(bool integratedWithSim, bool com1S, bool com1R, bool com2S, bool com2R);
|
||||
|
||||
//! Update from simulator context
|
||||
void updateIntegrateFromSimulatorContext();
|
||||
void updateIntegratedFlagFromSimulatorContext();
|
||||
|
||||
//! Compare 2 frequencies (consider epsilon)
|
||||
static bool isFrequenceEqual(double f1, double f2);
|
||||
|
||||
Reference in New Issue
Block a user