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
fc3080e8
Commit
fc3080e8
authored
Jun 01, 2013
by
Bryant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved comments in HUD.cc
parent
6e5ad05a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
HUD.cc
src/ui/HUD.cc
+13
-10
No files found.
src/ui/HUD.cc
View file @
fc3080e8
...
...
@@ -694,9 +694,11 @@ void HUD::paintHUD()
glPushMatrix
();
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
// Fill with black background
if
(
videoEnabled
)
{
if
(
nextOfflineImage
!=
""
&&
QFileInfo
(
nextOfflineImage
).
exists
())
{
// If video is enabled, get the next frame.
if
(
videoEnabled
)
{
if
(
nextOfflineImage
!=
""
&&
QFileInfo
(
nextOfflineImage
).
exists
())
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"template image:"
<<
nextOfflineImage
;
QImage
fill
=
QImage
(
nextOfflineImage
);
...
...
@@ -708,6 +710,7 @@ void HUD::paintHUD()
}
// And if either video or the data stream is enabled, draw the next frame.
if
(
dataStreamEnabled
||
videoEnabled
)
{
glRasterPos2i
(
0
,
0
);
...
...
@@ -719,7 +722,10 @@ void HUD::paintHUD()
// Resize to correct size and fill with image
glDrawPixels
(
glImage
.
width
(),
glImage
.
height
(),
GL_RGBA
,
GL_UNSIGNED_BYTE
,
glImage
.
bits
());
//qDebug() << "DRAWING GL IMAGE";
}
else
{
}
// But if no video frame should be shown, paint the sky/ground background.
else
{
// Blue / brown background
paintCenterBackground
(
roll
,
pitch
,
yawTrans
);
}
...
...
@@ -729,11 +735,9 @@ void HUD::paintHUD()
// END OF OPENGL PAINTING
if
(
hudInstrumentsEnabled
)
{
//glEnable(GL_MULTISAMPLE);
// QT PAINTING
// Paint all the instrument data using Qt.
if
(
hudInstrumentsEnabled
)
{
//makeCurrent();
QPainter
painter
;
painter
.
begin
(
this
);
...
...
@@ -743,7 +747,6 @@ void HUD::paintHUD()
// COORDINATE FRAME IS NOW (0,0) at CENTER OF WIDGET
// Draw all fixed indicators
// BATTERY
paintText
(
fuelStatus
,
fuelColor
,
6.0
f
,
(
-
vwidth
/
2.0
)
+
10
,
-
vheight
/
2.0
+
6
,
&
painter
);
...
...
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