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
b0f341d6
Commit
b0f341d6
authored
Jul 21, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10 sec timeout on vehicle
parent
2f7deb1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Vehicle.cc
src/Vehicle/Vehicle.cc
+11
-1
MockLink.cc
src/comm/MockLink.cc
+2
-2
No files found.
src/Vehicle/Vehicle.cc
View file @
b0f341d6
...
...
@@ -2631,11 +2631,21 @@ bool Vehicle::autoDisarm(void)
void
Vehicle
::
_handleADSBVehicle
(
const
mavlink_message_t
&
message
)
{
mavlink_adsb_vehicle_t
adsbVehicle
;
static
const
int
maxTimeSinceLastSeen
=
10
;
mavlink_msg_adsb_vehicle_decode
(
&
message
,
&
adsbVehicle
);
if
(
adsbVehicle
.
flags
|
ADSB_FLAGS_VALID_COORDS
)
{
if
(
_adsbICAOMap
.
contains
(
adsbVehicle
.
ICAO_address
))
{
_adsbICAOMap
[
adsbVehicle
.
ICAO_address
]
->
update
(
adsbVehicle
);
if
(
adsbVehicle
.
tslc
>
maxTimeSinceLastSeen
)
{
ADSBVehicle
*
vehicle
=
_adsbICAOMap
[
adsbVehicle
.
ICAO_address
];
_adsbVehicles
.
removeOne
(
vehicle
);
_adsbICAOMap
.
remove
(
adsbVehicle
.
ICAO_address
);
vehicle
->
deleteLater
();
}
else
{
if
(
adsbVehicle
.
tslc
<=
maxTimeSinceLastSeen
)
{
_adsbICAOMap
[
adsbVehicle
.
ICAO_address
]
->
update
(
adsbVehicle
);
}
}
}
else
{
ADSBVehicle
*
vehicle
=
new
ADSBVehicle
(
adsbVehicle
,
this
);
_adsbICAOMap
[
adsbVehicle
.
ICAO_address
]
=
vehicle
;
...
...
src/comm/MockLink.cc
View file @
b0f341d6
...
...
@@ -1278,8 +1278,8 @@ void MockLink::_sendADSBVehicles(void)
_mavlinkChannel
,
&
responseMsg
,
12345
,
// ICAO address
(
_vehicleLatitude
+
0.001
)
*
qPow
(
10.0
,
7.0
)
,
(
_vehicleLongitude
+
0.001
)
*
qPow
(
10.0
,
7.0
)
,
(
_vehicleLatitude
+
0.001
)
*
1e7
,
(
_vehicleLongitude
+
0.001
)
*
1e7
,
ADSB_ALTITUDE_TYPE_GEOMETRIC
,
100
*
1000
,
// Altitude in millimeters
10
*
100
,
// Heading in centidegress
...
...
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