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
919c2b20
Commit
919c2b20
authored
May 30, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bmp_22x22_8bit sometimes showing from bmp_22x22_8bit_greyscale.mavlink with random pixels
parent
07c61b8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
UAS.cc
src/uas/UAS.cc
+1
-0
HUD.cc
src/ui/HUD.cc
+13
-12
No files found.
src/uas/UAS.cc
View file @
919c2b20
...
...
@@ -902,6 +902,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// Restart statemachine
imagePacketsArrived
=
0
;
emit
imageReady
(
this
);
qDebug
()
<<
"imageReady emitted. all packets arrived"
;
//this->requestImage();
//qDebug() << "SENDING REQUEST TO GET NEW IMAGE FROM SYSTEM" << uasId;
...
...
src/ui/HUD.cc
View file @
919c2b20
...
...
@@ -138,8 +138,8 @@ HUD::HUD(int width, int height, QWidget* parent)
hudInstrumentsEnabled
(
true
),
videoEnabled
(
false
),
xImageFactor
(
1.0
),
yImageFactor
(
1.0
)
imageRequested
(
false
)
,
yImageFactor
(
1.0
)
,
imageRequested
(
false
)
{
// Set auto fill to false
setAutoFillBackground
(
false
);
...
...
@@ -168,7 +168,7 @@ HUD::HUD(int width, int height, QWidget* parent)
imageTimer
->
setInterval
(
250
);
//connect(refreshTimer, SIGNAL(timeout()), this, SLOT(update()));
connect
(
refreshTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
paintHUD
()));
connect
(
imageTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
requestNewImage
()));
// connect(imageTimer, SIGNAL(timeout()), this, SLOT(requestNewImage())); TODO
// Resize to correct size and fill with image
//glDrawPixels(glImage.width(), glImage.height(), GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits());
...
...
@@ -1635,14 +1635,15 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
void
HUD
::
requestNewImage
()
{
if
(
!
imageRequested
)
{
this
->
u
->
requestImage
();
imageRequested
=
true
;
}
else
{
qDebug
()
<<
"HUD::requestNewImage()"
;
// if (!imageRequested)
// {
// this->u->requestImage();
// imageRequested = true;
// }
// else
// {
this
->
glImage
=
this
->
u
->
getImage
();
imageRequested
=
false
;
}
//
imageRequested = false;
//
}
}
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