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
443d98cd
Commit
443d98cd
authored
Jul 27, 2011
by
oberion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xbee communication can be opened
parent
fa956f36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
1 deletion
+60
-1
qgroundcontrol.pri
qgroundcontrol.pri
+2
-0
CommConfigurationWindow.cc
src/ui/CommConfigurationWindow.cc
+55
-1
CommConfigurationWindow.h
src/ui/CommConfigurationWindow.h
+3
-0
No files found.
qgroundcontrol.pri
View file @
443d98cd
...
...
@@ -390,6 +390,7 @@ exists($$BASEDIR/lib/osgEarth123) {
QMAKE_POST_LINK += $$quote(xcopy \"$$BASEDIR_WIN\\audio\" \"$$TARGETDIR_WIN\\debug\\audio\\\" /S /E /Y $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\debug\\models\\\" /S /E /Y $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\debug\\earth.html\"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
# QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\debug\\SDL.dll\"
# QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\audio\" \"$$TARGETDIR_WIN\\debug\\audio\\\" /S /E /Y
# QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\debug\\models\\\" /S /E /Y
...
...
@@ -401,6 +402,7 @@ exists($$BASEDIR/lib/osgEarth123) {
QMAKE_POST_LINK += $$quote(xcopy \"$$BASEDIR_WIN\\audio\" \"$$TARGETDIR_WIN\\release\\audio\\\" /S /E /Y $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\release\\models\\\" /S /E /Y $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(copy /Y \"$$BASEDIR_WIN\\images\\earth.html\" \"$$TARGETDIR_WIN\\release\\earth.html\" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(copy /Y "$$BASEDIR_WIN\\thirdParty\\libxbee\\lib\\libxbee.dll" "$$TARGETDIR_WIN\\release"$$escape_expand(\\n))
# QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\release\\SDL.dll\"
# QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\audio\" \"$$TARGETDIR_WIN\\release\\audio\\\" /S /E /Y
# QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\\models\" \"$$TARGETDIR_WIN\\release\\models\\\" /S /E /Y
...
...
src/ui/CommConfigurationWindow.cc
View file @
443d98cd
...
...
@@ -41,6 +41,10 @@ This file is part of the QGROUNDCONTROL project
#include "SerialLink.h"
#include "UDPLink.h"
#include "MAVLinkSimulationLink.h"
#ifdef XBEELINK
#include "XbeeLink.h"
#include "XbeeConfigurationWindow.h"
#endif // XBEELINK
#ifdef OPAL_RT
#include "OpalLink.h"
#include "OpalLinkConfigurationWindow.h"
...
...
@@ -62,6 +66,9 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn
ui
.
linkType
->
addItem
(
tr
(
"UDP"
),
QGC_LINK_UDP
);
ui
.
linkType
->
addItem
(
tr
(
"Simulation"
),
QGC_LINK_SIMULATION
);
ui
.
linkType
->
addItem
(
tr
(
"Opal-RT Link"
),
QGC_LINK_OPAL
);
#ifdef XBEELINK
ui
.
linkType
->
addItem
(
tr
(
"Xbee API"
),
QGC_LINK_XBEE
);
#endif // XBEELINK
ui
.
linkType
->
setEditable
(
false
);
//ui.linkType->setEnabled(false);
...
...
@@ -89,6 +96,10 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn
connect
(
this
->
link
,
SIGNAL
(
connected
(
bool
)),
this
,
SLOT
(
connectionState
(
bool
)));
#ifdef XBEELINK
connect
(
ui
.
linkType
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
setLinkType
(
int
)));
#endif // XBEELINK
// Fill in the current data
if
(
this
->
link
->
isConnected
())
ui
.
connectButton
->
setChecked
(
true
);
//connect(this->link, SIGNAL(connected(bool)), ui.connectButton, SLOT(setChecked(bool)));
...
...
@@ -142,10 +153,23 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn
ui
.
linkGroupBox
->
setTitle
(
tr
(
"Opal-RT Link"
));
}
#endif
#ifdef XBEELINK
XbeeLink
*
xbee
=
dynamic_cast
<
XbeeLink
*>
(
link
);
// new Konrad
if
(
xbee
!=
0
)
{
QWidget
*
conf
=
new
XbeeConfigurationWindow
(
xbee
,
this
);
ui
.
linkScrollArea
->
setWidget
(
conf
);
ui
.
linkGroupBox
->
setTitle
(
tr
(
"Xbee Link"
));
//ui.linkType->setCurrentIndex(4);
}
#endif // XBEELINK
if
(
serial
==
0
&&
udp
==
0
&&
sim
==
0
#ifdef OPAL_RT
&&
opal
==
0
#endif
#ifdef XBEELINK
&&
xbee
==
0
#endif // XBEELINK
)
{
qDebug
()
<<
"Link is NOT a known link, can't open configuration window"
;
}
...
...
@@ -184,8 +208,38 @@ QAction* CommConfigurationWindow::getAction()
void
CommConfigurationWindow
::
setLinkType
(
int
linktype
)
{
#ifdef XBEELINK
// Adjust the form layout per link type
Q_UNUSED
(
linktype
);
if
(
ui
.
linkScrollArea
->
widget
())
{
delete
ui
.
linkScrollArea
->
widget
();
}
switch
(
linktype
)
{
case
4
:
{
XbeeLink
*
xbee
=
new
XbeeLink
();
link
=
xbee
;
LinkManager
::
instance
()
->
add
(
link
);
QWidget
*
conf
=
new
XbeeConfigurationWindow
(
link
);
ui
.
linkScrollArea
->
setWidget
(
conf
);
ui
.
linkGroupBox
->
setTitle
(
tr
(
"Serial Link"
));
break
;
}
case
0
:
{
SerialLink
*
serial
=
new
SerialLink
();
link
=
serial
;
LinkManager
::
instance
()
->
add
(
link
);
QWidget
*
conf
=
new
SerialConfigurationWindow
(
link
,
this
);
ui
.
linkScrollArea
->
setWidget
(
conf
);
ui
.
linkGroupBox
->
setTitle
(
tr
(
"Serial Link"
));
break
;
}
default:
break
;
}
#endif // XBEELINK
}
void
CommConfigurationWindow
::
setProtocol
(
int
protocol
)
...
...
src/ui/CommConfigurationWindow.h
View file @
443d98cd
...
...
@@ -44,6 +44,9 @@ enum qgc_link_t {
QGC_LINK_UDP
,
QGC_LINK_SIMULATION
,
QGC_LINK_FORWARDING
,
#ifdef XBEELINK
QGC_LINK_XBEE
,
#endif
QGC_LINK_OPAL
};
...
...
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