7import QGroundControl.Controls
11 height: visible ? (rowLayout.height + (_margins * 2)) : 0
14 property real _margins: ScreenTools.defaultFontPixelHeight / 4
15 property var _logReplayLink: null
17 function pickLogFile() {
18 if (globals.activeVehicle) {
19 QGroundControl.showMessageDialog(_root, qsTr("Log Replay"), qsTr("You must close all connections prior to replaying a log."))
23 filePicker.openForLoad()
26 QGCPalette { id: qgcPal }
30 title: qsTr("Select Telemetery Log")
31 nameFilters: [ qsTr("Telemetry Logs (*.%1)").arg(_logFileExtension), qsTr("All Files (*)") ]
32 folder: QGroundControl.settingsManager.appSettings.telemetrySavePath
33 onAcceptedForLoad: (file) => {
34 controller.link = QGroundControl.linkManager.startLogReplay(file)
38 property string _logFileExtension: QGroundControl.settingsManager.appSettings.telemetryFileExtension
41 LogReplayLinkController {
44 onPercentCompleteChanged: (percentComplete) => slider.updatePercentComplete(percentComplete)
57 enabled: controller.link
58 text: controller.isPlaying ? qsTr("Pause") : qsTr("Play")
59 onClicked: controller.isPlaying = !controller.isPlaying
67 ListElement { text: "0.1"; value: 0.1 }
68 ListElement { text: "0.25"; value: 0.25 }
69 ListElement { text: "0.5"; value: 0.5 }
70 ListElement { text: "1x"; value: 1 }
71 ListElement { text: "2x"; value: 2 }
72 ListElement { text: "5x"; value: 5 }
73 ListElement { text: "10x"; value: 10 }
76 onActivated: (index) => { controller.playbackSpeed = model.get(currentIndex).value }
79 QGCLabel { text: controller.playheadTime }
83 Layout.fillWidth: true
86 enabled: controller.link
88 property bool manualUpdate: false
90 function updatePercentComplete(percentComplete) {
92 value = percentComplete
98 controller.percentComplete = value
103 QGCLabel { text: controller.totalTime }
106 text: qsTr("Load Telemetry Log")
107 onClicked: pickLogFile()
108 visible: !controller.link
114 var activeVehicle = QGroundControl.multiVehicleManager.activeVehicle
116 activeVehicle.closeVehicle()
118 QGroundControl.settingsManager.flyViewSettings.showLogReplayStatusBar.rawValue = false