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
041c840b
Commit
041c840b
authored
Jul 28, 2011
by
oberion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working Xbeelink + DebugConsole ComboBox bugfix
parent
4a851400
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
9 deletions
+36
-9
qgroundcontrol.pri
qgroundcontrol.pri
+1
-1
qgroundcontrol.pro
qgroundcontrol.pro
+1
-0
LinkInterface.cpp
src/comm/LinkInterface.cpp
+6
-0
LinkInterface.h
src/comm/LinkInterface.h
+4
-1
CommConfigurationWindow.cc
src/ui/CommConfigurationWindow.cc
+19
-2
DebugConsole.cc
src/ui/DebugConsole.cc
+4
-4
DebugConsole.h
src/ui/DebugConsole.h
+1
-1
No files found.
qgroundcontrol.pri
View file @
041c840b
...
...
@@ -18,7 +18,7 @@
# -------------------------------------------------
message(Qt version $$[QT_VERSION])
message(Using Qt from $(QTDIR))
message(Using Qt from $
$
(QTDIR))
...
...
qgroundcontrol.pro
View file @
041c840b
...
...
@@ -360,6 +360,7 @@ SOURCES += src/main.cc \
src
/
uas
/
UASManager
.
cc
\
src
/
uas
/
UAS
.
cc
\
src
/
comm
/
LinkManager
.
cc
\
src
/
comm
/
LinkInterface
.
cpp
\
src
/
comm
/
SerialLink
.
cc
\
src
/
comm
/
SerialSimulationLink
.
cc
\
src
/
comm
/
MAVLinkProtocol
.
cc
\
...
...
src/comm/LinkInterface.cpp
0 → 100644
View file @
041c840b
#include "LinkInterface.h"
LinkInterface
::~
LinkInterface
()
{
emit
this
->
deleteLink
(
this
);
}
\ No newline at end of file
src/comm/LinkInterface.h
View file @
041c840b
...
...
@@ -44,7 +44,7 @@ class LinkInterface : public QThread
Q_OBJECT
public:
LinkInterface
(
QObject
*
parent
=
0
)
:
QThread
(
parent
)
{}
//virtual ~LinkInterface() =
0;
virtual
~
LinkInterface
()
=
0
;
/* Connection management */
...
...
@@ -232,6 +232,9 @@ signals:
/** @brief Communication error occured */
void
communicationError
(
const
QString
&
linkname
,
const
QString
&
error
);
/** @brief destroying element */
void
deleteLink
(
LinkInterface
*
const
link
);
protected:
static
int
getNextLinkId
()
{
static
int
nextId
=
0
;
...
...
src/ui/CommConfigurationWindow.cc
View file @
041c840b
...
...
@@ -209,7 +209,6 @@ QAction* CommConfigurationWindow::getAction()
void
CommConfigurationWindow
::
setLinkType
(
int
linktype
)
{
#ifdef XBEELINK
if
(
link
->
isConnected
())
{
// close old configuration window
...
...
@@ -224,6 +223,7 @@ void CommConfigurationWindow::setLinkType(int linktype)
LinkInterface
*
tmpLink
(
NULL
);
switch
(
linktype
)
{
#ifdef XBEELINK
case
4
:
{
XbeeLink
*
xbee
=
new
XbeeLink
();
...
...
@@ -231,6 +231,7 @@ void CommConfigurationWindow::setLinkType(int linktype)
MainWindow
::
instance
()
->
addLink
(
tmpLink
);
break
;
}
#endif // XBEELINK
case
0
:
{
SerialLink
*
serial
=
new
SerialLink
();
...
...
@@ -238,6 +239,23 @@ void CommConfigurationWindow::setLinkType(int linktype)
MainWindow
::
instance
()
->
addLink
(
tmpLink
);
break
;
}
/* case 1:
{
UDPLink *udp = new UDPLink();
tmpLink = udp;
MainWindow::instance()->addLink(tmpLink);
break;
}
*/
#ifdef OPAL_RT
case
3
:
{
OpalLink
*
opal
=
new
OpalLink
();
tmpLink
=
opal
;
MainWindow
::
instance
()
->
addLink
(
tmpLink
);
break
;
}
#endif // OPAL_RT
default:
{
MainWindow
::
instance
()
->
addLink
();
...
...
@@ -254,7 +272,6 @@ void CommConfigurationWindow::setLinkType(int linktype)
break
;
}
}
#endif // XBEELINK
}
void
CommConfigurationWindow
::
setProtocol
(
int
protocol
)
...
...
src/ui/DebugConsole.cc
View file @
041c840b
...
...
@@ -180,12 +180,12 @@ void DebugConsole::addLink(LinkInterface* link)
// Register for name changes
connect
(
link
,
SIGNAL
(
nameChanged
(
QString
)),
this
,
SLOT
(
updateLinkName
(
QString
)));
connect
(
link
,
SIGNAL
(
de
stroyed
(
QObject
*
)),
this
,
SLOT
(
removeLink
(
QObject
*
)));
connect
(
link
,
SIGNAL
(
de
leteLink
(
LinkInterface
*
const
)),
this
,
SLOT
(
removeLink
(
LinkInterface
*
const
)));
}
void
DebugConsole
::
removeLink
(
QObject
*
link
)
void
DebugConsole
::
removeLink
(
LinkInterface
*
const
linkInterface
)
{
LinkInterface
*
linkInterface
=
dynamic_cast
<
LinkInterface
*>
(
link
);
//
LinkInterface* linkInterface = dynamic_cast<LinkInterface*>(link);
// Add link to link list
if
(
links
.
contains
(
linkInterface
))
{
int
linkIndex
=
links
.
indexOf
(
linkInterface
);
...
...
@@ -194,7 +194,7 @@ void DebugConsole::removeLink(QObject* link)
m_ui
->
linkComboBox
->
removeItem
(
linkIndex
);
}
if
(
link
==
currLink
)
currLink
=
NULL
;
if
(
link
Interface
==
currLink
)
currLink
=
NULL
;
}
void
DebugConsole
::
linkSelected
(
int
linkId
)
...
...
src/ui/DebugConsole.h
View file @
041c840b
...
...
@@ -62,7 +62,7 @@ public slots:
/** @brief Add a link to the list of monitored links */
void
addLink
(
LinkInterface
*
link
);
/** @brief Remove a link from the list */
void
removeLink
(
QObject
*
link
);
void
removeLink
(
LinkInterface
*
const
link
);
/** @brief Update a link name */
void
updateLinkName
(
QString
name
);
/** @brief Select a link for the active view */
...
...
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