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
b112f50a
Commit
b112f50a
authored
Dec 02, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted generator, fixed Linux compile issue
parent
a856f5e6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
qgroundcontrol.pri
qgroundcontrol.pri
+1
-1
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+2
-0
MAVLinkXMLParser.cc
src/comm/MAVLinkXMLParser.cc
+4
-2
Pixhawk3DWidget.h
src/ui/map3D/Pixhawk3DWidget.h
+1
-1
No files found.
qgroundcontrol.pri
View file @
b112f50a
...
...
@@ -188,7 +188,7 @@ linux-g++ {
DEFINES += QGC_OSGEARTH_ENABLED
}
exists(/usr/local/include/libfreenect) {
exists(/usr/local/include/libfreenect
/libfreenect.h
) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
INCLUDEPATH += /usr/include/libusb-1.0
...
...
src/comm/MAVLinkProtocol.cc
View file @
b112f50a
...
...
@@ -325,6 +325,8 @@ void MAVLinkProtocol::sendMessage(LinkInterface* link, mavlink_message_t message
{
// Create buffer
uint8_t
buffer
[
MAVLINK_MAX_PACKET_LEN
];
// Rewriting header to ensure correct link ID is set
if
(
link
->
getId
()
!=
0
)
mavlink_finalize_message_chan
(
&
message
,
this
->
getSystemId
(),
this
->
getComponentId
(),
link
->
getId
(),
message
.
len
);
// Write message into buffer, prepending start sign
int
len
=
mavlink_msg_to_send_buffer
(
buffer
,
&
message
);
// If link is connected
...
...
src/comm/MAVLinkXMLParser.cc
View file @
b112f50a
...
...
@@ -341,7 +341,8 @@ bool MAVLinkXMLParser::generate()
QString
decode
(
"static inline void mavlink_msg_%1_decode(const mavlink_message_t* msg, %2* %1)
\n
{
\n
%3}
\n
"
);
QString
pack
(
"static inline uint16_t mavlink_msg_%1_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg%2)
\n
{
\n\t
uint16_t i = 0;
\n\t
msg->msgid = MAVLINK_MSG_ID_%3;
\n\n
%4
\n\t
return mavlink_finalize_message(msg, system_id, component_id, i);
\n
}
\n\n
"
);
QString
compactSend
(
"#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
\n\n
static inline void mavlink_msg_%3_send(%1 chan%5)
\n
{
\n\t
%2 msg;
\n\t
mavlink_msg_%3_pack(mavlink_system.sysid, mavlink_system.compid, &msg%4);
\n\t
mavlink_send_uart(chan, &msg);
\n
}
\n\n
#endif"
);
QString
packChan
(
"static inline uint16_t mavlink_msg_%1_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg%2)
\n
{
\n\t
uint16_t i = 0;
\n\t
msg->msgid = MAVLINK_MSG_ID_%3;
\n\n
%4
\n\t
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
\n
}
\n\n
"
);
QString
compactSend
(
"#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
\n\n
static inline void mavlink_msg_%3_send(%1 chan%5)
\n
{
\n\t
%2 msg;
\n\t
mavlink_msg_%3_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg%4);
\n\t
mavlink_send_uart(chan, &msg);
\n
}
\n\n
#endif"
);
//QString compactStructSend = "#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS\n\nstatic inline void mavlink_msg_%3_struct_send(%1 chan%5)\n{\n\t%2 msg;\n\tmavlink_msg_%3_encode(mavlink_system.sysid, mavlink_system.compid, &msg%4);\n\tmavlink_send_uart(chan, &msg);\n}\n\n#endif";
QString
unpacking
;
QString
prepends
;
...
...
@@ -506,10 +507,11 @@ bool MAVLinkXMLParser::generate()
cStruct
=
cStruct
.
arg
(
cStructName
,
cStructLines
);
lcmStructDefs
.
append
(
"
\n
"
).
append
(
cStruct
).
append
(
"
\n
"
);
pack
=
pack
.
arg
(
messageName
,
packParameters
,
messageName
.
toUpper
(),
packLines
);
packChan
=
packChan
.
arg
(
messageName
,
packParameters
,
messageName
.
toUpper
(),
packLines
);
encode
=
encode
.
arg
(
messageName
).
arg
(
cStructName
).
arg
(
packArguments
);
decode
=
decode
.
arg
(
messageName
).
arg
(
cStructName
).
arg
(
decodeLines
);
compactSend
=
compactSend
.
arg
(
channelType
,
messageType
,
messageName
,
sendArguments
,
packParameters
);
QString
cFile
=
"// MESSAGE "
+
messageName
.
toUpper
()
+
" PACKING
\n\n
"
+
idDefine
+
"
\n\n
"
+
cStruct
+
"
\n\n
"
+
arrayDefines
+
"
\n\n
"
+
commentContainer
.
arg
(
messageName
.
toLower
(),
commentLines
)
+
pack
+
encode
+
"
\n
"
+
compactSend
+
"
\n
"
+
"// MESSAGE "
+
messageName
.
toUpper
()
+
" UNPACKING
\n\n
"
+
unpacking
+
decode
;
QString
cFile
=
"// MESSAGE "
+
messageName
.
toUpper
()
+
" PACKING
\n\n
"
+
idDefine
+
"
\n\n
"
+
cStruct
+
"
\n\n
"
+
arrayDefines
+
"
\n\n
"
+
commentContainer
.
arg
(
messageName
.
toLower
(),
commentLines
)
+
pack
+
packChan
+
encode
+
"
\n
"
+
compactSend
+
"
\n
"
+
"// MESSAGE "
+
messageName
.
toUpper
()
+
" UNPACKING
\n\n
"
+
unpacking
+
decode
;
cFiles
.
append
(
qMakePair
(
QString
(
"mavlink_msg_%1.h"
).
arg
(
messageName
),
cFile
));
}
// Check if tag = message
}
// Check if e = NULL
...
...
src/ui/map3D/Pixhawk3DWidget.h
View file @
b112f50a
...
...
@@ -137,10 +137,10 @@ private:
osg
::
ref_ptr
<
osg
::
Geode
>
rgbd3DNode
;
#ifdef QGC_LIBFREENECT_ENABLED
QScopedPointer
<
Freenect
>
freenect
;
QVector
<
Freenect
::
Vector6D
>
pointCloud
;
#endif
QSharedPointer
<
QByteArray
>
rgb
;
QSharedPointer
<
QByteArray
>
coloredDepth
;
QVector
<
Freenect
::
Vector6D
>
pointCloud
;
QVector
<
osg
::
ref_ptr
<
osg
::
Node
>
>
vehicleModels
;
...
...
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