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
dee19d0c
Commit
dee19d0c
authored
Sep 08, 2011
by
pixhawk
Browse files
Solved bugs for large angles
parent
758258fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/GAudioOutput.cc
View file @
dee19d0c
...
...
@@ -137,12 +137,12 @@ GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent),
}
}
GAudioOutput
::~
GAudioOutput
()
{
#ifdef _MSC_VER2
::
CoUninitialize
();
#endif
}
//
GAudioOutput::~GAudioOutput()
//
{
//
#ifdef _MSC_VER2
//
::CoUninitialize();
//
#endif
//
}
void
GAudioOutput
::
mute
(
bool
mute
)
{
...
...
src/GAudioOutput.h
View file @
dee19d0c
...
...
@@ -124,7 +124,7 @@ protected:
bool
muted
;
private:
GAudioOutput
(
QObject
*
parent
=
NULL
);
~
GAudioOutput
();
//
~GAudioOutput();
};
#endif // AUDIOOUTPUT_H
src/QGC.cc
View file @
dee19d0c
...
...
@@ -49,28 +49,28 @@ quint64 groundTimeMilliseconds()
float
limitAngleToPMPIf
(
float
angle
)
{
while
(
angle
>
((
float
)
M_PI
+
FLT_EPSILON
))
{
angle
-=
2.0
f
*
(
float
)
M_PI
;
}
//
while (angle > ((float)M_PI+FLT_EPSILON)) {
//
angle -= 2.0f * (float)M_PI;
//
}
while
(
angle
<=
-
((
float
)
M_PI
+
FLT_EPSILON
))
{
angle
+=
2.0
f
*
(
float
)
M_PI
;
}
//
while (angle <= -((float)M_PI+FLT_EPSILON)) {
//
angle += 2.0f * (float)M_PI;
//
}
return
angle
;
}
double
limitAngleToPMPId
(
double
angle
)
{
if
(
angle
<
-
M_PI
)
{
while
(
angle
<
-
M_PI
)
{
angle
+=
M_PI
;
}
}
else
if
(
angle
>
M_PI
)
{
while
(
angle
>
M_PI
)
{
angle
-=
M_PI
;
}
}
//
if (angle < -M_PI) {
//
while (angle < -M_PI) {
//
angle += M_PI;
//
}
//
} else if (angle > M_PI) {
//
while (angle > M_PI) {
//
angle -= M_PI;
//
}
//
}
return
angle
;
}
...
...
src/ui/HUD.cc
View file @
dee19d0c
...
...
@@ -1047,10 +1047,10 @@ void HUD::paintPitchLines(float pitch, QPainter* painter)
float
offset
=
pitch
;
if
(
offset
<
0
)
offset
=
-
offset
;
int
offsetCount
=
0
;
while
(
offset
>
lineDistance
)
{
offset
-=
lineDistance
;
offsetCount
++
;
}
//
while (offset > lineDistance) {
//
offset -= lineDistance;
//
offsetCount++;
//
}
int
iPos
=
(
int
)(
0.5
f
+
lineDistance
);
///< The first line
int
iNeg
=
(
int
)(
-
0.5
f
-
lineDistance
);
///< The first line
...
...
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