Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f3bd1452
Commit
f3bd1452
authored
Jul 14, 2014
by
Helen Oleynikova
Browse files
Clean-up for video transmission.
parent
94abcb70
Changes
2
Show whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
f3bd1452
...
...
@@ -1387,15 +1387,12 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
++
imagePacketsArrived
;
// emit signal if all packets arrived
// && seq >= imagePackets-1
if
((
imagePacketsArrived
>=
imagePackets
))
if
(
imagePacketsArrived
>=
imagePackets
)
{
// Restart statemachine
imagePackets
=
0
;
imagePacketsArrived
=
0
;
emit
imageReady
(
this
);
//imagePacketsArrived = 0;
//imagePackets = 0;
//qDebug() << "imageReady emitted. all packets arrived";
}
}
...
...
@@ -2205,8 +2202,6 @@ QImage UAS::getImage()
if
(
!
image
.
loadFromData
(
imageRecBuffer
))
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"Loading data from image buffer failed!"
;
//imagePacketsArrived = 0;
//imagePackets = 0;
return
QImage
();
}
}
...
...
@@ -2216,7 +2211,6 @@ QImage UAS::getImage()
imagePackets
=
0
;
imageRecBuffer
.
clear
();
return
image
;
}
void
UAS
::
requestImage
()
...
...
src/ui/HUD.cc
View file @
f3bd1452
...
...
@@ -1376,7 +1376,7 @@ void HUD::copyImage(UASInterface* uas)
{
QImage
temp_im
=
u
->
getImage
();
if
(
temp_im
.
byteCount
()
>
0
)
{
this
->
glImage
=
temp_im
;
//u->getImage();
this
->
glImage
=
temp_im
;
}
// Save to directory if logging is enabled
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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