Unverified Commit 856a4c13 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7053 from DonLakeFlyer/MavlinkStreamsArduPilot

ArduPilot option to not start mavlink streams
parents 1c9bb52e b5d40d3c
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "MissionManager.h" #include "MissionManager.h"
#include "ParameterManager.h" #include "ParameterManager.h"
#include "QGCFileDownload.h" #include "QGCFileDownload.h"
#include "SettingsManager.h"
#include "AppSettings.h"
#include <QTcpSocket> #include <QTcpSocket>
...@@ -641,8 +643,10 @@ void APMFirmwarePlugin::initializeVehicle(Vehicle* vehicle) ...@@ -641,8 +643,10 @@ void APMFirmwarePlugin::initializeVehicle(Vehicle* vehicle)
break; break;
} }
} else { } else {
// Streams are not started automatically on APM stack if (qgcApp()->toolbox()->settingsManager()->appSettings()->apmStartMavlinkStreams()->rawValue().toBool()) {
initializeStreamRates(vehicle); // Streams are not started automatically on APM stack (sort of)
initializeStreamRates(vehicle);
}
} }
} }
......
...@@ -199,5 +199,11 @@ ...@@ -199,5 +199,11 @@
"enumStrings": "Never,Always,When in Follow Me Flight Mode", "enumStrings": "Never,Always,When in Follow Me Flight Mode",
"enumValues": "0,1,2", "enumValues": "0,1,2",
"defaultValue": 0 "defaultValue": 0
},
{
"name": "apmStartMavlinkStreams",
"shortDescription": "Request start of MAVLink telemetry streams (ArduPilot only)",
"type": "bool",
"defaultValue": true
} }
] ]
...@@ -84,6 +84,7 @@ DECLARE_SETTINGSFACT(AppSettings, esriToken) ...@@ -84,6 +84,7 @@ DECLARE_SETTINGSFACT(AppSettings, esriToken)
DECLARE_SETTINGSFACT(AppSettings, defaultFirmwareType) DECLARE_SETTINGSFACT(AppSettings, defaultFirmwareType)
DECLARE_SETTINGSFACT(AppSettings, gstDebugLevel) DECLARE_SETTINGSFACT(AppSettings, gstDebugLevel)
DECLARE_SETTINGSFACT(AppSettings, followTarget) DECLARE_SETTINGSFACT(AppSettings, followTarget)
DECLARE_SETTINGSFACT(AppSettings, apmStartMavlinkStreams)
DECLARE_SETTINGSFACT_NO_FUNC(AppSettings, indoorPalette) DECLARE_SETTINGSFACT_NO_FUNC(AppSettings, indoorPalette)
{ {
......
...@@ -44,6 +44,9 @@ public: ...@@ -44,6 +44,9 @@ public:
DEFINE_SETTINGFACT(gstDebugLevel) DEFINE_SETTINGFACT(gstDebugLevel)
DEFINE_SETTINGFACT(followTarget) DEFINE_SETTINGFACT(followTarget)
// Although this is a global setting it only affects ArduPilot vehicle since PX4 automatically starts the stream from the vehicle side
DEFINE_SETTINGFACT(apmStartMavlinkStreams)
Q_PROPERTY(QString missionSavePath READ missionSavePath NOTIFY savePathsChanged) Q_PROPERTY(QString missionSavePath READ missionSavePath NOTIFY savePathsChanged)
Q_PROPERTY(QString parameterSavePath READ parameterSavePath NOTIFY savePathsChanged) Q_PROPERTY(QString parameterSavePath READ parameterSavePath NOTIFY savePathsChanged)
Q_PROPERTY(QString telemetrySavePath READ telemetrySavePath NOTIFY savePathsChanged) Q_PROPERTY(QString telemetrySavePath READ telemetrySavePath NOTIFY savePathsChanged)
......
...@@ -15,6 +15,7 @@ import QtQuick.Dialogs 1.2 ...@@ -15,6 +15,7 @@ import QtQuick.Dialogs 1.2
import QGroundControl 1.0 import QGroundControl 1.0
import QGroundControl.FactSystem 1.0 import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
import QGroundControl.MultiVehicleManager 1.0 import QGroundControl.MultiVehicleManager 1.0
...@@ -132,8 +133,7 @@ Rectangle { ...@@ -132,8 +133,7 @@ Rectangle {
} }
} }
} }
//-----------------------------------------------------------------
//-- Mavlink Heartbeats
QGCCheckBox { QGCCheckBox {
text: qsTr("Emit heartbeat") text: qsTr("Emit heartbeat")
checked: QGroundControl.multiVehicleManager.gcsHeartBeatEnabled checked: QGroundControl.multiVehicleManager.gcsHeartBeatEnabled
...@@ -141,8 +141,12 @@ Rectangle { ...@@ -141,8 +141,12 @@ Rectangle {
QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked QGroundControl.multiVehicleManager.gcsHeartBeatEnabled = checked
} }
} }
//-----------------------------------------------------------------
//-- Mavlink Version Check FactCheckBox {
text: fact.shortDescription
fact: QGroundControl.settingsManager.appSettings.apmStartMavlinkStreams
}
QGCCheckBox { QGCCheckBox {
text: qsTr("Only accept MAVs with same protocol version") text: qsTr("Only accept MAVs with same protocol version")
checked: QGroundControl.isVersionCheckEnabled checked: QGroundControl.isVersionCheckEnabled
......
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