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
692f2e9c
Unverified
Commit
692f2e9c
authored
Feb 01, 2018
by
Don Gagne
Committed by
GitHub
Feb 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6091 from DonLakeFlyer/HighLatency
More work in high latency
parents
44db5529
c51d716d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+1
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-2
Vehicle.h
src/Vehicle/Vehicle.h
+1
-0
No files found.
src/Vehicle/MultiVehicleManager.cc
View file @
692f2e9c
...
...
@@ -359,7 +359,7 @@ void MultiVehicleManager::_sendGCSHeartbeat(void)
LinkManager
*
linkMgr
=
_toolbox
->
linkManager
();
for
(
int
i
=
0
;
i
<
linkMgr
->
links
().
count
();
i
++
)
{
LinkInterface
*
link
=
linkMgr
->
links
()[
i
];
if
(
link
->
isConnected
())
{
if
(
link
->
isConnected
()
&&
!
link
->
highLatency
()
)
{
mavlink_message_t
message
;
mavlink_msg_heartbeat_pack_chan
(
_mavlinkProtocol
->
getSystemId
(),
_mavlinkProtocol
->
getComponentId
(),
...
...
src/Vehicle/Vehicle.cc
View file @
692f2e9c
...
...
@@ -221,7 +221,7 @@ Vehicle::Vehicle(LinkInterface* link,
// Send MAV_CMD ack timer
_mavCommandAckTimer
.
setSingleShot
(
true
);
_mavCommandAckTimer
.
setInterval
(
_mavCommandAckTimeoutMSecs
);
_mavCommandAckTimer
.
setInterval
(
_
highLatencyLink
?
_mavCommandAckTimeoutMSecsHighLatency
:
_
mavCommandAckTimeoutMSecs
);
connect
(
&
_mavCommandAckTimer
,
&
QTimer
::
timeout
,
this
,
&
Vehicle
::
_sendMavCommandAgain
);
_mav
=
uas
();
...
...
@@ -833,8 +833,9 @@ void Vehicle::_handleHighLatency2(mavlink_message_t& message)
_airSpeedFact
.
setRawValue
((
double
)
highLatency2
.
airspeed
/
5.0
);
_groundSpeedFact
.
setRawValue
((
double
)
highLatency2
.
groundspeed
/
5.0
);
_climbRateFact
.
setRawValue
((
double
)
highLatency2
.
climb_rate
/
10.0
);
_headingFact
.
setRawValue
((
double
)
highLatency2
.
heading
*
2.0
);
_altitudeRelativeFact
.
setRawValue
(
std
::
numeric_limits
<
double
>::
quiet_NaN
());
_altitudeAMSLFact
.
setRawValue
(
highLatency2
.
altitude
);
_windFactGroup
.
direction
()
->
setRawValue
((
double
)
highLatency2
.
wind_heading
*
2.0
);
_windFactGroup
.
speed
()
->
setRawValue
((
double
)
highLatency2
.
windspeed
/
5.0
);
...
...
@@ -1497,6 +1498,7 @@ void Vehicle::_updatePriorityLink(void)
if
(
newPriorityLink
)
{
_priorityLink
=
_toolbox
->
linkManager
()
->
sharedLinkInterfacePointerForLink
(
newPriorityLink
);
_updateHighLatencyLink
();
}
}
...
...
@@ -3028,6 +3030,7 @@ void Vehicle::_updateHighLatencyLink(void)
{
if
(
_priorityLink
->
highLatency
()
!=
_highLatencyLink
)
{
_highLatencyLink
=
_priorityLink
->
highLatency
();
_mavCommandAckTimer
.
setInterval
(
_highLatencyLink
?
_mavCommandAckTimeoutMSecsHighLatency
:
_mavCommandAckTimeoutMSecs
);
emit
highLatencyLinkChanged
(
_highLatencyLink
);
}
}
...
...
src/Vehicle/Vehicle.h
View file @
692f2e9c
...
...
@@ -1016,6 +1016,7 @@ private:
int
_mavCommandRetryCount
;
static
const
int
_mavCommandMaxRetryCount
=
3
;
static
const
int
_mavCommandAckTimeoutMSecs
=
3000
;
static
const
int
_mavCommandAckTimeoutMSecsHighLatency
=
120000
;
QString
_prearmError
;
QTimer
_prearmErrorTimer
;
...
...
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