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
cbb366b6
Commit
cbb366b6
authored
Apr 28, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #626 from koenkooi/qminmax-fix
fix qmin/qmax types
parents
c96b1359
0c66e26a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
qwt_math.h
libs/qwt/qwt_math.h
+2
-2
QGCXYPlot.cc
src/ui/designer/QGCXYPlot.cc
+8
-8
No files found.
libs/qwt/qwt_math.h
View file @
cbb366b6
...
...
@@ -23,8 +23,8 @@
#else // QT_VERSION >= 0x040000
#define qwtMax
qMax
#define qwtMin
qMin
#define qwtMax
(x,y) qMax(qreal(x),qreal(y))
#define qwtMin
(x,y) qMin(qreal(x),qreal(y))
#define qwtAbs qAbs
#endif
...
...
src/ui/designer/QGCXYPlot.cc
View file @
cbb366b6
...
...
@@ -38,10 +38,10 @@ public:
ymin
=
ymax
=
data
.
y
();
minMaxSet
=
true
;
}
else
if
(
m_autoScale
)
{
xmin
=
qMin
(
xmin
,
data
.
x
());
xmax
=
qMax
(
xmax
,
data
.
x
());
ymin
=
qMin
(
ymin
,
data
.
y
());
ymax
=
qMax
(
ymax
,
data
.
y
());
xmin
=
qMin
(
qreal
(
xmin
)
,
data
.
x
());
xmax
=
qMax
(
qreal
(
xmax
)
,
data
.
x
());
ymin
=
qMin
(
qreal
(
ymin
)
,
data
.
y
());
ymax
=
qMax
(
qreal
(
ymax
)
,
data
.
y
());
}
m_data
.
append
(
data
);
...
...
@@ -73,10 +73,10 @@ public:
xmax
=
xmin
=
m_data
.
at
(
0
).
x
();
ymax
=
ymin
=
m_data
.
at
(
0
).
y
();
for
(
int
i
=
1
;
i
<
m_data
.
size
();
i
++
)
{
xmin
=
qMin
(
xmin
,
m_data
.
at
(
i
).
x
());
xmax
=
qMax
(
xmax
,
m_data
.
at
(
i
).
x
());
ymin
=
qMin
(
ymin
,
m_data
.
at
(
i
).
y
());
ymax
=
qMax
(
ymax
,
m_data
.
at
(
i
).
y
());
xmin
=
qMin
(
qreal
(
xmin
)
,
m_data
.
at
(
i
).
x
());
xmax
=
qMax
(
qreal
(
xmax
)
,
m_data
.
at
(
i
).
x
());
ymin
=
qMin
(
qreal
(
ymin
)
,
m_data
.
at
(
i
).
y
());
ymax
=
qMax
(
qreal
(
ymax
)
,
m_data
.
at
(
i
).
y
());
}
}
}
...
...
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