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
4c6bd390
Commit
4c6bd390
authored
Dec 10, 2010
by
Mariano Lizarraga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
git://github.com/pixhawk/qgroundcontrol
into dev
parents
84dfb69d
ac8a86ef
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
117 additions
and
73 deletions
+117
-73
.gitignore
.gitignore
+4
-0
kinect.cal
data/kinect.cal
+32
-30
qgroundcontrol.pri
qgroundcontrol.pri
+46
-35
Freenect.cc
src/input/Freenect.cc
+6
-2
Freenect.h
src/input/Freenect.h
+2
-0
UAS.cc
src/uas/UAS.cc
+1
-1
MainWindow.h
src/ui/MainWindow.h
+1
-1
SlugsHilSim.cc
src/ui/SlugsHilSim.cc
+5
-2
SlugsHilSim.h
src/ui/SlugsHilSim.h
+0
-0
SlugsHilSim.ui
src/ui/SlugsHilSim.ui
+0
-0
SlugsPIDControl.cpp
src/ui/SlugsPIDControl.cpp
+18
-2
SlugsPIDControl.h
src/ui/SlugsPIDControl.h
+2
-0
No files found.
.gitignore
View file @
4c6bd390
...
@@ -27,3 +27,7 @@ deploy/linux
...
@@ -27,3 +27,7 @@ deploy/linux
controller_log*
controller_log*
user_config.pri
user_config.pri
*.app
*.app
*.ncb
*.vcproj
*.sln
\ No newline at end of file
data/kinect.cal
View file @
4c6bd390
[rgb]
[rgb]
principal_point\x=31
3.67245
principal_point\x=31
4.70228964
principal_point\y=264.
06175
principal_point\y=264.
30478827
focal_length\x=527.
44654
focal_length\x=527.
91246131
focal_length\y=527.
40652
focal_length\y=527.
91246131
distortion\k1=0.20
780
distortion\k1=0.20
496745
distortion\k2=-0.3
4320
distortion\k2=-0.3
6341243
distortion\k3=0.00
139
distortion\k3=0.00
000000
distortion\k4=0.000
61
distortion\k4=0.000
00000
distortion\k5=0.00000
distortion\k5=0.00000
000
[depth]
[depth]
principal_point\x=31
3.23400
principal_point\x=31
1.88621344
principal_point\y=24
6.13447
principal_point\y=24
7.63447078
focal_length\x=5
87.62150
focal_length\x=5
93.89813561
focal_length\y=5
87.51184
focal_length\y=5
93.89813561
distortion\k1=0.0
1063
distortion\k1=0.0
0000000
distortion\k2=
-0.04479
distortion\k2=
0.00000000
distortion\k3=
-0.00073
distortion\k3=
0.00000000
distortion\k4=0.000
81
distortion\k4=0.000
00000
distortion\k5=0.00000
distortion\k5=0.00000
000
[transform]
[transform]
R11=0.99994
R11=0.999982
R12=0.00098102
R12=0.000556
R13=0.010900
R13=0.005927
R21=-0.00097894
R21=-0.000563
R22=1.0
R22=0.999999
R23=-0.00019534
R23=0.001235
R33=-0.010900
R33=-0.005926
R32=0.00018466
R32=-0.001239
R33=0.99994
R33=0.999982
Tx=-0.02581986
Tx=-0.024287
Ty=-0.0130948
Ty=0.001018
Tz=-0.0047681
Tz=-0.015195
baseline=0.06061
disparity_offset=1092.3403
qgroundcontrol.pri
View file @
4c6bd390
...
@@ -34,10 +34,10 @@ release {
...
@@ -34,10 +34,10 @@ release {
# DEFINES += QT_NO_WARNING_OUTPUT
# DEFINES += QT_NO_WARNING_OUTPUT
}
}
QMAKE_P
RE
_LINK += echo "Copying files"
QMAKE_P
OST
_LINK += echo "Copying files"
#QMAKE_P
RE
_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
#QMAKE_P
OST
_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
#QMAKE_P
RE
_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
#QMAKE_P
OST
_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
# MAC OS X
# MAC OS X
macx {
macx {
...
@@ -77,11 +77,11 @@ macx {
...
@@ -77,11 +77,11 @@ macx {
ICON = $$BASEDIR/images/icons/macx.icns
ICON = $$BASEDIR/images/icons/macx.icns
# Copy audio files if needed
# Copy audio files if needed
QMAKE_P
RE
_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
QMAKE_P
OST
_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy google earth starter file
# Copy google earth starter file
QMAKE_P
RE
_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
QMAKE_P
OST
_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy model files
# Copy model files
#QMAKE_P
RE
_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
#QMAKE_P
OST
_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
# No check for GLUT.framework since it's a MAC default
# No check for GLUT.framework since it's a MAC default
...
@@ -155,7 +155,7 @@ linux-g++ {
...
@@ -155,7 +155,7 @@ linux-g++ {
#DESTDIR = $$BUILDDIR/release
#DESTDIR = $$BUILDDIR/release
}
}
QMAKE_P
RE
_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
QMAKE_P
OST
_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
INCLUDEPATH += /usr/include \
INCLUDEPATH += /usr/include \
/usr/include/qt4/phonon
/usr/include/qt4/phonon
...
@@ -179,7 +179,8 @@ linux-g++ {
...
@@ -179,7 +179,8 @@ linux-g++ {
message("Building support for OpenSceneGraph")
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
DEPENDENCIES_PRESENT += osg
# Include OpenSceneGraph libraries
# Include OpenSceneGraph libraries
LIBS += -losg
LIBS += -losg \
-losgViewer
DEFINES += QGC_OSG_ENABLED
DEFINES += QGC_OSG_ENABLED
}
}
...
@@ -187,8 +188,7 @@ linux-g++ {
...
@@ -187,8 +188,7 @@ linux-g++ {
message("Building support for osgEarth")
message("Building support for osgEarth")
DEPENDENCIES_PRESENT += osgearth
DEPENDENCIES_PRESENT += osgearth
# Include osgEarth libraries
# Include osgEarth libraries
LIBS += -losgViewer \
LIBS += -losgEarth \
-losgEarth \
-losgEarthUtil
-losgEarthUtil
DEFINES += QGC_OSGEARTH_ENABLED
DEFINES += QGC_OSGEARTH_ENABLED
}
}
...
@@ -202,10 +202,15 @@ linux-g++ {
...
@@ -202,10 +202,15 @@ linux-g++ {
DEFINES += QGC_LIBFREENECT_ENABLED
DEFINES += QGC_LIBFREENECT_ENABLED
}
}
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
debug {
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
QMAKE_POST_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug/.
QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug/.
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release/.
}
release {
QMAKE_POST_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release/.
}
# osg/osgEarth dynamic casts might fail without this compiler option.
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
# see http://osgearth.org/wiki/FAQ for details.
...
@@ -223,7 +228,7 @@ linux-g++-64 {
...
@@ -223,7 +228,7 @@ linux-g++-64 {
#DESTDIR = $$BUILDDIR/release
#DESTDIR = $$BUILDDIR/release
}
}
QMAKE_P
RE
_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
QMAKE_P
OST
_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
INCLUDEPATH += /usr/include \
INCLUDEPATH += /usr/include \
/usr/include/qt4/phonon
/usr/include/qt4/phonon
...
@@ -248,7 +253,8 @@ linux-g++-64 {
...
@@ -248,7 +253,8 @@ linux-g++-64 {
message("Building support for OpenSceneGraph")
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
DEPENDENCIES_PRESENT += osg
# Include OpenSceneGraph libraries
# Include OpenSceneGraph libraries
LIBS += -losg
LIBS += -losg \
-losgViewer
DEFINES += QGC_OSG_ENABLED
DEFINES += QGC_OSG_ENABLED
}
}
...
@@ -256,8 +262,7 @@ linux-g++-64 {
...
@@ -256,8 +262,7 @@ linux-g++-64 {
message("Building support for osgEarth")
message("Building support for osgEarth")
DEPENDENCIES_PRESENT += osgearth
DEPENDENCIES_PRESENT += osgearth
# Include osgEarth libraries
# Include osgEarth libraries
LIBS += -losgViewer \
LIBS += -losgEarth \
-losgEarth \
-losgEarthUtil
-losgEarthUtil
DEFINES += QGC_OSGEARTH_ENABLED
DEFINES += QGC_OSGEARTH_ENABLED
}
}
...
@@ -325,16 +330,19 @@ exists($$BASEDIR/lib/osgEarth123) {
...
@@ -325,16 +330,19 @@ exists($$BASEDIR/lib/osgEarth123) {
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR_WIN\lib\sdl\win32\SDL.dll\" \"$$TARGETDIR_WIN\debug\SDL.dll\"
debug {
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR_WIN\lib\sdl\win32\SDL.dll\" \"$$TARGETDIR_WIN\release
\SDL.dll\"
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll\" \"$$TARGETDIR_WIN\\debug\
\SDL.dll\"
QMAKE_PRE
_LINK += && xcopy \"$$BASEDIR_WIN\audio\" \"$$TARGETDIR_WIN\debug\audio\" /S /E /Y
QMAKE_POST
_LINK += && xcopy \"$$BASEDIR_WIN\audio\" \"$$TARGETDIR_WIN\debug\audio\" /S /E /Y
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\audio\" \"$$TARGETDIR_WIN\release\audio
\" /S /E /Y
QMAKE_POST_LINK += && xcopy \"$$BASEDIR_WIN\models\" \"$$TARGETDIR_WIN\debug\models
\" /S /E /Y
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\models\" \"$$TARGETDIR_WIN\debug\models\" /S /E /Y
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR/images/earth.html $$TARGETDIR_WIN\debug\"
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\models\" \"$$TARGETDIR_WIN\release\models\" /S /E /Y
}
# Copy google earth starter file
release {
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR/images/earth.html $$TARGETDIR_WIN\release\"
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR_WIN\lib\sdl\win32\SDL.dll\" \"$$TARGETDIR_WIN\release\SDL.dll\"
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR/images/earth.html $$TARGETDIR_WIN\debug\"
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
QMAKE_POST_LINK += && copy /Y \"$$BASEDIR/images/earth.html $$TARGETDIR_WIN\release\"
}
}
}
...
@@ -366,15 +374,18 @@ win32-g++ {
...
@@ -366,15 +374,18 @@ win32-g++ {
RC_FILE = $$BASEDIR/qgroundcontrol.rc
RC_FILE = $$BASEDIR/qgroundcontrol.rc
# Copy dependencies
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR_WIN\lib\sdl\win32\SDL.dll\" \"$$TARGETDIR_WIN\debug\SDL.dll\"
debug {
QMAKE_PRE_LINK += && copy /Y \"$$BASEDIR_WIN\lib\sdl\win32\SDL.dll\" \"$$TARGETDIR_WIN\release\SDL.dll\"
QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/SDL.dll
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\audio\" \"$$TARGETDIR_WIN\debug\audio\" /S /E /Y
QMAKE_POST_LINK += && cp -r $$BASEDIR/audio $$TARGETDIR/debug/audio
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\audio\" \"$$TARGETDIR_WIN\release\audio\" /S /E /Y
QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/debug/models
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\models\" \"$$TARGETDIR_WIN\debug\models\" /S /E /Y
}
QMAKE_PRE_LINK += && xcopy \"$$BASEDIR_WIN\models\" \"$$TARGETDIR_WIN\release\models\" /S /E /Y
release {
QMAKE_POST_LINK += && cp $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/SDL.dll
QMAKE_POST_LINK += && cp -r $$BASEDIR/audio $$TARGETDIR/release/audio
QMAKE_POST_LINK += && cp -r $$BASEDIR/models $$TARGETDIR/release/models
}
# osg/osgEarth dynamic casts might fail without this compiler option.
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
# see http://osgearth.org/wiki/FAQ for details.
...
...
src/input/Freenect.cc
View file @
4c6bd390
...
@@ -208,8 +208,9 @@ Freenect::get3DPointCloudData(void)
...
@@ -208,8 +208,9 @@ Freenect::get3DPointCloudData(void)
{
{
if
(
data
[
i
]
>
0
&&
data
[
i
]
<=
2048
)
if
(
data
[
i
]
>
0
&&
data
[
i
]
<=
2048
)
{
{
// see www.ros.org/wiki/kinect_node for details
double
range
=
baseline
*
depthCameraParameters
.
fx
double
range
=
1.0
f
/
(
-
0.00307
f
*
static_cast
<
float
>
(
data
[
i
])
+
3.33
f
);
/
(
1.0
/
8.0
*
(
disparityOffset
-
static_cast
<
double
>
(
data
[
i
])));
if
(
range
>
0.0
f
)
if
(
range
>
0.0
f
)
{
{
...
@@ -341,6 +342,9 @@ Freenect::readConfigFile(void)
...
@@ -341,6 +342,9 @@ Freenect::readConfigFile(void)
settings
.
value
(
"transform/Tz"
).
toDouble
(),
settings
.
value
(
"transform/Tz"
).
toDouble
(),
0.0
,
0.0
,
0.0
,
1.0
);
0.0
,
0.0
,
0.0
,
1.0
);
transformMatrix
=
transformMatrix
.
transposed
();
transformMatrix
=
transformMatrix
.
transposed
();
baseline
=
settings
.
value
(
"transform/baseline"
).
toDouble
();
disparityOffset
=
settings
.
value
(
"transform/disparity_offset"
).
toDouble
();
}
}
void
void
...
...
src/input/Freenect.h
View file @
4c6bd390
...
@@ -119,6 +119,8 @@ private:
...
@@ -119,6 +119,8 @@ private:
IntrinsicCameraParameters
depthCameraParameters
;
IntrinsicCameraParameters
depthCameraParameters
;
QMatrix4x4
transformMatrix
;
QMatrix4x4
transformMatrix
;
double
baseline
;
double
disparityOffset
;
// tilt angle of Kinect camera
// tilt angle of Kinect camera
int
tiltAngle
;
int
tiltAngle
;
...
...
src/uas/UAS.cc
View file @
4c6bd390
...
@@ -637,7 +637,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -637,7 +637,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
for
(
int
i
=
0
;
i
<
MAVLINK_MSG_RADIO_CALIBRATION_FIELD_THROTTLE_LEN
;
++
i
)
for
(
int
i
=
0
;
i
<
MAVLINK_MSG_RADIO_CALIBRATION_FIELD_THROTTLE_LEN
;
++
i
)
throttle
<<
radioMsg
.
throttle
[
i
];
throttle
<<
radioMsg
.
throttle
[
i
];
QPointer
<
RadioCalibrationData
>
radioData
=
new
RadioCalibrationData
(
aileron
,
QPointer
<
RadioCalibrationData
>
radioData
=
new
RadioCalibrationData
(
aileron
,
elevator
,
rudder
,
gyro
,
pitch
,
throttle
);
emit
radioCalibrationReceived
(
radioData
);
emit
radioCalibrationReceived
(
radioData
);
delete
radioData
;
delete
radioData
;
}
}
...
...
src/ui/MainWindow.h
View file @
4c6bd390
...
@@ -70,7 +70,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -70,7 +70,7 @@ This file is part of the QGROUNDCONTROL project
#include "SlugsPIDControl.h"
#include "SlugsPIDControl.h"
#include "
slugshils
im.h"
#include "
SlugsHilS
im.h"
#include "SlugsVideoCamControl.h"
#include "SlugsVideoCamControl.h"
...
...
src/ui/
slugshils
im.cc
→
src/ui/
SlugsHilS
im.cc
View file @
4c6bd390
...
@@ -28,8 +28,8 @@ This file is part of the QGROUNDCONTROL project
...
@@ -28,8 +28,8 @@ This file is part of the QGROUNDCONTROL project
*/
*/
#include "
slugshils
im.h"
#include "
SlugsHilS
im.h"
#include "ui_
slugshils
im.h"
#include "ui_
SlugsHilS
im.h"
#include "LinkManager.h"
#include "LinkManager.h"
SlugsHilSim
::
SlugsHilSim
(
QWidget
*
parent
)
:
SlugsHilSim
::
SlugsHilSim
(
QWidget
*
parent
)
:
...
@@ -143,6 +143,8 @@ void SlugsHilSim::processHilDatagram(const QByteArray* datagram){
...
@@ -143,6 +143,8 @@ void SlugsHilSim::processHilDatagram(const QByteArray* datagram){
// GPS
// GPS
mavlink_gps_raw_t
tmpGpsRaw
;
mavlink_gps_raw_t
tmpGpsRaw
;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_gps_date_time_t
tmpGpsTime
;
mavlink_gps_date_time_t
tmpGpsTime
;
tmpGpsTime
.
year
=
datagram
->
at
(
i
++
);
tmpGpsTime
.
year
=
datagram
->
at
(
i
++
);
...
@@ -165,6 +167,7 @@ void SlugsHilSim::processHilDatagram(const QByteArray* datagram){
...
@@ -165,6 +167,7 @@ void SlugsHilSim::processHilDatagram(const QByteArray* datagram){
mavlink_msg_gps_date_time_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
tmpGpsTime
);
mavlink_msg_gps_date_time_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
tmpGpsTime
);
activeUas
->
sendMessage
(
hilLink
,
msg
);
activeUas
->
sendMessage
(
hilLink
,
msg
);
#endif
memset
(
&
msg
,
0
,
sizeof
(
mavlink_message_t
));
memset
(
&
msg
,
0
,
sizeof
(
mavlink_message_t
));
...
...
src/ui/
slugshils
im.h
→
src/ui/
SlugsHilS
im.h
View file @
4c6bd390
File moved
src/ui/
slugshils
im.ui
→
src/ui/
SlugsHilS
im.ui
View file @
4c6bd390
File moved
src/ui/SlugsPIDControl.cpp
View file @
4c6bd390
...
@@ -46,9 +46,9 @@ SlugsPIDControl::SlugsPIDControl(QWidget *parent) :
...
@@ -46,9 +46,9 @@ SlugsPIDControl::SlugsPIDControl(QWidget *parent) :
*/
*/
void
SlugsPIDControl
::
activeUasSet
(
UASInterface
*
uas
)
void
SlugsPIDControl
::
activeUasSet
(
UASInterface
*
uas
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
SlugsMAV
*
slugsMav
=
dynamic_cast
<
SlugsMAV
*>
(
uas
);
SlugsMAV
*
slugsMav
=
dynamic_cast
<
SlugsMAV
*>
(
uas
);
#ifdef MAVLINK_ENABLED_SLUGS
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
connect
(
slugsMav
,
SIGNAL
(
slugsActionAck
(
int
,
const
mavlink_action_ack_t
&
)),
this
,
SLOT
(
recibeMensaje
(
int
,
mavlink_action_ack_t
)));
connect
(
slugsMav
,
SIGNAL
(
slugsActionAck
(
int
,
const
mavlink_action_ack_t
&
)),
this
,
SLOT
(
recibeMensaje
(
int
,
mavlink_action_ack_t
)));
...
@@ -187,6 +187,7 @@ void SlugsPIDControl::changeColor_GREEN_AirSpeed_groupBox()
...
@@ -187,6 +187,7 @@ void SlugsPIDControl::changeColor_GREEN_AirSpeed_groupBox()
{
{
//create the packet
//create the packet
#ifdef MAVLINK_ENABLED_SLUGS
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
0
;
pidMessage
.
idx
=
0
;
pidMessage
.
pVal
=
ui
->
dT_P_set
->
text
().
toFloat
();
pidMessage
.
pVal
=
ui
->
dT_P_set
->
text
().
toFloat
();
...
@@ -197,6 +198,7 @@ void SlugsPIDControl::changeColor_GREEN_AirSpeed_groupBox()
...
@@ -197,6 +198,7 @@ void SlugsPIDControl::changeColor_GREEN_AirSpeed_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
AirSpeedHold_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
AirSpeedHold_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
@@ -232,6 +234,7 @@ void SlugsPIDControl::changeColor_GREEN_PitchFollowei_groupBox()
...
@@ -232,6 +234,7 @@ void SlugsPIDControl::changeColor_GREEN_PitchFollowei_groupBox()
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//create the packet
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
2
;
pidMessage
.
idx
=
2
;
...
@@ -243,6 +246,7 @@ void SlugsPIDControl::changeColor_GREEN_PitchFollowei_groupBox()
...
@@ -243,6 +246,7 @@ void SlugsPIDControl::changeColor_GREEN_PitchFollowei_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
PitchFlowei_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
PitchFlowei_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
@@ -280,6 +284,7 @@ void SlugsPIDControl::changeColor_GREEN_RollControl_groupBox()
...
@@ -280,6 +284,7 @@ void SlugsPIDControl::changeColor_GREEN_RollControl_groupBox()
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//create the packet
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
4
;
pidMessage
.
idx
=
4
;
...
@@ -291,6 +296,7 @@ void SlugsPIDControl::changeColor_GREEN_RollControl_groupBox()
...
@@ -291,6 +296,7 @@ void SlugsPIDControl::changeColor_GREEN_RollControl_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
RollControl_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
RollControl_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
@@ -340,6 +346,7 @@ void SlugsPIDControl::changeColor_GREEN_HeigthError_groupBox()
...
@@ -340,6 +346,7 @@ void SlugsPIDControl::changeColor_GREEN_HeigthError_groupBox()
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//create the packet
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
1
;
pidMessage
.
idx
=
1
;
...
@@ -351,6 +358,7 @@ void SlugsPIDControl::changeColor_GREEN_HeigthError_groupBox()
...
@@ -351,6 +358,7 @@ void SlugsPIDControl::changeColor_GREEN_HeigthError_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
HeightErrorLoPitch_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
HeightErrorLoPitch_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
@@ -399,6 +407,7 @@ void SlugsPIDControl::changeColor_GREEN_YawDamper_groupBox()
...
@@ -399,6 +407,7 @@ void SlugsPIDControl::changeColor_GREEN_YawDamper_groupBox()
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//create the packet
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
3
;
pidMessage
.
idx
=
3
;
...
@@ -410,6 +419,7 @@ void SlugsPIDControl::changeColor_GREEN_YawDamper_groupBox()
...
@@ -410,6 +419,7 @@ void SlugsPIDControl::changeColor_GREEN_YawDamper_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
YawDamper_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
YawDamper_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
@@ -460,6 +470,7 @@ void SlugsPIDControl::changeColor_GREEN_Pitch2dT_groupBox()
...
@@ -460,6 +470,7 @@ void SlugsPIDControl::changeColor_GREEN_Pitch2dT_groupBox()
if
(
slugsMav
!=
NULL
)
if
(
slugsMav
!=
NULL
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//create the packet
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
8
;
pidMessage
.
idx
=
8
;
...
@@ -471,6 +482,7 @@ void SlugsPIDControl::changeColor_GREEN_Pitch2dT_groupBox()
...
@@ -471,6 +482,7 @@ void SlugsPIDControl::changeColor_GREEN_Pitch2dT_groupBox()
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
slugsMav
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
#endif
ui
->
Pitch2dTFFterm_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
Pitch2dTFFterm_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
}
}
...
@@ -541,10 +553,12 @@ void SlugsPIDControl::receivePidValues(int systemId, const mavlink_pid_t &pidVal
...
@@ -541,10 +553,12 @@ void SlugsPIDControl::receivePidValues(int systemId, const mavlink_pid_t &pidVal
}
}
}
}
#endif // MAVLINK_ENABLED_SLUG
void
SlugsPIDControl
::
sendMessagePIDStatus
(
int
PIDtype
)
void
SlugsPIDControl
::
sendMessagePIDStatus
(
int
PIDtype
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
//ToDo remplace actionId values
//ToDo remplace actionId values
...
@@ -626,6 +640,7 @@ void SlugsPIDControl::sendMessagePIDStatus(int PIDtype)
...
@@ -626,6 +640,7 @@ void SlugsPIDControl::sendMessagePIDStatus(int PIDtype)
}
}
}
}
#endif // MAVLINK_ENABLED_SLUG
}
}
void
SlugsPIDControl
::
slugsGetGeneral
()
void
SlugsPIDControl
::
slugsGetGeneral
()
...
@@ -695,6 +710,8 @@ void SlugsPIDControl::slugsSetGeneral()
...
@@ -695,6 +710,8 @@ void SlugsPIDControl::slugsSetGeneral()
counterRefreshSet
++
;
counterRefreshSet
++
;
valuesMutex
.
unlock
();
valuesMutex
.
unlock
();
}
}
void
SlugsPIDControl
::
slugsTimerStartSet
()
void
SlugsPIDControl
::
slugsTimerStartSet
()
{
{
counterRefreshSet
=
1
;
counterRefreshSet
=
1
;
...
@@ -714,4 +731,3 @@ void SlugsPIDControl::slugsTimerStop()
...
@@ -714,4 +731,3 @@ void SlugsPIDControl::slugsTimerStop()
// counterRefresh = 1;
// counterRefresh = 1;
}
}
#endif // MAVLINK_ENABLED_SLUGS
src/ui/SlugsPIDControl.h
View file @
4c6bd390
...
@@ -277,8 +277,10 @@ private:
...
@@ -277,8 +277,10 @@ private:
QString
ORIGINcolorStyle
;
QString
ORIGINcolorStyle
;
//SlugsMav Message
//SlugsMav Message
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_pid_t
pidMessage
;
mavlink_pid_t
pidMessage
;
mavlink_slugs_action_t
actionSlugs
;
mavlink_slugs_action_t
actionSlugs
;
#endif
QTimer
*
refreshTimerSet
;
///< The main timer, controls the update view
QTimer
*
refreshTimerSet
;
///< The main timer, controls the update view
QTimer
*
refreshTimerGet
;
///< The main timer, controls the update view
QTimer
*
refreshTimerGet
;
///< The main timer, controls the update 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