Browse Source

Merge pull request #6306 from DonLakeFlyer/NoMobileCharts

PID Tuning: Make QtCharts usage desktop only
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
9b7cfd2582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      QGCSetup.pri
  2. 1
      qgroundcontrol.pro
  3. 122
      src/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml

1
QGCSetup.pri

@ -102,6 +102,7 @@ LinuxBuild {
# QT_INSTALL_LIBS # QT_INSTALL_LIBS
QT_LIB_LIST = \ QT_LIB_LIST = \
libQt5Charts.so.5 \
libQt5Core.so.5 \ libQt5Core.so.5 \
libQt5DBus.so.5 \ libQt5DBus.so.5 \
libQt5Gui.so.5 \ libQt5Gui.so.5 \

1
qgroundcontrol.pro

@ -240,6 +240,7 @@ AndroidBuild || iOSBuild {
QT += \ QT += \
printsupport \ printsupport \
serialport \ serialport \
charts \
} }
contains(DEFINES, QGC_ENABLE_BLUETOOTH) { contains(DEFINES, QGC_ENABLE_BLUETOOTH) {

122
src/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml

@ -28,6 +28,72 @@ SetupPage {
Column { Column {
width: availableWidth width: availableWidth
Component.onCompleted: {
showAdvanced = !ScreenTools.isMobile
}
// Standard tuning page
FactSliderPanel {
width: availableWidth
qgcViewPanel: tuningPage.viewPanel
visible: !advanced
sliderModel: ListModel {
ListElement {
title: qsTr("Hover Throttle")
description: qsTr("Adjust throttle so hover is at mid-throttle. Slide to the left if hover is lower than throttle center. Slide to the right if hover is higher than throttle center.")
param: "MPC_THR_HOVER"
min: 20
max: 80
step: 1
}
ListElement {
title: qsTr("Manual minimum throttle")
description: qsTr("Slide to the left to start the motors with less idle power. Slide to the right if descending in manual flight becomes unstable.")
param: "MPC_MANTHR_MIN"
min: 0
max: 15
step: 1
}
/*
These seem to have disappeared from PX4 firmware!
ListElement {
title: qsTr("Roll sensitivity")
description: qsTr("Slide to the left to make roll control faster and more accurate. Slide to the right if roll oscillates or is too twitchy.")
param: "MC_ROLL_TC"
min: 0.15
max: 0.25
step: 0.01
}
ListElement {
title: qsTr("Pitch sensitivity")
description: qsTr("Slide to the left to make pitch control faster and more accurate. Slide to the right if pitch oscillates or is too twitchy.")
param: "MC_PITCH_TC"
min: 0.15
max: 0.25
step: 0.01
}
*/
}
}
Loader {
anchors.left: parent.left
anchors.right: parent.right
sourceComponent: advanced ? advancePageComponent : undefined
}
Component {
id: advancePageComponent
// Advanced page
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
layoutDirection: Qt.RightToLeft
property real _chartHeight: ScreenTools.defaultFontPixelHeight * 20 property real _chartHeight: ScreenTools.defaultFontPixelHeight * 20
property real _margins: ScreenTools.defaultFontPixelHeight / 2 property real _margins: ScreenTools.defaultFontPixelHeight / 2
property string _currentTuneType: _tuneList[0] property string _currentTuneType: _tuneList[0]
@ -163,7 +229,6 @@ SetupPage {
} }
Component.onCompleted: { Component.onCompleted: {
showAdvanced = true
saveTuningParamValues() saveTuningParamValues()
} }
@ -257,60 +322,6 @@ SetupPage {
property int _maxPointCount: 10000 / interval property int _maxPointCount: 10000 / interval
} }
// Standard tuning page
FactSliderPanel {
width: availableWidth
qgcViewPanel: tuningPage.viewPanel
visible: !advanced
sliderModel: ListModel {
ListElement {
title: qsTr("Hover Throttle")
description: qsTr("Adjust throttle so hover is at mid-throttle. Slide to the left if hover is lower than throttle center. Slide to the right if hover is higher than throttle center.")
param: "MPC_THR_HOVER"
min: 20
max: 80
step: 1
}
ListElement {
title: qsTr("Manual minimum throttle")
description: qsTr("Slide to the left to start the motors with less idle power. Slide to the right if descending in manual flight becomes unstable.")
param: "MPC_MANTHR_MIN"
min: 0
max: 15
step: 1
}
/*
These seem to have disappeared from PX4 firmware!
ListElement {
title: qsTr("Roll sensitivity")
description: qsTr("Slide to the left to make roll control faster and more accurate. Slide to the right if roll oscillates or is too twitchy.")
param: "MC_ROLL_TC"
min: 0.15
max: 0.25
step: 0.01
}
ListElement {
title: qsTr("Pitch sensitivity")
description: qsTr("Slide to the left to make pitch control faster and more accurate. Slide to the right if pitch oscillates or is too twitchy.")
param: "MC_PITCH_TC"
min: 0.15
max: 0.25
step: 0.01
}
*/
}
}
// Advanced page
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
layoutDirection: Qt.RightToLeft
visible: advanced
Column { Column {
spacing: _margins spacing: _margins
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
@ -505,6 +516,7 @@ SetupPage {
} }
} }
} // RowLayout - Advanced Page } // RowLayout - Advanced Page
} // Component - Advanced Page
} // Column } // Column
} // Component - pageComponent } // Component - pageComponent
} // SetupPage } // SetupPage

Loading…
Cancel
Save