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
34069414
Commit
34069414
authored
Jul 10, 2010
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add slugs messages
parent
f38fc465
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
11 deletions
+112
-11
qgroundcontrol.pri
qgroundcontrol.pri
+7
-4
qgroundcontrol.pro
qgroundcontrol.pro
+8
-3
main.cc
src/main.cc
+4
-3
SlugsMAV.cc
src/uas/SlugsMAV.cc
+91
-1
SlugsMAV.h
src/uas/SlugsMAV.h
+1
-0
UAS.cc
src/uas/UAS.cc
+1
-0
No files found.
qgroundcontrol.pri
View file @
34069414
...
...
@@ -120,12 +120,15 @@ win32 {
# Special settings for debug
#CONFIG += CONSOLE
LIBS += -L$$BASEDIR\lib\sdl\win32 \
-lmingw32 -lSDLmain -lSDL -mwindows
INCLUDEPATH += $$BASEDIR/lib/sdl/include #\
INCLUDEPATH += $$BASEDIR\lib\sdl\include #\
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
LIBS += -L$$BASEDIR\lib\sdl\win32 \
-lmingw32 -lSDLmain -lSDL -mwindows
debug {
DESTDIR = $$BASEDIR/bin
}
...
...
qgroundcontrol.pro
View file @
34069414
...
...
@@ -42,9 +42,14 @@ DEPENDPATH += . \
plugins
INCLUDEPATH
+=
.
\
lib
/
QMapControl
\
..
/
mavlink
/
include
\
MAVLink
/
include
\
mavlink
/
include
..
/
mavlink
/
contrib
/
slugs
/
include
\
MAVLink
/
contrib
/
slugs
/
include
\
mavlink
/
contrib
/
slugs
/
include
#
..
/
mavlink
/
include
\
#
MAVLink
/
include
\
#
mavlink
/
include
#
Input
FORMS
+=
src
/
ui
/
MainWindow
.
ui
\
...
...
src/main.cc
View file @
34069414
...
...
@@ -33,10 +33,11 @@ This file is part of the PIXHAWK project
#include "MainWindow.h"
#include "configuration.h"
/* SDL does ugly things to main() */
#ifdef main
# undef main
#endif
//
#ifdef main
//
# undef main
//
#endif
/**
* @brief Starts the application
...
...
src/uas/SlugsMAV.cc
View file @
34069414
...
...
@@ -21,12 +21,102 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
// Let UAS handle the default message set
UAS
::
receiveMessage
(
link
,
message
);
// Handle your special messages
// Handle your special messages mavlink_message_t* msg = &message;
switch
(
message
.
msgid
)
{
case
MAVLINK_MSG_ID_HEARTBEAT
:
{
qDebug
()
<<
"SLUGS RECEIVED HEARTBEAT"
;
break
;
}
case
MAVLINK_MSG_ID_CPU_LOAD
:
{
mavlink_cpu_load_t
cpu_load
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_cpu_load_decode
(
&
message
,
&
cpu_load
);
emit
valueChanged
(
uasId
,
"CPU Load"
,
cpu_load
.
target
,
time
);
emit
valueChanged
(
uasId
,
"SensorDSC Load"
,
cpu_load
.
sensLoad
,
time
);
emit
valueChanged
(
uasId
,
"ControlDSC Load"
,
cpu_load
.
ctrlLoad
,
time
);
emit
valueChanged
(
uasId
,
"Battery Volt"
,
cpu_load
.
batVolt
,
time
);
break
;
}
case
MAVLINK_MSG_ID_AIR_DATA
:
{
mavlink_air_data_t
air_data
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_air_data_decode
(
&
message
,
&
air_data
);
emit
valueChanged
(
uasId
,
"Air Data"
,
air_data
.
target
,
time
);
emit
valueChanged
(
uasId
,
"Presion Dinamica"
,
air_data
.
dynamicPressure
,
time
);
emit
valueChanged
(
uasId
,
"Presion Estatica"
,
air_data
.
staticPressure
,
time
);
emit
valueChanged
(
uasId
,
"Temperatura"
,
air_data
.
temperature
,
time
);
break
;
}
case
MAVLINK_MSG_ID_SENSOR_BIAS
:
{
mavlink_sensor_bias_t
sensor_bias
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_sensor_bias_decode
(
&
message
,
&
sensor_bias
);
emit
valueChanged
(
uasId
,
"Sensor Bias"
,
sensor_bias
.
target
,
time
);
emit
valueChanged
(
uasId
,
"Acelerometro X"
,
sensor_bias
.
axBias
,
time
);
emit
valueChanged
(
uasId
,
"Acelerometro y"
,
sensor_bias
.
ayBias
,
time
);
emit
valueChanged
(
uasId
,
"Acelerometro Z"
,
sensor_bias
.
azBias
,
time
);
emit
valueChanged
(
uasId
,
"Gyro X"
,
sensor_bias
.
gxBias
,
time
);
emit
valueChanged
(
uasId
,
"Gyro Y"
,
sensor_bias
.
gyBias
,
time
);
emit
valueChanged
(
uasId
,
"Gyro Z"
,
sensor_bias
.
gzBias
,
time
);
break
;
}
case
MAVLINK_MSG_ID_DIAGNOSTIC
:
{
mavlink_diagnostic_t
diagnostic
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_diagnostic_decode
(
&
message
,
&
diagnostic
);
emit
valueChanged
(
uasId
,
"Diagnostico"
,
diagnostic
.
target
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico F1"
,
diagnostic
.
diagFl1
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico F2"
,
diagnostic
.
diagFl2
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico F3"
,
diagnostic
.
diagFl3
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico S1"
,
diagnostic
.
diagSh1
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico S2"
,
diagnostic
.
diagSh2
,
time
);
emit
valueChanged
(
uasId
,
"Diagnostico S3"
,
diagnostic
.
diagSh3
,
time
);
break
;
}
case
MAVLINK_MSG_ID_PILOT_CONSOLE
:
{
mavlink_pilot_console_t
pilot
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_pilot_console_decode
(
&
message
,
&
pilot
);
emit
valueChanged
(
uasId
,
"Mensajes PWM"
,
pilot
.
target
,
time
);
emit
valueChanged
(
uasId
,
"Aceleracion Consola"
,
pilot
.
dt
,
time
);
emit
valueChanged
(
uasId
,
"Aleron Izq Consola"
,
pilot
.
dla
,
time
);
emit
valueChanged
(
uasId
,
"Aleron Der Consola"
,
pilot
.
dra
,
time
);
emit
valueChanged
(
uasId
,
"Timon Consola"
,
pilot
.
dr
,
time
);
emit
valueChanged
(
uasId
,
"Elevador Consola"
,
pilot
.
de
,
time
);
break
;
}
case
MAVLINK_MSG_ID_PWM_COMMANDS
:
{
mavlink_pwm_commands_t
pwm
;
quint64
time
=
getUnixTime
(
0
);
mavlink_msg_pwm_commands_decode
(
&
message
,
&
pwm
);
emit
valueChanged
(
uasId
,
"Superficies de Control"
,
pwm
.
target
,
time
);
emit
valueChanged
(
uasId
,
"Comando Aceleracion PA"
,
pwm
.
dt_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Aleron Izq PA"
,
pwm
.
dla_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Aleron Der PA"
,
pwm
.
dra_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Timon PA"
,
pwm
.
dr_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando elevador Izq PA"
,
pwm
.
dle_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Elevador Der PA"
,
pwm
.
dre_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Flap Izq PA"
,
pwm
.
dlf_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Flap Der PA"
,
pwm
.
drf_c
,
time
);
emit
valueChanged
(
uasId
,
"Comando Aux1 PA"
,
pwm
.
aux1
,
time
);
emit
valueChanged
(
uasId
,
"Comando Aux2 PA"
,
pwm
.
aux2
,
time
);
break
;
}
default:
...
...
src/uas/SlugsMAV.h
View file @
34069414
...
...
@@ -6,6 +6,7 @@
class
SlugsMAV
:
public
UAS
{
Q_OBJECT
Q_INTERFACES
(
UASInterface
)
public:
SlugsMAV
(
MAVLinkProtocol
*
mavlink
,
int
id
=
0
);
...
...
src/uas/UAS.cc
View file @
34069414
...
...
@@ -666,6 +666,7 @@ void UAS::writeParametersToStorage()
mavlink_message_t
msg
;
// TODO Replace MG System ID with static function call and allow to change ID in GUI
mavlink_msg_action_pack
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
this
->
getUASID
(),
MAV_COMP_ID_IMU
,
(
uint8_t
)
MAV_ACTION_STORAGE_WRITE
);
//mavlink_msg_action_pack(MG::SYSTEM::ID, MG::SYSTEM::COMPID, &msg, this->getUASID(),(uint8_t)MAV_ACTION_STORAGE_WRITE);
sendMessage
(
msg
);
}
...
...
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