|
|
|
@ -58,6 +58,7 @@ public:
@@ -58,6 +58,7 @@ public:
|
|
|
|
|
Q_PROPERTY(QStringList serialBaudRates READ serialBaudRates CONSTANT) |
|
|
|
|
Q_PROPERTY(QStringList serialPortStrings READ serialPortStrings NOTIFY commPortStringsChanged) |
|
|
|
|
Q_PROPERTY(QStringList serialPorts READ serialPorts NOTIFY commPortsChanged) |
|
|
|
|
Q_PROPERTY(bool mavlinkSupportForwardingEnabled READ mavlinkSupportForwardingEnabled NOTIFY mavlinkSupportForwardingEnabledChanged) |
|
|
|
|
|
|
|
|
|
/// Create/Edit Link Configuration
|
|
|
|
|
Q_INVOKABLE LinkConfiguration* createConfiguration (int type, const QString& name); |
|
|
|
@ -66,6 +67,7 @@ public:
@@ -66,6 +67,7 @@ public:
|
|
|
|
|
Q_INVOKABLE bool endConfigurationEditing (LinkConfiguration* config, LinkConfiguration* editedConfig); |
|
|
|
|
Q_INVOKABLE bool endCreateConfiguration (LinkConfiguration* config); |
|
|
|
|
Q_INVOKABLE void removeConfiguration (LinkConfiguration* config); |
|
|
|
|
Q_INVOKABLE void createMavlinkForwardingSupportLink (void); |
|
|
|
|
|
|
|
|
|
// Called to signal app shutdown. Disconnects all links while turning off auto-connect.
|
|
|
|
|
Q_INVOKABLE void shutdown(void); |
|
|
|
@ -81,6 +83,7 @@ public:
@@ -81,6 +83,7 @@ public:
|
|
|
|
|
QStringList serialBaudRates (void); |
|
|
|
|
QStringList serialPortStrings (void); |
|
|
|
|
QStringList serialPorts (void); |
|
|
|
|
bool mavlinkSupportForwardingEnabled (void) { return _mavlinkSupportForwardingEnabled; } |
|
|
|
|
|
|
|
|
|
void loadLinkConfigurationList(); |
|
|
|
|
void saveLinkConfigurationList(); |
|
|
|
@ -104,6 +107,9 @@ public:
@@ -104,6 +107,9 @@ public:
|
|
|
|
|
/// Returns pointer to the mavlink forwarding link, or nullptr if it does not exist
|
|
|
|
|
SharedLinkInterfacePtr mavlinkForwardingLink(); |
|
|
|
|
|
|
|
|
|
/// Returns pointer to the mavlink support forwarding link, or nullptr if it does not exist
|
|
|
|
|
SharedLinkInterfacePtr mavlinkForwardingSupportLink(); |
|
|
|
|
|
|
|
|
|
void disconnectAll(void); |
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG |
|
|
|
@ -136,6 +142,7 @@ public:
@@ -136,6 +142,7 @@ public:
|
|
|
|
|
signals: |
|
|
|
|
void commPortStringsChanged(); |
|
|
|
|
void commPortsChanged(); |
|
|
|
|
void mavlinkSupportForwardingEnabledChanged(); |
|
|
|
|
|
|
|
|
|
private slots: |
|
|
|
|
void _linkDisconnected (void); |
|
|
|
@ -150,6 +157,7 @@ private:
@@ -150,6 +157,7 @@ private:
|
|
|
|
|
void _addZeroConfAutoConnectLink (void); |
|
|
|
|
void _addMAVLinkForwardingLink (void); |
|
|
|
|
bool _isSerialPortConnected (void); |
|
|
|
|
void _createDynamicForwardLink (const char* linkName, QString hostName); |
|
|
|
|
|
|
|
|
|
#ifndef NO_SERIAL_LINK |
|
|
|
|
bool _portAlreadyConnected (const QString& portName); |
|
|
|
@ -190,8 +198,10 @@ private:
@@ -190,8 +198,10 @@ private:
|
|
|
|
|
|
|
|
|
|
static const char* _defaultUDPLinkName; |
|
|
|
|
static const char* _mavlinkForwardingLinkName; |
|
|
|
|
static const char* _mavlinkForwardingSupportLinkName; |
|
|
|
|
static const int _autoconnectUpdateTimerMSecs; |
|
|
|
|
static const int _autoconnectConnectDelayMSecs; |
|
|
|
|
bool _mavlinkSupportForwardingEnabled = false; |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|