5import QGroundControl.Controls
9 heading: qsTr("MAVLink 2.0 Logging (PX4 Pro Only)")
10 visible: QGroundControl.corePlugin.options.showPX4LogTransferOptions && _isPX4
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
18 Layout.fillWidth: true
19 spacing: ScreenTools.defaultFontPixelWidth
22 text: qsTr("Manual Start/Stop:")
23 Layout.fillWidth: true
27 text: qsTr("Start Logging")
28 enabled: _mavlinkLogManager && !_mavlinkLogManager.logRunning && _mavlinkLogManager.canStartLog && !_disableDataPersistence
29 onClicked: _mavlinkLogManager.startLogging()
33 text: qsTr("Stop Logging")
34 enabled: _mavlinkLogManager && _mavlinkLogManager.logRunning && !_disableDataPersistence
35 onClicked: _mavlinkLogManager.stopLogging()
40 Layout.fillWidth: true
41 text: qsTr("Enable automatic logging")
42 checked: _mavlinkLogManager ? _mavlinkLogManager.enableAutoStart : false
43 enabled: !_disableDataPersistence
44 onClicked: _mavlinkLogManager.enableAutoStart = checked