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
d67528e0
Commit
d67528e0
authored
Aug 09, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to latest MAVLink
parent
d950361a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
17 additions
and
57 deletions
+17
-57
QGCCore.cc
src/QGCCore.cc
+0
-1
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+0
-2
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+4
-4
MAVLinkSimulationWaypointPlanner.cc
src/comm/MAVLinkSimulationWaypointPlanner.cc
+5
-5
QGCMAVLink.h
src/comm/QGCMAVLink.h
+1
-0
main.cc
src/main.cc
+1
-0
PxQuadMAV.cc
src/uas/PxQuadMAV.cc
+1
-1
UAS.cc
src/uas/UAS.cc
+5
-5
bittest.c
thirdParty/mavlink/include/bittest.c
+0
-39
No files found.
src/QGCCore.cc
View file @
d67528e0
...
@@ -44,7 +44,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -44,7 +44,6 @@ This file is part of the QGROUNDCONTROL project
#include "configuration.h"
#include "configuration.h"
#include "QGC.h"
#include "QGC.h"
#include "QGCCore.h"
#include "QGCCore.h"
#include "MG.h"
#include "MainWindow.h"
#include "MainWindow.h"
#include "GAudioOutput.h"
#include "GAudioOutput.h"
...
...
src/comm/MAVLinkProtocol.cc
View file @
d67528e0
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include <QSettings>
#include <QSettings>
#include <QDesktopServices>
#include <QDesktopServices>
//#include "MG.h"
#include "MAVLinkProtocol.h"
#include "MAVLinkProtocol.h"
#include "UASInterface.h"
#include "UASInterface.h"
#include "UASManager.h"
#include "UASManager.h"
...
@@ -28,7 +27,6 @@
...
@@ -28,7 +27,6 @@
#include "ArduPilotMegaMAV.h"
#include "ArduPilotMegaMAV.h"
#include "configuration.h"
#include "configuration.h"
#include "LinkManager.h"
#include "LinkManager.h"
//#include "MainWindow.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include "QGCMAVLinkUASFactory.h"
#include "QGCMAVLinkUASFactory.h"
#include "QGC.h"
#include "QGC.h"
...
...
src/comm/MAVLinkSimulationLink.cc
View file @
d67528e0
...
@@ -716,11 +716,11 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
...
@@ -716,11 +716,11 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
}
}
break
;
break
;
// EXECUTE OPERATOR ACTIONS
// EXECUTE OPERATOR ACTIONS
case
MAVLINK_MSG_ID_
ACTION
:
{
case
MAVLINK_MSG_ID_
COMMAND
:
{
mavlink_
action
_t
action
;
mavlink_
command
_t
action
;
mavlink_msg_
action
_decode
(
&
msg
,
&
action
);
mavlink_msg_
command
_decode
(
&
msg
,
&
action
);
qDebug
()
<<
"SIM"
<<
"received action"
<<
action
.
action
<<
"for system"
<<
action
.
target
;
qDebug
()
<<
"SIM"
<<
"received action"
<<
action
.
command
<<
"for system"
<<
action
.
target_system
;
// FIXME MAVLINKV10PORTINGNEEDED
// FIXME MAVLINKV10PORTINGNEEDED
// switch (action.action) {
// switch (action.action) {
...
...
src/comm/MAVLinkSimulationWaypointPlanner.cc
View file @
d67528e0
...
@@ -815,11 +815,11 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
...
@@ -815,11 +815,11 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
break
;
break
;
}
}
case
MAVLINK_MSG_ID_
ACTION
:
{
// special action from ground station
case
MAVLINK_MSG_ID_
COMMAND
:
{
// special action from ground station
mavlink_
action
_t
action
;
mavlink_
command
_t
action
;
mavlink_msg_
action
_decode
(
msg
,
&
action
);
mavlink_msg_
command
_decode
(
msg
,
&
action
);
if
(
action
.
target
==
systemid
)
{
if
(
action
.
target
_system
==
systemid
)
{
if
(
verbose
)
qDebug
(
"Waypoint: received message with action %d
\n
"
,
action
.
action
);
if
(
verbose
)
qDebug
(
"Waypoint: received message with action %d
\n
"
,
action
.
command
);
// switch (action.action) {
// switch (action.action) {
// case MAV_ACTION_LAUNCH:
// case MAV_ACTION_LAUNCH:
// if (verbose) std::cerr << "Launch received" << std::endl;
// if (verbose) std::cerr << "Launch received" << std::endl;
...
...
src/comm/QGCMAVLink.h
View file @
d67528e0
...
@@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project
#ifndef QGCMAVLINK_H
#ifndef QGCMAVLINK_H
#define QGCMAVLINK_H
#define QGCMAVLINK_H
#define MAVLINK_NO_DATA
#include <mavlink_types.h>
#include <mavlink_types.h>
#include <mavlink.h>
#include <mavlink.h>
...
...
src/main.cc
View file @
d67528e0
...
@@ -32,6 +32,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -32,6 +32,7 @@ This file is part of the QGROUNDCONTROL project
#include "QGCCore.h"
#include "QGCCore.h"
#include "MainWindow.h"
#include "MainWindow.h"
#include "configuration.h"
#include "configuration.h"
#include "mavlink_data.h"
/* SDL does ugly things to main() */
/* SDL does ugly things to main() */
...
...
src/uas/PxQuadMAV.cc
View file @
d67528e0
...
@@ -65,7 +65,7 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -65,7 +65,7 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_msg_pattern_detected_decode
(
&
message
,
&
detected
);
mavlink_msg_pattern_detected_decode
(
&
message
,
&
detected
);
QByteArray
b
;
QByteArray
b
;
b
.
resize
(
256
);
b
.
resize
(
256
);
mavlink_msg_pattern_detected_get_file
(
&
message
,
(
int8_t
*
)
b
.
data
());
mavlink_msg_pattern_detected_get_file
(
&
message
,
b
.
data
());
b
.
append
(
'\0'
);
b
.
append
(
'\0'
);
QString
name
=
QString
(
b
);
QString
name
=
QString
(
b
);
if
(
detected
.
type
==
0
)
if
(
detected
.
type
==
0
)
...
...
src/uas/UAS.cc
View file @
d67528e0
...
@@ -809,16 +809,16 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -809,16 +809,16 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
parameterChanged
(
uasId
,
message
.
compid
,
value
.
param_count
,
value
.
param_index
,
parameterName
,
val
);
emit
parameterChanged
(
uasId
,
message
.
compid
,
value
.
param_count
,
value
.
param_index
,
parameterName
,
val
);
}
}
break
;
break
;
case
MAVLINK_MSG_ID_
ACTION
_ACK
:
case
MAVLINK_MSG_ID_
CMD
_ACK
:
mavlink_
action
_ack_t
ack
;
mavlink_
cmd
_ack_t
ack
;
mavlink_msg_
action
_ack_decode
(
&
message
,
&
ack
);
mavlink_msg_
cmd
_ack_decode
(
&
message
,
&
ack
);
if
(
ack
.
result
==
1
)
if
(
ack
.
result
==
1
)
{
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"SUCCESS: Executed
action: %1"
).
arg
(
ack
.
action
));
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"SUCCESS: Executed
CMD: %1"
).
arg
(
ack
.
cmd
));
}
}
else
else
{
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE: Rejected
action: %1"
).
arg
(
ack
.
action
));
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE: Rejected
CMD: %1"
).
arg
(
ack
.
cmd
));
}
}
break
;
break
;
case
MAVLINK_MSG_ID_DEBUG
:
case
MAVLINK_MSG_ID_DEBUG
:
...
...
thirdParty/mavlink/include/bittest.c
deleted
100644 → 0
View file @
d950361a
#include <mavlink.h>
#include <stdio.h>
int
main
(
int
argc
,
char
*
argv
[])
{
uint8_t
bitfield
=
254
;
// 11111110
uint8_t
mask
=
128
;
// 10000000
uint8_t
result
=
(
bitfield
&
mask
);
printf
(
"0x%02x
\n
"
,
bitfield
);
// Transform into network order
generic_32bit
bin
;
bin
.
i
=
1
;
printf
(
"First byte in (little endian) 0x%02x
\n
"
,
bin
.
b
[
0
]);
generic_32bit
bout
;
bout
.
b
[
0
]
=
bin
.
b
[
3
];
bout
.
b
[
1
]
=
bin
.
b
[
2
];
bout
.
b
[
2
]
=
bin
.
b
[
1
];
bout
.
b
[
3
]
=
bin
.
b
[
0
];
printf
(
"Last byte out (big endian) 0x%02x
\n
"
,
bout
.
b
[
3
]);
uint8_t
n
=
5
;
printf
(
"Mask is 0x%02x
\n
"
,
((
uint32_t
)(
1
<<
n
))
-
1
);
// = 2^n - 1
int32_t
encoded
=
2
;
uint8_t
bits
=
2
;
uint8_t
packet
[
MAVLINK_MAX_PACKET_LEN
];
uint8_t
packet_index
=
0
;
uint8_t
bit_index
=
0
;
put_bitfield_n_by_index
(
encoded
,
bits
,
packet_index
,
bit_index
,
&
bit_index
,
packet
);
}
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