mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
refactor: Remove unused PTT enum
Currently, the PTT can only be activated on the active frequency anyway.
This commit is contained in:
@@ -672,13 +672,6 @@ namespace BlackCore::Afv::Clients
|
||||
|
||||
void CAfvClient::setPtt(bool active)
|
||||
{
|
||||
this->setPttForCom(active, COMUnspecified);
|
||||
}
|
||||
|
||||
void CAfvClient::setPttForCom(bool active, PTTCOM com)
|
||||
{
|
||||
Q_UNUSED(com)
|
||||
|
||||
if (!m_isStarted)
|
||||
{
|
||||
CLogMessage(this).info(u"Voice client not started");
|
||||
@@ -708,7 +701,7 @@ namespace BlackCore::Afv::Clients
|
||||
**/
|
||||
}
|
||||
|
||||
emit this->ptt(active, com, this->identifier());
|
||||
emit this->ptt(active, this->identifier());
|
||||
}
|
||||
|
||||
double CAfvClient::getInputVolumeDb() const
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "blacksound/sampleprovider/volumesampleprovider.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/audio/audiosettings.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/logcategories.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
@@ -205,12 +204,9 @@ namespace BlackCore::Afv::Clients
|
||||
//! \threadsafe
|
||||
void updateFromOwnAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, bool withSignals = true);
|
||||
|
||||
//! @{
|
||||
//! Push to talk
|
||||
//! \threadsafe
|
||||
Q_INVOKABLE void setPtt(bool active);
|
||||
void setPttForCom(bool active, BlackMisc::Audio::PTTCOM com);
|
||||
//! @}
|
||||
|
||||
//! @{
|
||||
//! Loopback
|
||||
@@ -298,7 +294,7 @@ namespace BlackCore::Afv::Clients
|
||||
void updatedFromOwnAircraftCockpit();
|
||||
|
||||
//! PTT status in this particular AFV client
|
||||
void ptt(bool active, BlackMisc::Audio::PTTCOM pttcom, const BlackMisc::CIdentifier &identifier);
|
||||
void ptt(bool active, const BlackMisc::CIdentifier &identifier);
|
||||
|
||||
//! @{
|
||||
//! VU levels
|
||||
|
||||
@@ -535,15 +535,10 @@ namespace BlackCore::Context
|
||||
return m_voiceClient->isLoopback();
|
||||
}
|
||||
|
||||
void CContextAudioBase::setVoiceTransmission(bool enable, PTTCOM com)
|
||||
void CContextAudioBase::setVoiceTransmission(bool enable)
|
||||
{
|
||||
if (!m_voiceClient) { return; }
|
||||
m_voiceClient->setPttForCom(enable, com);
|
||||
}
|
||||
|
||||
void CContextAudioBase::setVoiceTransmissionComActive(bool enabled)
|
||||
{
|
||||
this->setVoiceTransmission(enabled, COMActive);
|
||||
m_voiceClient->setPtt(enable);
|
||||
}
|
||||
|
||||
void CContextAudioBase::changeDeviceSettings()
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/audio/audiosettings.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
@@ -280,7 +279,7 @@ namespace BlackCore
|
||||
void stoppedAudio();
|
||||
|
||||
//! PTT in voice client received
|
||||
void ptt(bool active, BlackMisc::Audio::PTTCOM pttcom, const BlackMisc::CIdentifier &identifier);
|
||||
void ptt(bool active, const BlackMisc::CIdentifier &identifier);
|
||||
|
||||
/*
|
||||
* Workaround those must be invisible for DBus
|
||||
@@ -309,11 +308,8 @@ namespace BlackCore
|
||||
//! Terminate the voice client
|
||||
void terminateVoiceClient();
|
||||
|
||||
//! @{
|
||||
//! Enable/disable voice transmission, nornally used with hotkey
|
||||
void setVoiceTransmission(bool enable, BlackMisc::Audio::PTTCOM com);
|
||||
void setVoiceTransmissionComActive(bool enabled);
|
||||
//! @}
|
||||
//! Enable/disable voice transmission, normally used with hotkey
|
||||
void setVoiceTransmission(bool enable);
|
||||
|
||||
//! Change the device settings
|
||||
void changeDeviceSettings();
|
||||
@@ -340,7 +336,7 @@ namespace BlackCore
|
||||
//! AFV client authentication failed
|
||||
void onAfvConnectionFailure(const BlackMisc::CStatusMessage &msg);
|
||||
|
||||
CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::Input::pttHotkeyIcon(), this, &CContextAudioBase::setVoiceTransmissionComActive };
|
||||
CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::Input::pttHotkeyIcon(), this, &CContextAudioBase::setVoiceTransmission };
|
||||
CActionBind m_actionAudioVolumeIncrease { BlackMisc::Input::audioVolumeIncreaseHotkeyAction(), BlackMisc::Input::audioVolumeIncreaseHotkeyIcon(), this, &CContextAudioBase::audioIncreaseVolume };
|
||||
CActionBind m_actionAudioVolumeDecrease { BlackMisc::Input::audioVolumeDecreaseHotkeyAction(), BlackMisc::Input::audioVolumeDecreaseHotkeyIcon(), this, &CContextAudioBase::audioDecreaseVolume };
|
||||
CActionBind m_actionAudioVolumeIncreaseCom1 { BlackMisc::Input::audioVolumeIncreaseCom1HotkeyAction(), BlackMisc::Input::audioVolumeIncreaseHotkeyIcon(), this, &CContextAudioBase::audioIncreaseVolumeCom1 };
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "blackcore/context/contextaudioproxy.h"
|
||||
#include "blackcore/afv/clients/afvclient.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/genericdbusinterface.h"
|
||||
|
||||
Reference in New Issue
Block a user