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
8f87c7bb
Commit
8f87c7bb
authored
Feb 10, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add autoDisconnect support
parent
4c863206
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+4
-0
Vehicle.h
src/Vehicle/Vehicle.h
+3
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
8f87c7bb
...
...
@@ -97,6 +97,7 @@ Vehicle::Vehicle(LinkInterface* link,
,
_updateCount
(
0
)
,
_rcRSSI
(
0
)
,
_rcRSSIstore
(
100.0
)
,
_autoDisconnect
(
false
)
,
_connectionLost
(
false
)
,
_connectionLostEnabled
(
true
)
,
_missionManager
(
NULL
)
...
...
@@ -1316,6 +1317,9 @@ void Vehicle::_connectionLostTimeout(void)
_heardFrom
=
false
;
emit
connectionLostChanged
(
true
);
_say
(
QString
(
"connection lost to vehicle %1"
).
arg
(
id
()),
GAudioOutput
::
AUDIO_SEVERITY_NOTICE
);
if
(
_autoDisconnect
)
{
disconnectInactiveVehicle
();
}
}
}
...
...
src/Vehicle/Vehicle.h
View file @
8f87c7bb
...
...
@@ -124,6 +124,7 @@ public:
Q_PROPERTY
(
uint
messagesLost
READ
messagesLost
NOTIFY
messagesLostChanged
)
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
bool
multiRotor
READ
multiRotor
CONSTANT
)
Q_PROPERTY
(
bool
autoDisconnect
MEMBER
_autoDisconnect
NOTIFY
autoDisconnectChanged
)
/// Resets link status counters
Q_INVOKABLE
void
resetCounters
();
...
...
@@ -318,6 +319,7 @@ signals:
void
missingParametersChanged
(
bool
missingParameters
);
void
connectionLostChanged
(
bool
connectionLost
);
void
connectionLostEnabledChanged
(
bool
connectionLostEnabled
);
void
autoDisconnectChanged
(
bool
autoDisconnectChanged
);
void
messagesReceivedChanged
();
void
messagesSentChanged
();
...
...
@@ -480,6 +482,7 @@ private:
QString
_formatedMessage
;
int
_rcRSSI
;
double
_rcRSSIstore
;
bool
_autoDisconnect
;
///< true: Automatically disconnect vehicle when last connection goes away or lost heartbeat
// Lost connection handling
bool
_connectionLost
;
...
...
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