[AFV] Displayed sync. (integrated with COM unit) flag in cockpit

This commit is contained in:
Klaus Basan
2020-03-25 00:33:34 +01:00
committed by Mat Sutcliffe
parent 1b2f470cd6
commit 7d4e897b88
7 changed files with 47 additions and 11 deletions

View File

@@ -144,7 +144,13 @@ namespace BlackCore
}
const bool integrated = sApp->getIContextSimulator()->getSimulatorSettings().isComIntegrated();
const bool changed = integrated != m_integratedComUnit;
m_integratedComUnit = integrated;
if (changed)
{
emit this->updatedFromOwnAircraftCockpit();
}
}
void CAfvClient::connectTo(const QString &cid, const QString &password, const QString &callsign, const QString &client)

View File

@@ -129,6 +129,10 @@ namespace BlackCore
void restartAudio();
//! @}
//! Is integrated with COM unit
//! \threadsafe
bool isComUnitIntegrated() const { return m_integratedComUnit; }
//! The device's volume 0..1 @{
double getDeviceInputVolume() const;
bool setDeviceInputVolume(double volume);

View File

@@ -305,6 +305,11 @@ namespace BlackCore
return m_voiceClient && m_voiceClient->isStarted();
}
bool CContextAudioBase::isComUnitIntegrated() const
{
return m_voiceClient && m_voiceClient->isComUnitIntegrated();
}
const QList<QCommandLineOption> &CContextAudioBase::getCmdLineOptions()
{
static const QList<QCommandLineOption> opts

View File

@@ -218,6 +218,9 @@ namespace BlackCore
//! Is audio enabled?
bool isAudioEnabled() const { return m_voiceClient; }
//! Integrated with COM unit?
bool isComUnitIntegrated() const;
//! \todo WORKAROUND to hide the "local signals"
Afv::Clients::CAfvClient *afvClient() const { return m_voiceClient; }
@@ -280,7 +283,7 @@ namespace BlackCore
/** Workaround those must be invisible for DBus
//! VU levels @{
void inputVolumePeakVU(double value);
void inputVolumePeakVU (double value);
void outputVolumePeakVU(double value);
//! @}
@@ -290,7 +293,7 @@ namespace BlackCore
//! Client updated from own aicraft data
void updatedFromOwnAircraftCockpit();
Workaround **/
** Workaround **/
// ------------ local signals -------