QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4LogControl.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7SettingsGroupLayout {
8 Layout.fillWidth: true
9 heading: qsTr("MAVLink 2.0 Logging (PX4 Pro Only)")
10 visible: QGroundControl.corePlugin.options.showPX4LogTransferOptions && _isPX4
11
12 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
13 property bool _isPX4: _activeVehicle ? _activeVehicle.px4Firmware : true
14 property var _mavlinkLogManager: _activeVehicle ? _activeVehicle.mavlinkLogManager : null
15 property bool _disableDataPersistence: QGroundControl.settingsManager.appSettings.disableAllPersistence.rawValue
16
17 RowLayout {
18 Layout.fillWidth: true
19 spacing: ScreenTools.defaultFontPixelWidth
20
21 QGCLabel {
22 text: qsTr("Manual Start/Stop:")
23 Layout.fillWidth: true
24 }
25
26 QGCButton {
27 text: qsTr("Start Logging")
28 enabled: _mavlinkLogManager && !_mavlinkLogManager.logRunning && _mavlinkLogManager.canStartLog && !_disableDataPersistence
29 onClicked: _mavlinkLogManager.startLogging()
30 }
31
32 QGCButton {
33 text: qsTr("Stop Logging")
34 enabled: _mavlinkLogManager && _mavlinkLogManager.logRunning && !_disableDataPersistence
35 onClicked: _mavlinkLogManager.stopLogging()
36 }
37 }
38
39 QGCCheckBoxSlider {
40 Layout.fillWidth: true
41 text: qsTr("Enable automatic logging")
42 checked: _mavlinkLogManager ? _mavlinkLogManager.enableAutoStart : false
43 enabled: !_disableDataPersistence
44 onClicked: _mavlinkLogManager.enableAutoStart = checked
45 }
46}