Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ea72b8bf
Commit
ea72b8bf
authored
Jul 19, 2017
by
DonLakeFlyer
Browse files
Better display of vehicle indicators for multi-vehicle
parent
8bfc4dfe
Changes
2
Show whitespace changes
Inline
Side-by-side
src/FlightMap/MapItems/VehicleMapItem.qml
View file @
ea72b8bf
...
...
@@ -32,15 +32,17 @@ MapQuickItem {
property
real
_uavSize
:
ScreenTools
.
defaultFontPixelHeight
*
5
property
real
_adsbSize
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
property
var
_map
:
map
property
bool
_multiVehicle
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
1
sourceItem
:
Item
{
id
:
vehicleItem
width
:
vehicleIcon
.
width
height
:
vehicleIcon
.
height
opacity
:
vehicle
?
(
vehicle
.
active
?
1.0
:
0.5
)
:
1.0
Image
{
id
:
vehicleIcon
source
:
_adsbVehicle
?
"
/qmlimages/adsbVehicle.svg
"
:
(
map
.
isSatelliteMap
?
vehicle
.
vehicleImageOpaque
:
vehicle
.
vehicleImageOutline
)
source
:
_adsbVehicle
?
"
/qmlimages/adsbVehicle.svg
"
:
vehicle
.
vehicleImageOpaque
mipmap
:
true
width
:
size
sourceSize.width
:
size
...
...
@@ -57,11 +59,15 @@ MapQuickItem {
anchors.top
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
map
:
_map
text
:
alt
Text
text
:
vehicleLabel
Text
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 @
ea72b8bf
...
...
@@ -1579,7 +1579,10 @@ bool Vehicle::active(void)
void
Vehicle
::
setActive
(
bool
active
)
{
if
(
_active
!=
active
)
{
_active
=
active
;
emit
activeChanged
(
_active
);
}
_startJoystick
(
_active
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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