Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e36b3c1c
Commit
e36b3c1c
authored
Jul 16, 2013
by
Bill Bonney
Browse files
Merge branch 'master' of
https://github.com/diydrones/apm_planner
parents
eb8d8faa
111300d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
libs/serialport/qserialportglobal.h
View file @
e36b3c1c
...
...
@@ -51,12 +51,12 @@ QT_BEGIN_NAMESPACE
# if defined(QT_BUILD_SERIALPORT_LIB)
# define Q_SERIALPORT_EXPORT Q_DECL_EXPORT
# else
# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT
//
# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_SERIALPORT_EXPORT
#endif
# define Q_SERIALPORT_EXPORT
// The macro has been available only since Qt 5.0
#ifndef Q_DECL_OVERRIDE
#define Q_DECL_OVERRIDE
...
...
src/ui/XbeeConfigurationWindow.cpp
View file @
e36b3c1c
...
...
@@ -8,7 +8,8 @@
#include
<qdatastream.h>
#ifdef _WIN32
#include
<QextSerialEnumerator.h>
//#include <QextSerialEnumerator.h>
#include
<qserialportinfo.h>
#endif
#if defined (__APPLE__) && defined (__MACH__)
...
...
@@ -368,11 +369,12 @@ void XbeeConfigurationWindow::setupPortList()
#ifdef _WIN32
// Get the ports available on this system
QList
<
QextPortInfo
>
ports
=
QextSerialEnumerator
::
getPorts
();
QList
<
QSerialPortInfo
>
ports
=
QSerialPortInfo
::
availablePorts
();
//QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
// Add the ports in reverse order, because we prepend them to the list
for
(
int
i
=
ports
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
QString
portString
=
QString
(
ports
.
at
(
i
).
portName
.
toLocal8Bit
().
constData
())
+
" - "
+
QString
(
ports
.
at
(
i
).
friendName
.
toLocal8Bit
().
constData
()).
split
(
"("
).
first
()
;
QString
portString
=
QString
(
ports
.
at
(
i
).
portName
.
toLocal8Bit
().
constData
());
// Prepend newly found port to the list
if
(
portBox
->
findText
(
portString
)
==
-
1
)
{
portBox
->
insertItem
(
0
,
portString
);
...
...
src/ui/configuration/FlightModeConfig.cc
View file @
e36b3c1c
...
...
@@ -152,12 +152,12 @@ void FlightModeConfig::saveButtonClicked()
}
else
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_QUADROTOR
)
{
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE1"
,(
char
)
ui
.
mode1ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE2"
,(
char
)
ui
.
mode2ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE3"
,(
char
)
ui
.
mode3ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE4"
,(
char
)
ui
.
mode4ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE5"
,(
char
)
ui
.
mode5ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE6"
,(
char
)
ui
.
mode6ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE1"
,(
char
)
ui
.
mode1ComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE2"
,(
char
)
ui
.
mode2ComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE3"
,(
char
)
ui
.
mode3ComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE4"
,(
char
)
ui
.
mode4ComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE5"
,(
char
)
ui
.
mode5ComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE6"
,(
char
)
ui
.
mode6ComboBox
->
currentIndex
());
}
}
...
...
@@ -280,27 +280,27 @@ void FlightModeConfig::parameterChanged(int uas, int component, QString paramete
{
if
(
parameterName
==
"FLTMODE1"
)
{
ui
.
mode1ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode1ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
else
if
(
parameterName
==
"FLTMODE2"
)
{
ui
.
mode2ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode2ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
else
if
(
parameterName
==
"FLTMODE3"
)
{
ui
.
mode3ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode3ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
else
if
(
parameterName
==
"FLTMODE4"
)
{
ui
.
mode4ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode4ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
else
if
(
parameterName
==
"FLTMODE5"
)
{
ui
.
mode5ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode5ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
else
if
(
parameterName
==
"FLTMODE6"
)
{
ui
.
mode6ComboBox
->
setCurrentIndex
(
value
.
toInt
()
-
1
);
ui
.
mode6ComboBox
->
setCurrentIndex
(
value
.
toInt
());
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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