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
a61aead3
Commit
a61aead3
authored
Nov 23, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New LinkManager::[connect|disconnect]Link usage
parent
4d92b1d3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
37 deletions
+12
-37
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+2
-32
MAVLinkSimulationLink.h
src/comm/MAVLinkSimulationLink.h
+10
-5
No files found.
src/comm/MAVLinkSimulationLink.cc
View file @
a61aead3
...
...
@@ -853,7 +853,7 @@ void MAVLinkSimulationLink::readBytes()
* @return True if connection has been disconnected, false if connection
* couldn't be disconnected.
**/
bool
MAVLinkSimulationLink
::
disconnect
(
)
bool
MAVLinkSimulationLink
::
_disconnect
(
void
)
{
if
(
isConnected
())
...
...
@@ -877,7 +877,7 @@ bool MAVLinkSimulationLink::disconnect()
* @return True if connection has been established, false if connection
* couldn't be established.
**/
bool
MAVLinkSimulationLink
::
connect
(
)
bool
MAVLinkSimulationLink
::
_connect
(
void
)
{
_isConnected
=
true
;
emit
connected
();
...
...
@@ -892,36 +892,6 @@ bool MAVLinkSimulationLink::connect()
return
true
;
}
/**
* Connect the link.
*
* @param connect true connects the link, false disconnects it
* @return True if connection has been established, false if connection
* couldn't be established.
**/
void
MAVLinkSimulationLink
::
connectLink
()
{
this
->
connect
();
}
/**
* Connect the link.
*
* @param connect true connects the link, false disconnects it
* @return True if connection has been established, false if connection
* couldn't be established.
**/
bool
MAVLinkSimulationLink
::
connectLink
(
bool
connect
)
{
_isConnected
=
connect
;
if
(
connect
)
{
this
->
connect
();
}
return
true
;
}
/**
* Check if connection is active.
*
...
...
src/comm/MAVLinkSimulationLink.h
View file @
a61aead3
...
...
@@ -54,8 +54,6 @@ public:
void
run
();
void
requestReset
()
{
}
bool
connect
();
bool
disconnect
();
// Extensive statistics for scientific purposes
qint64
getConnectionSpeed
()
const
;
...
...
@@ -71,13 +69,16 @@ public:
int
getDataBitsType
()
const
;
int
getStopBitsType
()
const
;
// These are left unimplemented in order to cause linker errors which indicate incorrect usage of
// connect/disconnect on link directly. All connect/disconnect calls should be made through LinkManager.
bool
connect
(
void
);
bool
disconnect
(
void
);
public
slots
:
void
writeBytes
(
const
char
*
data
,
qint64
size
);
void
readBytes
();
/** @brief Mainloop simulating the mainloop of the MAV */
virtual
void
mainloop
();
bool
connectLink
(
bool
connect
);
void
connectLink
();
void
sendMAVLinkMessage
(
const
mavlink_message_t
*
msg
);
...
...
@@ -130,6 +131,10 @@ signals:
void
valueChanged
(
int
uasId
,
QString
curve
,
double
value
,
quint64
usec
);
void
messageReceived
(
const
mavlink_message_t
&
message
);
private:
// From LinkInterface
virtual
bool
_connect
(
void
);
virtual
bool
_disconnect
(
void
);
};
#endif // MAVLINKSIMULATIONLINK_H
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