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
37bf5d30
Commit
37bf5d30
authored
Jul 19, 2017
by
Don Gagne
Committed by
GitHub
Jul 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5473 from DonLakeFlyer/MultiVehicleIndicators
Better display of vehicle indicators for multi-vehicle
parents
8bfc4dfe
ea72b8bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
VehicleMapItem.qml
src/FlightMap/MapItems/VehicleMapItem.qml
+13
-7
Vehicle.cc
src/Vehicle/Vehicle.cc
+4
-1
No files found.
src/FlightMap/MapItems/VehicleMapItem.qml
View file @
37bf5d30
...
@@ -32,15 +32,17 @@ MapQuickItem {
...
@@ -32,15 +32,17 @@ MapQuickItem {
property
real
_uavSize
:
ScreenTools
.
defaultFontPixelHeight
*
5
property
real
_uavSize
:
ScreenTools
.
defaultFontPixelHeight
*
5
property
real
_adsbSize
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
property
real
_adsbSize
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
property
var
_map
:
map
property
var
_map
:
map
property
bool
_multiVehicle
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
1
sourceItem
:
Item
{
sourceItem
:
Item
{
id
:
vehicleItem
id
:
vehicleItem
width
:
vehicleIcon
.
width
width
:
vehicleIcon
.
width
height
:
vehicleIcon
.
height
height
:
vehicleIcon
.
height
opacity
:
vehicle
?
(
vehicle
.
active
?
1.0
:
0.5
)
:
1.0
Image
{
Image
{
id
:
vehicleIcon
id
:
vehicleIcon
source
:
_adsbVehicle
?
"
/qmlimages/adsbVehicle.svg
"
:
(
map
.
isSatelliteMap
?
vehicle
.
vehicleImageOpaque
:
vehicle
.
vehicleImageOutline
)
source
:
_adsbVehicle
?
"
/qmlimages/adsbVehicle.svg
"
:
vehicle
.
vehicleImageOpaque
mipmap
:
true
mipmap
:
true
width
:
size
width
:
size
sourceSize.width
:
size
sourceSize.width
:
size
...
@@ -57,11 +59,15 @@ MapQuickItem {
...
@@ -57,11 +59,15 @@ MapQuickItem {
anchors.top
:
parent
.
bottom
anchors.top
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
map
:
_map
map
:
_map
text
:
alt
Text
text
:
vehicleLabel
Text
font.pointSize
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
smallFontPointSize
visible
:
!
isNaN
(
altitude
)
visible
:
_adsbVehicle
?
!
isNaN
(
altitude
)
:
_multiVehicle
property
string
altText
:
visible
?
QGroundControl
.
metersToAppSettingsDistanceUnits
(
altitude
).
toFixed
(
0
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
""
property
string
vehicleLabelText
:
visible
?
(
_adsbVehicle
?
QGroundControl
.
metersToAppSettingsDistanceUnits
(
altitude
).
toFixed
(
0
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
(
_multiVehicle
?
qsTr
(
"
Vehicle %1
"
).
arg
(
vehicle
.
id
)
:
""
))
:
""
}
}
}
}
...
...
src/Vehicle/Vehicle.cc
View file @
37bf5d30
...
@@ -1579,7 +1579,10 @@ bool Vehicle::active(void)
...
@@ -1579,7 +1579,10 @@ bool Vehicle::active(void)
void
Vehicle
::
setActive
(
bool
active
)
void
Vehicle
::
setActive
(
bool
active
)
{
{
_active
=
active
;
if
(
_active
!=
active
)
{
_active
=
active
;
emit
activeChanged
(
_active
);
}
_startJoystick
(
_active
);
_startJoystick
(
_active
);
}
}
...
...
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