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
4dbbe70a
Unverified
Commit
4dbbe70a
authored
Aug 23, 2019
by
Gus Grubba
Committed by
GitHub
Aug 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7720 from mavlink/disabledPairing
Remove all references to Pairing if it's not supported.
parents
eec1bede
12043ba4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
22 deletions
+28
-22
CustomMainToolBarIndicators.qml
...m-example/res/MainToolbar/CustomMainToolBarIndicators.qml
+3
-3
CustomFirmwarePlugin.cc
custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc
+2
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+6
-2
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+1
-1
PairingIndicator.qml
src/ui/toolbar/PairingIndicator.qml
+16
-16
No files found.
custom-example/res/MainToolbar/CustomMainToolBarIndicators.qml
View file @
4dbbe70a
...
@@ -34,7 +34,7 @@ Item {
...
@@ -34,7 +34,7 @@ Item {
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
QGCColoredImage
{
QGCColoredImage
{
id
:
menuEdge
id
:
menuEdge
visible
:
!
QGroundControl
.
settingsManager
.
appSettings
.
usePairing
.
rawValue
visible
:
!
QGroundControl
.
s
upportsPairing
||
!
QGroundControl
.
s
ettingsManager
.
appSettings
.
usePairing
.
rawValue
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
ScreenTools
.
defaultFontPixelHeight
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
width
:
height
...
@@ -44,14 +44,14 @@ Item {
...
@@ -44,14 +44,14 @@ Item {
color
:
qgcPal
.
buttonText
color
:
qgcPal
.
buttonText
}
}
QGCLabel
{
QGCLabel
{
visible
:
!
QGroundControl
.
settingsManager
.
appSettings
.
usePairing
.
rawValu
e
visible
:
menuEdge
.
visibl
e
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Waiting for a vehicle
"
)
text
:
qsTr
(
"
Waiting for a vehicle
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
}
}
Loader
{
Loader
{
visible
:
QGroundControl
.
settingsManager
.
appSettings
.
usePairing
.
rawValu
e
visible
:
!
menuEdge
.
visibl
e
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.margins
:
_indicatorMargins
anchors.margins
:
_indicatorMargins
...
...
custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc
View file @
4dbbe70a
...
@@ -55,7 +55,9 @@ CustomFirmwarePlugin::toolBarIndicators(const Vehicle* vehicle)
...
@@ -55,7 +55,9 @@ CustomFirmwarePlugin::toolBarIndicators(const Vehicle* vehicle)
{
{
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
vehicle
);
if
(
_toolBarIndicatorList
.
size
()
==
0
)
{
if
(
_toolBarIndicatorList
.
size
()
==
0
)
{
#if defined(QGC_ENABLE_PAIRING)
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/PairingIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/PairingIndicator.qml"
)));
#endif
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/TelemetryRSSIIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/TelemetryRSSIIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/RCRSSIIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/RCRSSIIndicator.qml"
)));
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
4dbbe70a
...
@@ -78,6 +78,7 @@ public:
...
@@ -78,6 +78,7 @@ public:
Q_PROPERTY
(
bool
taisyncSupported
READ
taisyncSupported
CONSTANT
)
Q_PROPERTY
(
bool
taisyncSupported
READ
taisyncSupported
CONSTANT
)
Q_PROPERTY
(
MicrohardManager
*
microhardManager
READ
microhardManager
CONSTANT
)
Q_PROPERTY
(
MicrohardManager
*
microhardManager
READ
microhardManager
CONSTANT
)
Q_PROPERTY
(
bool
microhardSupported
READ
microhardSupported
CONSTANT
)
Q_PROPERTY
(
bool
microhardSupported
READ
microhardSupported
CONSTANT
)
Q_PROPERTY
(
bool
supportsPairing
READ
supportsPairing
CONSTANT
)
#if defined(QGC_ENABLE_PAIRING)
#if defined(QGC_ENABLE_PAIRING)
Q_PROPERTY
(
PairingManager
*
pairingManager
READ
pairingManager
CONSTANT
)
Q_PROPERTY
(
PairingManager
*
pairingManager
READ
pairingManager
CONSTANT
)
#endif
#endif
...
@@ -176,19 +177,22 @@ public:
...
@@ -176,19 +177,22 @@ public:
FactGroup
*
gpsRtkFactGroup
()
{
return
_gpsRtkFactGroup
;
}
FactGroup
*
gpsRtkFactGroup
()
{
return
_gpsRtkFactGroup
;
}
AirspaceManager
*
airspaceManager
()
{
return
_airspaceManager
;
}
AirspaceManager
*
airspaceManager
()
{
return
_airspaceManager
;
}
#if defined(QGC_ENABLE_PAIRING)
#if defined(QGC_ENABLE_PAIRING)
bool
supportsPairing
()
{
return
true
;
}
PairingManager
*
pairingManager
()
{
return
_pairingManager
;
}
PairingManager
*
pairingManager
()
{
return
_pairingManager
;
}
#else
bool
supportsPairing
()
{
return
false
;
}
#endif
#endif
static
QGeoCoordinate
flightMapPosition
()
{
return
_coord
;
}
static
QGeoCoordinate
flightMapPosition
()
{
return
_coord
;
}
static
double
flightMapZoom
()
{
return
_zoom
;
}
static
double
flightMapZoom
()
{
return
_zoom
;
}
TaisyncManager
*
taisyncManager
()
{
return
_taisyncManager
;
}
TaisyncManager
*
taisyncManager
()
{
return
_taisyncManager
;
}
#if defined(QGC_GST_TAISYNC_ENABLED)
#if defined(QGC_GST_TAISYNC_ENABLED)
bool
taisyncSupported
()
{
return
true
;
}
bool
taisyncSupported
()
{
return
true
;
}
#else
#else
bool
taisyncSupported
()
{
return
false
;
}
bool
taisyncSupported
()
{
return
false
;
}
#endif
#endif
MicrohardManager
*
microhardManager
()
{
return
_microhardManager
;
}
MicrohardManager
*
microhardManager
()
{
return
_microhardManager
;
}
#if defined(QGC_GST_TAISYNC_ENABLED)
#if defined(QGC_GST_TAISYNC_ENABLED)
bool
microhardSupported
()
{
return
true
;
}
bool
microhardSupported
()
{
return
true
;
}
#else
#else
...
...
src/ui/preferences/GeneralSettings.qml
View file @
4dbbe70a
...
@@ -251,7 +251,7 @@ Rectangle {
...
@@ -251,7 +251,7 @@ Rectangle {
FactCheckBox
{
FactCheckBox
{
text
:
qsTr
(
"
Use Vehicle Pairing
"
)
text
:
qsTr
(
"
Use Vehicle Pairing
"
)
fact
:
_usePairing
fact
:
_usePairing
visible
:
_usePairing
&&
_usePairing
.
visible
visible
:
_usePairing
&&
_usePairing
.
visible
&&
QGroundControl
.
supportsPairing
property
Fact
_usePairing
:
QGroundControl
.
settingsManager
.
appSettings
.
usePairing
property
Fact
_usePairing
:
QGroundControl
.
settingsManager
.
appSettings
.
usePairing
}
}
...
...
src/ui/toolbar/PairingIndicator.qml
View file @
4dbbe70a
...
@@ -124,7 +124,7 @@ Item {
...
@@ -124,7 +124,7 @@ Item {
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
Repeater
{
Repeater
{
model
:
QGroundControl
.
pairingManager
.
pairingLinkTypeStrings
model
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairingLinkTypeStrings
:
[]
delegate
:
QGCButton
{
delegate
:
QGCButton
{
text
:
modelData
text
:
modelData
width
:
_contentWidth
width
:
_contentWidth
...
@@ -309,7 +309,7 @@ Item {
...
@@ -309,7 +309,7 @@ Item {
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCLabel
{
QGCLabel
{
text
:
QGroundControl
.
pairingManager
.
pairingStatusStr
text
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairingStatusStr
:
""
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
@@ -336,20 +336,20 @@ Item {
...
@@ -336,20 +336,20 @@ Item {
}
}
}
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
List Of Available Devices
"
)
text
:
qsTr
(
"
List Of Available Devices
"
)
visible
:
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visibl
e
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visible
)
:
fals
e
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
GridLayout
{
GridLayout
{
columns
:
3
columns
:
3
visible
:
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visibl
e
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visible
)
:
fals
e
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
Repeater
{
Repeater
{
model
:
QGroundControl
.
pairingManager
.
pairedDeviceNameList
model
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairedDeviceNameList
:
[]
QGCLabel
{
QGCLabel
{
text
:
modelData
text
:
modelData
Layout.row
:
index
Layout.row
:
index
...
@@ -359,7 +359,7 @@ Item {
...
@@ -359,7 +359,7 @@ Item {
}
}
}
}
Repeater
{
Repeater
{
model
:
QGroundControl
.
pairingManager
.
pairedDeviceNameList
model
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairedDeviceNameList
:
[]
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Connect
"
)
text
:
qsTr
(
"
Connect
"
)
Layout.row
:
index
Layout.row
:
index
...
@@ -370,7 +370,7 @@ Item {
...
@@ -370,7 +370,7 @@ Item {
}
}
}
}
Repeater
{
Repeater
{
model
:
QGroundControl
.
pairingManager
.
pairedDeviceNameList
model
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairedDeviceNameList
:
[]
QGCColoredImage
{
QGCColoredImage
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
height
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
width
:
height
width
:
height
...
@@ -391,7 +391,7 @@ Item {
...
@@ -391,7 +391,7 @@ Item {
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
RowLayout
{
RowLayout
{
id
:
connectedButtons
id
:
connectedButtons
visible
:
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingIdl
e
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingIdle
)
:
fals
e
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
4
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
4
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCButton
{
QGCButton
{
...
@@ -408,7 +408,7 @@ Item {
...
@@ -408,7 +408,7 @@ Item {
}
}
}
}
QGCButton
{
QGCButton
{
text
:
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
?
qsTr
(
"
Go And Fly
"
)
:
qsTr
(
"
Close
"
)
text
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
?
qsTr
(
"
Go And Fly
"
)
:
qsTr
(
"
Close
"
))
:
""
Layout.minimumWidth
:
_contentWidth
*
0.333
Layout.minimumWidth
:
_contentWidth
*
0.333
Layout.fillWidth
:
true
Layout.fillWidth
:
true
onClicked
:
{
onClicked
:
{
...
@@ -418,7 +418,7 @@ Item {
...
@@ -418,7 +418,7 @@ Item {
}
}
QGCButton
{
QGCButton
{
id
:
cancelButton
id
:
cancelButton
visible
:
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnecting
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnecting
)
:
false
text
:
qsTr
(
"
Cancel
"
)
text
:
qsTr
(
"
Cancel
"
)
width
:
_contentWidth
width
:
_contentWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
...
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