Commit a9ff4d8d authored by Gus Grubba's avatar Gus Grubba

Force TTS to English (on Linux only)

Remove unnecessary AudioOutput dependencies.
parent a3b87e1f
......@@ -20,14 +20,12 @@ AudioOutput::AudioOutput(QGCApplication* app, QGCToolbox* toolbox)
: QGCTool(app, toolbox)
, _tts(new QTextToSpeech(this))
{
_tts->setLocale(QLocale::system());
//-- Force TTS engine to English as all incoming messages from the autopilot
// are in English and not localized.
#ifdef Q_OS_LINUX
_tts->setLocale(QLocale("en_US"));
#endif
connect(_tts, &QTextToSpeech::stateChanged, this, &AudioOutput::_stateChanged);
connect(qgcApp(), &QGCApplication::languageChanged, this, &AudioOutput::_languageChanged);
}
void AudioOutput::_languageChanged(const QLocale locale)
{
_tts->setLocale(locale);
}
bool AudioOutput::say(const QString& inText)
......
......@@ -33,7 +33,6 @@ public slots:
private slots:
void _stateChanged (QTextToSpeech::State state);
void _languageChanged (const QLocale locale);
protected:
QTextToSpeech* _tts;
......
......@@ -42,7 +42,6 @@
#include "QGC.h"
#include "QGCApplication.h"
#include "AudioOutput.h"
#include "CmdLineOptParser.h"
#include "UDPLink.h"
#include "LinkManager.h"
......
......@@ -28,7 +28,6 @@
#include "ParameterManager.h"
#include "QGCApplication.h"
#include "QGCImageProvider.h"
#include "AudioOutput.h"
#include "FollowMe.h"
#include "MissionCommandTree.h"
#include "QGroundControlQmlGlobal.h"
......
......@@ -26,7 +26,6 @@
#include "UAS.h"
#include "LinkInterface.h"
#include "QGC.h"
#include "AudioOutput.h"
#include "MAVLinkProtocol.h"
#include "QGCMAVLink.h"
#include "LinkManager.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment