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
027e4afb
Commit
027e4afb
authored
Apr 12, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merged HUD fixes
parents
9789a58e
fa38d770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
HUD.cc
src/ui/HUD.cc
+26
-4
No files found.
src/ui/HUD.cc
View file @
027e4afb
...
...
@@ -449,7 +449,11 @@ void HUD::paintText(QString text, QColor color, float fontSize, float refX, floa
void
HUD
::
initializeGL
()
{
<<<<<<<
HEAD
:
src
/
ui
/
HUD
.
cc
bool
antialiasing
=
true
;
=======
bool
antialiasing
=
false
;
>>>>>>>
9
bd7957ab32b1fd759fd81c2214455325bc5a569
:
src
/
ui
/
HUD
.
cc
// Antialiasing setup
if
(
antialiasing
)
...
...
@@ -467,9 +471,9 @@ void HUD::initializeGL()
}
else
{
glDisable
(
GL_BLEND
);
glDisable
(
GL_POINT_SMOOTH
);
glDisable
(
GL_LINE_SMOOTH
);
//
glDisable(GL_BLEND);
//
glDisable(GL_POINT_SMOOTH);
//
glDisable(GL_LINE_SMOOTH);
}
}
...
...
@@ -603,6 +607,8 @@ void HUD::paintGL()
painter
.
setPen
(
defaultColor
);
painter
.
drawPolyline
(
yawIndicator
);
// CENTER
// HEADING INDICATOR
//
// __ __
...
...
@@ -624,6 +630,23 @@ void HUD::paintGL()
painter
.
drawPolyline
(
hIndicator
);
// SETPOINT
const
float
centerWidth
=
4.0
f
;
painter
.
setPen
(
defaultColor
);
painter
.
setBrush
(
Qt
::
NoBrush
);
// TODO
//painter.drawEllipse(QPointF(refToScreenX(qMin(10.0f, values.value("roll desired", 0.0f) * 10.0f)), refToScreenY(qMin(10.0f, values.value("pitch desired", 0.0f) * 10.0f))), refToScreenX(centerWidth/2.0f), refToScreenX(centerWidth/2.0f));
const
float
centerCrossWidth
=
10.0
f
;
// left
painter
.
drawLine
(
QPointF
(
refToScreenX
(
-
centerWidth
/
2.0
f
),
refToScreenY
(
0.0
f
)),
QPointF
(
refToScreenX
(
-
centerCrossWidth
/
2.0
f
),
refToScreenY
(
0.0
f
)));
// right
painter
.
drawLine
(
QPointF
(
refToScreenX
(
centerWidth
/
2.0
f
),
refToScreenY
(
0.0
f
)),
QPointF
(
refToScreenX
(
centerCrossWidth
/
2.0
f
),
refToScreenY
(
0.0
f
)));
// top
painter
.
drawLine
(
QPointF
(
refToScreenX
(
0.0
f
),
refToScreenY
(
-
centerWidth
/
2.0
f
)),
QPointF
(
refToScreenX
(
0.0
f
),
refToScreenY
(
-
centerCrossWidth
/
2.0
f
)));
// COMPASS
const
float
compassY
=
-
vheight
/
2.0
f
+
10.0
f
;
QRectF
compassRect
(
QPointF
(
refToScreenX
(
-
5.0
f
),
refToScreenY
(
compassY
)),
QSizeF
(
refToScreenX
(
10.0
f
),
refToScreenY
(
5.0
f
)));
...
...
@@ -702,7 +725,6 @@ void HUD::paintGL()
//qDebug() << "ROLL" << roll << "PITCH" << pitch << "YAW DIFF" << valuesDot.value("roll", 0.0f);
// PITCH
paintPitchLines
((
pitch
/
M_PI
)
*
180.0
f
,
&
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