mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
This commit is contained in:
committed by
Mathew Sutcliffe
parent
e7c31fbe20
commit
ff5cf5ea4a
@@ -173,7 +173,7 @@ namespace BlackCore
|
||||
CStatusMessageList msgs;
|
||||
if (this->m_network->isConnected())
|
||||
{
|
||||
msgs.push_back(CStatusMessage(CStatusMessage::TypeTrafficNetwork, CStatusMessage::SeverityError, "Cannot set plane info, network already connected"));
|
||||
msgs.push_back(CStatusMessage(CStatusMessage::TypeTrafficNetwork, CStatusMessage::SeverityError, "Cannot set aircraft info, network already connected"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -138,37 +138,25 @@ namespace BlackCore
|
||||
*/
|
||||
virtual void updateOwnCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder);
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::getOwnAircraft()
|
||||
*/
|
||||
//! \copydoc IContextNetwork::getOwnAircraft()
|
||||
virtual BlackMisc::Aviation::CAircraft getOwnAircraft() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::sendTextMessages()
|
||||
*/
|
||||
//! \copydoc IContextNetwork::sendTextMessages()
|
||||
virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages);
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::getMetar()
|
||||
*/
|
||||
//! \copydoc IContextNetwork::getMetar()
|
||||
virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode);
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::getSelectedVoiceRooms()
|
||||
*/
|
||||
//! \copydoc IContextNetwork::getSelectedVoiceRooms()
|
||||
virtual BlackMisc::Voice::CVoiceRoomList getSelectedVoiceRooms() const;
|
||||
|
||||
//! \copydoc IContextNetwork::getSelectedAtcStations
|
||||
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::getUsers()
|
||||
*/
|
||||
//! \copydoc IContextNetwork::getUsers()
|
||||
virtual BlackMisc::Network::CUserList getUsers() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IContextNetwork::getUsersForCallsigns
|
||||
*/
|
||||
//! \copydoc IContextNetwork::getUsersForCallsigns
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -48,8 +48,9 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
|
||||
//! ComUnit
|
||||
/*! IVoiceClient currently supports two different com units */
|
||||
/*!
|
||||
* \brief IVoice currently supports two different com units
|
||||
*/
|
||||
enum ComUnit
|
||||
{
|
||||
COM1 = 0, /*!< ComUnit 1 */
|
||||
@@ -85,7 +86,7 @@ namespace BlackCore
|
||||
|
||||
/************************************************
|
||||
* SETUP TESTS
|
||||
* *********************************************/
|
||||
***********************************************/
|
||||
|
||||
/*!
|
||||
* \brief Runs a 5 seconds test, measuring your background noise.
|
||||
@@ -183,7 +184,6 @@ namespace BlackCore
|
||||
|
||||
/*!
|
||||
* \brief Get voice room callsings
|
||||
* \param comUnit
|
||||
* \return
|
||||
*/
|
||||
virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns(const ComUnit comUnit) const = 0;
|
||||
@@ -225,11 +225,20 @@ namespace BlackCore
|
||||
* \brief Audio for given unit started
|
||||
*/
|
||||
void audioStarted(const ComUnit comUnit);
|
||||
|
||||
/*!
|
||||
* \brief Audio for given unit stopped
|
||||
*/
|
||||
void audioStopped(const ComUnit comUnit);
|
||||
|
||||
/*!
|
||||
* \brief Audio started
|
||||
*/
|
||||
void globalAudioStarted();
|
||||
|
||||
/*!
|
||||
* \brief Audio stopped
|
||||
*/
|
||||
void globalAudioStopped();
|
||||
|
||||
// Test signals
|
||||
@@ -237,6 +246,7 @@ namespace BlackCore
|
||||
* \brief Squelch test completed
|
||||
*/
|
||||
void squelchTestFinished();
|
||||
|
||||
/*!
|
||||
* \brief Microphone test completed
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
namespace BlackCore
|
||||
{
|
||||
/*!
|
||||
* Vatlib implementation of the IVoiceClient interface.
|
||||
* Vatlib implementation of the IVoice interface.
|
||||
*/
|
||||
class CVoiceVatlib : public IVoice
|
||||
{
|
||||
@@ -49,20 +49,49 @@ namespace BlackCore
|
||||
// TODO: Vatlib supports multiple output devices. That basically means, you could connect
|
||||
// to different voice rooms and send their audio to different devices, e.g. ATIS to loudspeakers
|
||||
// and ATC to headspeakers. Is not important to implement that now, if ever.
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::audioDevices()
|
||||
*/
|
||||
virtual const BlackMisc::Voice::CAudioDeviceList &audioDevices() const ;
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::defaultAudioInputDevice()
|
||||
*/
|
||||
virtual const BlackMisc::Voice::CAudioDevice defaultAudioInputDevice() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::defaultAudioOutputDevice()
|
||||
*/
|
||||
virtual const BlackMisc::Voice::CAudioDevice defaultAudioOutputDevice() const;
|
||||
|
||||
/************************************************
|
||||
* SETUP TESTS
|
||||
* *********************************************/
|
||||
|
||||
// Mic tests
|
||||
/*!
|
||||
* \copydoc IVoice::runSquelchTest
|
||||
*/
|
||||
virtual void runSquelchTest();
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::runMicTest
|
||||
*/
|
||||
virtual void runMicTest();
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::inputSquelch
|
||||
*/
|
||||
virtual float inputSquelch() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::micTestResult()
|
||||
*/
|
||||
virtual qint32 micTestResult() const;
|
||||
|
||||
/*!
|
||||
* \copydoc IVoice::micTestResultAsString
|
||||
*/
|
||||
virtual QString micTestResultAsString() const;
|
||||
|
||||
public slots:
|
||||
@@ -145,7 +174,7 @@ namespace BlackCore
|
||||
virtual void switchAudioOutput(const ComUnit comUnit, bool enable);
|
||||
|
||||
/*!
|
||||
* \brief Muted?
|
||||
* \copydoc IVoice::isMuted
|
||||
*/
|
||||
virtual bool isMuted() const
|
||||
{
|
||||
@@ -197,7 +226,9 @@ namespace BlackCore
|
||||
void onEndFindSquelch();
|
||||
void onEndMicTest();
|
||||
|
||||
// slot to handle users
|
||||
/*!
|
||||
* \brief User (identified by callsign) joined or left voice room
|
||||
*/
|
||||
void onUserJoinedLeft(const ComUnit comUnit);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user