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
4b34688a
Commit
4b34688a
authored
Jul 14, 2014
by
Helen Oleynikova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed video transmission.
parent
e63127ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
UAS.cc
src/uas/UAS.cc
+10
-2
HUD.cc
src/ui/HUD.cc
+5
-2
No files found.
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
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