Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
698e6bb1
Commit
698e6bb1
authored
Oct 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch ArduPIlot setup pages to new SetupPage usage
Also added new FirmwarePlugin::brandImage support
parent
11a86919
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
2000 additions
and
2099 deletions
+2000
-2099
qgcresources.qrc
qgcresources.qrc
+2
-0
APMAirframeComponent.cc
src/AutoPilotPlugins/APM/APMAirframeComponent.cc
+2
-2
APMAirframeComponent.qml
src/AutoPilotPlugins/APM/APMAirframeComponent.qml
+37
-65
APMCameraComponent.cc
src/AutoPilotPlugins/APM/APMCameraComponent.cc
+1
-1
APMCameraComponent.qml
src/AutoPilotPlugins/APM/APMCameraComponent.qml
+417
-427
APMFlightModesComponent.cc
src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
+1
-1
APMFlightModesComponent.qml
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
+10
-18
APMPowerComponent.qml
src/AutoPilotPlugins/APM/APMPowerComponent.qml
+280
-336
APMSafetyComponent.cc
src/AutoPilotPlugins/APM/APMSafetyComponent.cc
+1
-1
APMSafetyComponentCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
+410
-419
APMSafetyComponentPlane.qml
src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
+153
-162
APMSensorsComponent.cc
src/AutoPilotPlugins/APM/APMSensorsComponent.cc
+1
-2
APMSensorsComponent.qml
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
+544
-540
APMTuningComponent.cc
src/AutoPilotPlugins/APM/APMTuningComponent.cc
+1
-1
APMTuningComponentCopter.qml
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
+116
-123
APMBrandImage.png
src/FirmwarePlugin/APM/APMBrandImage.png
+0
-0
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+1
-0
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+3
-0
PX4BrandImage.png
src/FirmwarePlugin/PX4/PX4BrandImage.png
+0
-0
PX4FirmwarePlugin.h
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
+1
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-0
Vehicle.h
src/Vehicle/Vehicle.h
+2
-0
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+12
-1
No files found.
qgcresources.qrc
View file @
698e6bb1
...
...
@@ -151,6 +151,8 @@
<file alias="ArrowDirection.svg">src/AutoPilotPlugins/Common/Images/ArrowDirection.svg</file>
<file alias="ArrowCW.svg">src/AutoPilotPlugins/Common/Images/ArrowCW.svg</file>
<file alias="ArrowCCW.svg">src/AutoPilotPlugins/Common/Images/ArrowCCW.svg</file>
<file alias="APM/BrandImage">src/FirmwarePlugin/APM/APMBrandImage.png</file>
<file alias="PX4/BrandImage">src/FirmwarePlugin/PX4/PX4BrandImage.png</file>
</qresource>
<qresource prefix="/res">
<file alias="AntennaRC">resources/Antenna_RC.svg</file>
...
...
src/AutoPilotPlugins/APM/APMAirframeComponent.cc
View file @
698e6bb1
...
...
@@ -32,8 +32,8 @@ QString APMAirframeComponent::name(void) const
QString
APMAirframeComponent
::
description
(
void
)
const
{
return
tr
(
"
The Airframe Component
is used to select the airframe which matches your vehicle. "
"
This will in turn set up the various tuning values for flight parameter
s."
);
return
tr
(
"
Airframe Setup
is used to select the airframe which matches your vehicle. "
"
You can also the load default parameter values associated with known vehicle type
s."
);
}
QString
APMAirframeComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMAirframeComponent.qml
View file @
698e6bb1
...
...
@@ -11,26 +11,24 @@
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
qgcView
viewPanel
:
panel
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
SetupPage
{
id
:
airframePage
pageComponent
:
airframePageComponent
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
Fact
_frame
:
controller
.
getParameterFact
(
-
1
,
"
FRAME
"
)
APMAirframeComponentController
{
id
:
controller
factPanel
:
p
anel
factPanel
:
airframePage
.
viewP
anel
}
ExclusiveGroup
{
...
...
@@ -89,57 +87,32 @@ QGCView {
}
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
Component
{
id
:
airframePageComponent
Item
{
id
:
helpApplyRow
anchors.top
:
parent
.
top
Column
{
width
:
availableWidth
height
:
1000
spacing
:
_margins
RowLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
Math
.
max
(
helpText
.
contentHeight
,
applyButton
.
height
)
spacing
:
_margins
QGCLabel
{
id
:
helpText
anchors.rightMargin
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
applyButton
.
right
text
:
qsTr
(
"
Please select your airframe type
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Please select your airframe type
"
)
Layout.fillWidth
:
true
}
QGCButton
{
id
:
applyButton
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Load common parameters
"
)
onClicked
:
showDialog
(
applyRestartDialogComponent
,
qsTr
(
"
Load common parameters
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Close
)
}
}
Item
{
id
:
helpSpacer
anchors.top
:
helpApplyRow
.
bottom
height
:
parent
.
spacerHeight
width
:
10
}
QGCFlickable
{
id
:
scroll
anchors.top
:
helpSpacer
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
contentHeight
:
frameColumn
.
height
contentWidth
:
frameColumn
.
width
Column
{
id
:
frameColumn
spacing
:
_margins
Repeater
{
model
:
controller
.
airframeTypesModel
...
...
@@ -155,7 +128,6 @@ QGCView {
}
}
}
}
}
}
// QGCViewPanel
}
// QGCView
}
// Column
}
// Component - pageComponent
}
// SetupPage
src/AutoPilotPlugins/APM/APMCameraComponent.cc
View file @
698e6bb1
...
...
@@ -29,7 +29,7 @@ QString APMCameraComponent::name(void) const
QString
APMCameraComponent
::
description
(
void
)
const
{
return
tr
(
"
The Camera Component is used to setup
camera and gimbal settings."
);
return
tr
(
"
Camera setup is used to adjust
camera and gimbal settings."
);
}
QString
APMCameraComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMCameraComponent.qml
View file @
698e6bb1
...
...
@@ -17,14 +17,20 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
_cameraView
viewPanel
:
panel
anchors.fill
:
parent
SetupPage
{
id
:
cameraPage
pageComponent
:
cameraPageComponent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
Component
{
id
:
cameraPageComponent
Column
{
spacing
:
_margins
width
:
availableWidth
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
cameraPage
.
viewPanel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
property
Fact
_mountRetractX
:
controller
.
getParameterFact
(
-
1
,
"
MNT_RETRACT_X
"
)
property
Fact
_mountRetractY
:
controller
.
getParameterFact
(
-
1
,
"
MNT_RETRACT_Y
"
)
...
...
@@ -442,16 +448,6 @@ QGCView {
}
// Item
}
// Component - gimbalSettings
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
clip
:
true
anchors.fill
:
parent
contentWidth
:
gimbalDirectionTiltLoader
.
x
+
gimbalDirectionTiltLoader
.
width
contentHeight
:
_showGimbaLSettings
?
gimbalSettingsLoader
.
y
+
gimbalSettingsLoader
.
height
:
gimbalDirectionPanLoader
.
y
+
gimbalDirectionPanLoader
.
height
Loader
{
id
:
gimbalDirectionTiltLoader
sourceComponent
:
gimbalDirectionSettings
...
...
@@ -471,8 +467,6 @@ QGCView {
Loader
{
id
:
gimbalDirectionRollLoader
anchors.margins
:
_margins
anchors.top
:
gimbalDirectionTiltLoader
.
bottom
sourceComponent
:
gimbalDirectionSettings
property
string
directionTitle
:
qsTr
(
"
Roll
"
)
...
...
@@ -490,8 +484,6 @@ QGCView {
Loader
{
id
:
gimbalDirectionPanLoader
anchors.margins
:
_margins
anchors.top
:
gimbalDirectionRollLoader
.
bottom
sourceComponent
:
gimbalDirectionSettings
property
string
directionTitle
:
qsTr
(
"
Pan
"
)
...
...
@@ -509,9 +501,7 @@ QGCView {
Loader
{
id
:
gimbalSettingsLoader
anchors.margins
:
_margins
anchors.top
:
gimbalDirectionPanLoader
.
bottom
}
}
//
Flickable
}
//
QGCViewPanel
}
//
QGCView
}
//
Column
}
//
Component
}
//
SetupPage
src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
View file @
698e6bb1
...
...
@@ -26,7 +26,7 @@ QString APMFlightModesComponent::name(void) const
QString
APMFlightModesComponent
::
description
(
void
)
const
{
return
QStringLiteral
(
"The Flight Modes Component is used to assign FLight Modes to Channel 5
."
);
return
tr
(
"Flight Modes Setup is used to configure the transmitter switches associated with Flight Modes
."
);
}
QString
APMFlightModesComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
View file @
698e6bb1
...
...
@@ -18,9 +18,9 @@ import QGroundControl.Controls 1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
rootQGCView
viewPanel
:
panel
SetupPage
{
id
:
flightModePage
pageComponent
:
flightModePageComponent
readonly
property
string
_modeChannelParam
:
controller
.
modeChannelParam
readonly
property
string
_modeParamPrefix
:
controller
.
modeParamPrefix
...
...
@@ -33,26 +33,19 @@ QGCView {
property
bool
_fltmodeChExists
:
controller
.
parameterExists
(
-
1
,
_modeChannelParam
)
property
Fact
_fltmodeCh
:
_fltmodeChExists
?
controller
.
getParameterFact
(
-
1
,
_modeChannelParam
)
:
_nullFact
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
APMFlightModesComponentController
{
id
:
controller
factPanel
:
p
anel
factPanel
:
flightModePage
.
viewP
anel
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
anchors.fill
:
parent
clip
:
true
contentHeight
:
flowLayout
.
height
contentWidth
:
flowLayout
.
width
Component
{
id
:
flightModePageComponent
Flow
{
id
:
flowLayout
width
:
panel
.
width
// parent.width doesn't work here for some reason!
width
:
availableWidth
spacing
:
_margins
Column
{
...
...
@@ -181,6 +174,5 @@ QGCView {
}
// Rectangle - Channel options
}
// Column - Channel options
}
// Flow
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
}
// Component - flightModePageComponent
}
// SetupPage
src/AutoPilotPlugins/APM/APMPowerComponent.qml
View file @
698e6bb1
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMSafetyComponent.cc
View file @
698e6bb1
...
...
@@ -29,7 +29,7 @@ QString APMSafetyComponent::name(void) const
QString
APMSafetyComponent
::
description
(
void
)
const
{
return
tr
(
"
The Safety Component
is used to setup triggers for Return to Land as well as the settings for Return to Land itself."
);
return
tr
(
"
Safety Setup
is used to setup triggers for Return to Land as well as the settings for Return to Land itself."
);
}
QString
APMSafetyComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
View file @
698e6bb1
...
...
@@ -18,14 +18,21 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
_safetyView
viewPanel
:
panel
anchors.fill
:
parent
SetupPage
{
id
:
safetyPage
pageComponent
:
safetyPageComponent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
Component
{
id
:
safetyPageComponent
QGCPalette
{
id
:
ggcPal
;
colorGroupEnabled
:
enabled
}
Flow
{
id
:
flowLayout
width
:
availableWidth
spacing
:
_margins
FactPanelController
{
id
:
controller
;
factPanel
:
safetyPage
.
viewPanel
}
QGCPalette
{
id
:
ggcPal
;
colorGroupEnabled
:
true
}
property
Fact
_failsafeGCSEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_GCS_ENABLE
"
)
property
Fact
_failsafeBattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
...
...
@@ -55,21 +62,6 @@ QGCView {
ExclusiveGroup
{
id
:
landLoiterRadioGroup
}
ExclusiveGroup
{
id
:
returnAltRadioGroup
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
clip
:
true
anchors.fill
:
parent
contentHeight
:
flowLayout
.
height
contentWidth
:
flowLayout
.
width
Flow
{
id
:
flowLayout
width
:
panel
.
width
// parent.width doesn't work for some reason
spacing
:
_margins
Column
{
spacing
:
_margins
/
2
...
...
@@ -319,7 +311,7 @@ QGCView {
FactTextField
{
id
:
fenceAltMaxField
anchors.topMargin
:
_margins
/
2
anchors.leftMargin
:
_margin
anchors.leftMargin
:
_margins
anchors.left
:
fenceAltMaxLabel
.
right
anchors.top
:
fenceRadiusField
.
bottom
fact
:
_fenceAltMax
...
...
@@ -503,6 +495,5 @@ QGCView {
}
// Rectangle - Arming checks
}
// Column - Arming Checks
}
// Flow
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
}
// Component - safetyPageComponent
}
// SetupView
src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
View file @
698e6bb1
...
...
@@ -18,14 +18,21 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
_safetyView
viewPanel
:
panel
anchors.fill
:
parent
SetupPage
{
id
:
safetyPage
pageComponent
:
safetyPageComponent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
Component
{
id
:
safetyPageComponent
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
Flow
{
id
:
flowLayout
width
:
availableWidth
spacing
:
_margins
FactPanelController
{
id
:
controller
;
factPanel
:
safetyPage
.
viewPanel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
property
Fact
_failsafeBattMah
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_MAH
"
)
property
Fact
_failsafeBattVoltage
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_VOLTAGE
"
)
...
...
@@ -39,21 +46,6 @@ QGCView {
ExclusiveGroup
{
id
:
returnAltRadioGroup
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
clip
:
true
anchors.fill
:
parent
contentWidth
:
flowLayout
.
width
contentHeight
:
flowLayout
.
height
Flow
{
id
:
flowLayout
width
:
panel
.
width
// parent.width doesn't work for some reason
spacing
:
_margins
Column
{
spacing
:
_margins
/
2
...
...
@@ -192,6 +184,5 @@ QGCView {
}
// Rectangle - RTL Settings
}
// Column - RTL Settings
}
// Flow
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
}
// Component
}
// SetupView
src/AutoPilotPlugins/APM/APMSensorsComponent.cc
View file @
698e6bb1
...
...
@@ -30,8 +30,7 @@ QString APMSensorsComponent::name(void) const
QString
APMSensorsComponent
::
description
(
void
)
const
{
return
tr
(
"The Sensors Component allows you to calibrate the sensors within your vehicle. "
"Prior to flight you must calibrate the Magnetometer, Gyroscope and Accelerometer."
);
return
tr
(
"Sensors Setup is used to calibrate the sensors within your vehicle."
);
}
QString
APMSensorsComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
View file @
698e6bb1
...
...
@@ -12,6 +12,7 @@ import QtQuick 2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
...
...
@@ -20,9 +21,17 @@ import QGroundControl.Controls 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controllers
1.0
QGCView
{
id
:
qgcView
viewPanel
:
panel
SetupPage
{
id
:
sensorsPage
pageComponent
:
sensorsPageComponent
Component
{
id
:
sensorsPageComponent
RowLayout
{
width
:
1000
//availableWidth
height
:
1000
//availableHeight
spacing
:
ScreenTools
.
defaultFontPixelWidth
/
2
// Help text which is shown both in the status text area prior to pressing a cal button and in the
// pre-calibration dialog.
...
...
@@ -142,7 +151,7 @@ QGCView {
APMSensorsComponentController
{
id
:
controller
factPanel
:
p
anel
factPanel
:
sensorsPage
.
viewP
anel
statusLog
:
statusTextArea
progressBar
:
progressBar
compassButton
:
compassButton
...
...
@@ -213,7 +222,7 @@ QGCView {
}
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
Component
{
id
:
postCalibrationDialogComponent
...
...
@@ -442,15 +451,11 @@ QGCView {
}
// Column
}
// QGCFlickable
}
// QGCViewDialog
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
}
// Component - compassMotDialogComponent
Column
{
id
:
buttonColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
Layout.alignment
:
Qt
.
AlignLeft
|
Qt
.
AlignTop
readonly
property
int
buttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
...
...
@@ -510,11 +515,9 @@ QGCView {
}
// Column - Buttons
Column
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
buttonColumn
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
Layout.fillWidth
:
true
ProgressBar
{
id
:
progressBar
...
...
@@ -627,5 +630,6 @@ QGCView {
}
}
// Item - Cal display area
}
// Column - cal display
}
// QGCViewPanel
}
// QGCView
}
// Row
}
// Component - sensorsPageComponent
}
// SetupPage
src/AutoPilotPlugins/APM/APMTuningComponent.cc
View file @
698e6bb1
...
...
@@ -26,7 +26,7 @@ QString APMTuningComponent::name(void) const
QString
APMTuningComponent
::
description
(
void
)
const
{
return
tr
(
"T
he Tuning Component
is used to tune the flight characteristics of the Vehicle."
);
return
tr
(
"T
uning Setup
is used to tune the flight characteristics of the Vehicle."
);
}
QString
APMTuningComponent
::
iconResource
(
void
)
const
...
...
src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
View file @
698e6bb1
...
...
@@ -17,14 +17,20 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
_safetyView
viewPanel
:
panel
anchors.fill
:
parent
SetupPage
{
id
:
tuningPage
pageComponent
:
tuningPageComponent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
Component
{
id
:
tuningPageComponent
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
Column
{
width
:
availableWidth
spacing
:
_margins
FactPanelController
{
id
:
controller
;
factPanel
:
tuningPage
.
viewPanel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
// Older firmwares use THR_MODE, newer use MOT_THST_HOVER
property
bool
_throttleMidExists
:
controller
.
parameterExists
(
-
1
,
"
THR_MID
"
)
...
...
@@ -115,16 +121,6 @@ QGCView {
Connections
{
target
:
_ch11Opt
;
onValueChanged
:
calcAutoTuneChannel
()
}
Connections
{
target
:
_ch12Opt
;
onValueChanged
:
calcAutoTuneChannel
()
}
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
clip
:
true
anchors.fill
:
parent
contentHeight
:
autoTuneRect
.
y
+
autoTuneRect
.
height
flickableDirection
:
Flickable
.
VerticalFlick
QGCLabel
{
id
:
basicLabel
text
:
qsTr
(
"
Basic Tuning
"
)
...
...
@@ -133,10 +129,8 @@ QGCView {
Rectangle
{
id
:
basicTuningRect
anchors.topMargin
:
_margins
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
basicLabel
.
bottom
height
:
basicTuningColumn
.
y
+
basicTuningColumn
.
height
+
_margins
color
:
palette
.
windowShade
...
...
@@ -277,9 +271,8 @@ QGCView {
Flow
{
id
:
flowLayout
anchors.topMargin
:
_margins
/
2
width
:
panel
.
width
// parent.width doesn't work here for some reason!
anchors.top
:
basicTuningRect
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margins
Rectangle
{
...
...
@@ -417,6 +410,6 @@ QGCView {
}
// Rectangle - Channel 6 Tuning options
}
// Rectangle - Channel 6 Tuning options wrap
}
// Flow - Tune
}
//
QGCFlickable
}
//
QGCViewPanel
}
//
QGC
View
}
//
Column
}
//
Component
}
//
Setup
View
src/FirmwarePlugin/APM/APMBrandImage.png
0 → 100644
View file @
698e6bb1
26.9 KB
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
698e6bb1
...
...
@@ -95,6 +95,7 @@ public:
QObject
*
loadParameterMetaData
(
const
QString
&
metaDataFile
);
GeoFenceManager
*
newGeoFenceManager
(
Vehicle
*
vehicle
)
{
return
new
APMGeoFenceManager
(
vehicle
);
}
RallyPointManager
*
newRallyPointManager
(
Vehicle
*
vehicle
)
{
return
new
APMRallyPointManager
(
vehicle
);
}
QString
brandImage
(
const
Vehicle
*
vehicle
)
const
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
"/qmlimages/APM/BrandImage"
);
}
QString
getParameterMetaDataFile
(
Vehicle
*
vehicle
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
698e6bb1
...
...
@@ -222,6 +222,9 @@ public:
/// Return the resource file which contains the set of params loaded for offline editing.
virtual
QString
offlineEditingParamFile
(
Vehicle
*
vehicle
)
{
Q_UNUSED
(
vehicle
);
return
QString
();
}
/// Return the resource file which contains the brand image for the vehicle.
virtual
QString
brandImage
(
const
Vehicle
*
vehicle
)
const
{
Q_UNUSED
(
vehicle
)
return
QString
();
}
};
#endif
src/FirmwarePlugin/PX4/PX4BrandImage.png
0 → 100644
View file @
698e6bb1
4.75 KB
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
View file @
698e6bb1
...
...
@@ -58,6 +58,7 @@ public:
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
);
GeoFenceManager
*
newGeoFenceManager
(
Vehicle
*
vehicle
)
{
return
new
PX4GeoFenceManager
(
vehicle
);
}
QString
offlineEditingParamFile
(
Vehicle
*
vehicle
)
final
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
":/FirmwarePlugin/PX4/PX4.OfflineEditing.params"
);
}
QString
brandImage
(
const
Vehicle
*
vehicle
)
const
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
"/qmlimages/PX4/BrandImage"
);
}
// Use these constants to set flight modes using setFlightMode method. Don't use hardcoded string names since the
// names may change.
...
...
src/Vehicle/Vehicle.cc
View file @
698e6bb1
...
...
@@ -1922,6 +1922,11 @@ void Vehicle::_newGeoFenceAvailable(void)
}
}
QString
Vehicle
::
brandImage
(
void
)
const
{
return
_firmwarePlugin
->
brandImage
(
this
);
}
const
char
*
VehicleGPSFactGroup
::
_hdopFactName
=
"hdop"
;
const
char
*
VehicleGPSFactGroup
::
_vdopFactName
=
"vdop"
;
const
char
*
VehicleGPSFactGroup
::
_courseOverGroundFactName
=
"courseOverGround"
;
...
...
src/Vehicle/Vehicle.h
View file @
698e6bb1
...
...
@@ -279,6 +279,7 @@ public:
Q_PROPERTY
(
bool
coaxialMotors
READ
coaxialMotors
CONSTANT
)
Q_PROPERTY
(
bool
xConfigMotors
READ
xConfigMotors
CONSTANT
)
Q_PROPERTY
(
bool
isOfflineEditingVehicle
READ
isOfflineEditingVehicle
CONSTANT
)
Q_PROPERTY
(
QString
brandImage
READ
brandImage
CONSTANT
)
/// true: Vehicle is flying, false: Vehicle is on ground
Q_PROPERTY
(
bool
flying
READ
flying
WRITE
setFlying
NOTIFY
flyingChanged
)
...
...
@@ -524,6 +525,7 @@ public:
uint8_t
baseMode
()
const
{
return
_base_mode
;
}
uint32_t
customMode
()
const
{
return
_custom_mode
;
}
bool
isOfflineEditingVehicle
()
const
{
return
_offlineEditingVehicle
;
}
QString
brandImage
()
const
;
Fact
*
roll
(
void
)
{
return
&
_rollFact
;
}
Fact
*
heading
(
void
)
{
return
&
_headingFact
;
}
...
...
src/ui/toolbar/MainToolBar.qml
View file @
698e6bb1
...
...
@@ -421,6 +421,17 @@ Rectangle {
primary
:
true
onClicked
:
activeVehicle
.
disconnectInactiveVehicle
()
}
Image
{
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
visible
:
parent
.
x
<
x
&&
!
disconnectButton
.
visible
&&
source
!=
""
fillMode
:
Image
.
PreserveAspectFit
source
:
activeVehicle
?
activeVehicle
.
brandImage
:
""
}
}
// Progress bar
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment