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
4b34688a
Commit
4b34688a
authored
Jul 14, 2014
by
Helen Oleynikova
Browse files
Fixed video transmission.
parent
e63127ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
4b34688a
...
...
@@ -1329,10 +1329,13 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
++
imagePacketsArrived
;
// emit signal if all packets arrived
// && seq >= imagePackets-1
if
((
imagePacketsArrived
>=
imagePackets
))
{
// Restart statemachine
emit
imageReady
(
this
);
//imagePacketsArrived = 0;
//imagePackets = 0;
//qDebug() << "imageReady emitted. all packets arrived";
}
}
...
...
@@ -2142,11 +2145,16 @@ QImage UAS::getImage()
if
(
!
image
.
loadFromData
(
imageRecBuffer
))
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"Loading data from image buffer failed!"
;
//imagePacketsArrived = 0;
//imagePackets = 0;
return
QImage
();
}
}
// Restart statemachine
imagePacketsArrived
=
0
;
//imageRecBuffer.clear();
imagePackets
=
0
;
imageRecBuffer
.
clear
();
return
image
;
}
...
...
@@ -3148,7 +3156,7 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw
Q_UNUSED
(
xacc
);
Q_UNUSED
(
yacc
);
Q_UNUSED
(
zacc
);
// Emit attitude for cross-check
emit
valueChanged
(
uasId
,
"roll sim"
,
"rad"
,
roll
,
getUnixTime
());
emit
valueChanged
(
uasId
,
"pitch sim"
,
"rad"
,
pitch
,
getUnixTime
());
...
...
src/ui/HUD.cc
View file @
4b34688a
...
...
@@ -119,7 +119,7 @@ HUD::HUD(int width, int height, QWidget* parent)
{
Q_UNUSED
(
width
);
Q_UNUSED
(
height
);
// Set auto fill to false
setAutoFillBackground
(
false
);
...
...
@@ -1374,7 +1374,10 @@ void HUD::copyImage(UASInterface* uas)
UAS
*
u
=
qobject_cast
<
UAS
*>
(
uas
);
if
(
u
)
{
this
->
glImage
=
u
->
getImage
();
QImage
temp_im
=
u
->
getImage
();
if
(
temp_im
.
byteCount
()
>
0
)
{
this
->
glImage
=
temp_im
;
//u->getImage();
}
// Save to directory if logging is enabled
if
(
imageLoggingEnabled
)
...
...
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