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
f4504903
Commit
f4504903
authored
Jan 10, 2012
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to latest MAVLink
parent
7fe1c809
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
UAS.cc
src/uas/UAS.cc
+6
-7
UAS.h
src/uas/UAS.h
+2
-0
No files found.
src/uas/UAS.cc
View file @
f4504903
...
...
@@ -767,6 +767,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
imagePayload
=
p
.
payload
;
imageQuality
=
p
.
jpg_quality
;
imageType
=
p
.
type
;
imageWidth
=
p
.
width
;
imageHeight
=
p
.
height
;
imageStart
=
QGC
::
groundTimeMilliseconds
();
}
break
;
...
...
@@ -1392,16 +1394,13 @@ QImage UAS::getImage()
// RAW greyscale
if
(
imageType
==
MAVLINK_DATA_STREAM_IMG_RAW8U
)
{
// TODO FIXME Fabian
// RAW hardcoded to 22x22
int
imgWidth
=
22
;
int
imgHeight
=
22
;
int
imgColors
=
255
;
// TODO FIXME
int
imgColors
=
255
;
//imageSize/(imageWidth*imageHeight);
//const int headerSize = 15;
// Construct PGM header
QString
header
(
"P5
\n
%1 %2
\n
%3
\n
"
);
header
=
header
.
arg
(
im
gWidth
).
arg
(
img
Height
).
arg
(
imgColors
);
header
=
header
.
arg
(
im
ageWidth
).
arg
(
image
Height
).
arg
(
imgColors
);
QByteArray
tmpImage
(
header
.
toStdString
().
c_str
(),
header
.
toStdString
().
size
());
tmpImage
.
append
(
imageRecBuffer
);
...
...
@@ -1451,7 +1450,7 @@ void UAS::requestImage()
if
(
imagePacketsArrived
==
0
)
{
mavlink_message_t
msg
;
mavlink_msg_data_transmission_handshake_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
DATA_TYPE_JPEG_IMAGE
,
0
,
0
,
0
,
50
);
mavlink_msg_data_transmission_handshake_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
DATA_TYPE_JPEG_IMAGE
,
0
,
0
,
0
,
0
,
0
,
50
);
sendMessage
(
msg
);
}
#endif
...
...
src/uas/UAS.h
View file @
f4504903
...
...
@@ -214,6 +214,8 @@ protected: //COMMENTS FOR TEST UNIT
int
imagePayload
;
///< Payload size per transmitted packet (bytes). Standard is 254, and decreases when image resolution increases.
int
imageQuality
;
///< Quality of the transmitted image (percentage)
int
imageType
;
///< Type of the transmitted image (BMP, PNG, JPEG, RAW 8 bit, RAW 32 bit)
int
imageWidth
;
///< Width of the image stream
int
imageHeight
;
///< Width of the image stream
QByteArray
imageRecBuffer
;
///< Buffer for the incoming bytestream
QImage
image
;
///< Image data of last completely transmitted image
quint64
imageStart
;
...
...
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