mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T730, pass PTT key events to client
* currently passing from context to client, so context and client know the state * PTT enum in own file so it can be reused
This commit is contained in:
committed by
Mat Sutcliffe
parent
acde5e4f01
commit
e21fdeb039
@@ -456,7 +456,7 @@ namespace BlackCore
|
||||
|
||||
// changed not yet used, but I keep it for debugging
|
||||
// changedVoiceRooms called by connectionStatusChanged;
|
||||
Q_UNUSED(changed);
|
||||
Q_UNUSED(changed)
|
||||
}
|
||||
|
||||
CCallsignSet CContextAudio::getRoomCallsigns(CComSystem::ComUnit comUnitValue) const
|
||||
@@ -556,7 +556,7 @@ namespace BlackCore
|
||||
|
||||
bool CContextAudio::parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator)
|
||||
{
|
||||
Q_UNUSED(originator);
|
||||
Q_UNUSED(originator)
|
||||
if (commandLine.isEmpty()) { return false; }
|
||||
CSimpleCommandParser parser(
|
||||
{
|
||||
@@ -585,8 +585,12 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
void CContextAudio::setVoiceTransmission(bool enable, COM com)
|
||||
void CContextAudio::setVoiceTransmission(bool enable, PTTCOM com)
|
||||
{
|
||||
m_voiceClient.setPttForCom(enable, com);
|
||||
|
||||
/**
|
||||
|
||||
// first apporach of T609 multiple COM
|
||||
QSharedPointer<IVoiceChannel> voiceChannelCom = nullptr;
|
||||
CComSystem::ComUnit usedUnit = CComSystem::Com1;
|
||||
@@ -614,6 +618,8 @@ namespace BlackCore
|
||||
m_audioMixer->removeMixerConnection(IAudioMixer::InputMicrophone, mixerOutputPort);
|
||||
}
|
||||
|
||||
**/
|
||||
|
||||
/** fixme KB 201908 to be removed if the above works
|
||||
if (!m_voiceChannelMapping.contains(CComSystem::Com1)) { return; }
|
||||
QSharedPointer<IVoiceChannel> voiceChannelCom1 = m_voiceChannelMapping.value(CComSystem::Com1);
|
||||
@@ -650,7 +656,7 @@ namespace BlackCore
|
||||
IVoiceChannel::ConnectionStatus oldStatus,
|
||||
IVoiceChannel::ConnectionStatus newStatus)
|
||||
{
|
||||
Q_UNUSED(oldStatus);
|
||||
Q_UNUSED(oldStatus)
|
||||
|
||||
switch (newStatus)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/input/actionhotkeydefs.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
@@ -121,15 +122,6 @@ namespace BlackCore
|
||||
CContextAudio *registerWithDBus(BlackMisc::CDBusServer *server);
|
||||
|
||||
private:
|
||||
//! Voice COM channel
|
||||
enum COM
|
||||
{
|
||||
COM1,
|
||||
COM2,
|
||||
COMActive,
|
||||
COMUnspecified
|
||||
};
|
||||
|
||||
BlackMisc::Audio::CVoiceRoomList getComVoiceRooms() const;
|
||||
BlackMisc::Audio::CVoiceRoomList getComVoiceRoomsWithAudioStatus() const;
|
||||
bool canTalk() const;
|
||||
@@ -146,7 +138,7 @@ namespace BlackCore
|
||||
void onConnectionStatusChanged(IVoiceChannel::ConnectionStatus oldStatus, IVoiceChannel::ConnectionStatus newStatus);
|
||||
|
||||
//! Enable/disable voice transmission, nornally used with hotkey @{
|
||||
void setVoiceTransmission(bool enable, COM com);
|
||||
void setVoiceTransmission(bool enable, BlackMisc::Audio::PTTCOM com);
|
||||
void setVoiceTransmissionCom1(bool enabled);
|
||||
void setVoiceTransmissionCom2(bool enabled);
|
||||
void setVoiceTransmissionComActive(bool enabled);
|
||||
|
||||
Reference in New Issue
Block a user