Commit a5f7a9e8 authored by Lorenz Meier's avatar Lorenz Meier

Merge branch 'master' of github.com:mavlink/qgroundcontrol into config

parents 18149033 d36eca90
This diff is collapsed.
...@@ -59,10 +59,21 @@ This file is part of the PIXHAWK project ...@@ -59,10 +59,21 @@ This file is part of the PIXHAWK project
extern "C" { extern "C" {
cst_voice *REGISTER_VOX(const char *voxdir); cst_voice *REGISTER_VOX(const char *voxdir);
void UNREGISTER_VOX(cst_voice *vox); void UNREGISTER_VOX(cst_voice *vox);
cst_voice* register_cmu_us_kal16(const char *voxdir); cst_voice *register_cmu_us_kal16(const char *voxdir);
} }
#endif #endif
#if _MSC_VER
// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override something,
//but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>
#include <sapi.h>
#endif
/** /**
* @brief Audio Output (speech synthesizer and "beep" output) * @brief Audio Output (speech synthesizer and "beep" output)
* This class follows the singleton design pattern * This class follows the singleton design pattern
...@@ -73,10 +84,11 @@ class GAudioOutput : public QObject ...@@ -73,10 +84,11 @@ class GAudioOutput : public QObject
Q_OBJECT Q_OBJECT
public: public:
/** @brief Get the singleton instance */ /** @brief Get the singleton instance */
static GAudioOutput* instance(); static GAudioOutput *instance();
/** @brief List available voices */ /** @brief List available voices */
QStringList listVoices(void); QStringList listVoices(void);
enum { enum
{
VOICE_MALE = 0, VOICE_MALE = 0,
VOICE_FEMALE VOICE_FEMALE
} QGVoice; } QGVoice;
...@@ -86,7 +98,7 @@ public: ...@@ -86,7 +98,7 @@ public:
public slots: public slots:
/** @brief Say this text if current output priority matches */ /** @brief Say this text if current output priority matches */
bool say(QString text, int severity=1); bool say(QString text, int severity = 1);
/** @brief Play alert sound and say notification message */ /** @brief Play alert sound and say notification message */
bool alert(QString text); bool alert(QString text);
/** @brief Start emergency sound */ /** @brief Start emergency sound */
...@@ -115,16 +127,20 @@ protected: ...@@ -115,16 +127,20 @@ protected:
#endif #endif
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
//cst_voice* voice; ///< The flite voice object //cst_voice* voice; ///< The flite voice object
#endif
#ifdef _MSC_VER
static ISpVoice *pVoice;
#endif #endif
int voiceIndex; ///< The index of the flite voice to use (awb, slt, rms) int voiceIndex; ///< The index of the flite voice to use (awb, slt, rms)
Phonon::MediaObject* m_media; ///< The output object for audio Phonon::MediaObject *m_media; ///< The output object for audio
Phonon::AudioOutput* m_audioOutput; Phonon::AudioOutput *m_audioOutput;
bool emergency; ///< Emergency status flag bool emergency; ///< Emergency status flag
QTimer* emergencyTimer; QTimer *emergencyTimer;
bool muted; bool muted;
private: private:
GAudioOutput(QObject* parent=NULL); GAudioOutput(QObject *parent = NULL);
// ~GAudioOutput(); ~GAudioOutput();
}; };
#endif // AUDIOOUTPUT_H #endif // AUDIOOUTPUT_H
...@@ -268,6 +268,20 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) ...@@ -268,6 +268,20 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
if (decodeState == 1) if (decodeState == 1)
{ {
decodedFirstPacket = true; decodedFirstPacket = true;
if(message.msgid == MAVLINK_MSG_ID_PING)
{
// process ping requests (tgt_system and tgt_comp must be zero)
mavlink_ping_t ping;
mavlink_msg_ping_decode(&message, &ping);
if(!ping.target_system && !ping.target_component)
{
mavlink_message_t msg;
mavlink_msg_ping_pack(getSystemId(), getComponentId(), &msg, ping.time_usec, ping.seq, message.sysid, message.compid);
sendMessage(msg);
}
}
#if defined(QGC_PROTOBUF_ENABLED) #if defined(QGC_PROTOBUF_ENABLED)
if (message.msgid == MAVLINK_MSG_ID_EXTENDED_MESSAGE) if (message.msgid == MAVLINK_MSG_ID_EXTENDED_MESSAGE)
......
...@@ -22,7 +22,7 @@ public: ...@@ -22,7 +22,7 @@ public:
explicit QGCComboBox(QWidget *parent = 0); explicit QGCComboBox(QWidget *parent = 0);
~QGCComboBox(); ~QGCComboBox();
virtual void setEditMode(bool editMode) override; virtual void setEditMode(bool editMode);
public slots: public slots:
/** @brief Queue parameter for sending to the MAV (add to pending list)*/ /** @brief Queue parameter for sending to the MAV (add to pending list)*/
......
...@@ -18,7 +18,7 @@ public: ...@@ -18,7 +18,7 @@ public:
explicit QGCCommandButton(QWidget *parent = 0); explicit QGCCommandButton(QWidget *parent = 0);
~QGCCommandButton(); ~QGCCommandButton();
virtual void setEditMode(bool editMode) override; virtual void setEditMode(bool editMode);
public slots: public slots:
void sendCommand(); void sendCommand();
......
...@@ -20,7 +20,7 @@ public: ...@@ -20,7 +20,7 @@ public:
explicit QGCParamSlider(QWidget *parent = 0); explicit QGCParamSlider(QWidget *parent = 0);
~QGCParamSlider(); ~QGCParamSlider();
virtual void setEditMode(bool editMode) override; virtual void setEditMode(bool editMode);
public slots: public slots:
/** @brief Queue parameter for sending to the MAV (add to pending list)*/ /** @brief Queue parameter for sending to the MAV (add to pending list)*/
......
...@@ -19,7 +19,7 @@ public: ...@@ -19,7 +19,7 @@ public:
~QGCTextLabel(); ~QGCTextLabel();
void setActiveUAS(UASInterface *uas); void setActiveUAS(UASInterface *uas);
void enableText(int num); void enableText(int num);
virtual void setEditMode(bool editMode) override; virtual void setEditMode(bool editMode);
public slots: public slots:
void writeSettings(QSettings& settings); void writeSettings(QSettings& settings);
void readSettings(const QSettings& settings); void readSettings(const QSettings& settings);
......
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