Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
85017a13
Commit
85017a13
authored
11 years ago
by
Don Gagne
Browse files
Options
Downloads
Patches
Plain Diff
Fix -Werror=type-limits
parent
0422b468
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ui/designer/QGCXYPlot.cc
+21
-13
21 additions, 13 deletions
src/ui/designer/QGCXYPlot.cc
src/ui/designer/QGCXYPlot.h
+1
-1
1 addition, 1 deletion
src/ui/designer/QGCXYPlot.h
with
22 additions
and
14 deletions
src/ui/designer/QGCXYPlot.cc
+
21
−
13
View file @
85017a13
...
...
@@ -362,7 +362,14 @@ void QGCXYPlot::appendData(int uasId, const QString& curve, const QString& unit,
}
else
return
;
if
(
x_valid
&&
y_valid
&&
(
int
)
qAbs
(
y_timestamp_us
-
x_timestamp_us
)
<=
max_timestamp_diff_us
)
{
if
(
x_valid
&&
y_valid
)
{
quint64
difference
;
if
(
y_timestamp_us
<
x_timestamp_us
)
{
difference
=
x_timestamp_us
-
y_timestamp_us
;
}
else
{
difference
=
y_timestamp_us
-
x_timestamp_us
;
}
if
(
difference
<=
max_timestamp_diff_us
)
{
int
removed
=
xycurve
->
appendData
(
QPointF
(
x
,
y
)
);
x_valid
=
false
;
y_valid
=
false
;
...
...
@@ -378,6 +385,7 @@ void QGCXYPlot::appendData(int uasId, const QString& curve, const QString& unit,
}
}
}
}
void
QGCXYPlot
::
styleChanged
(
MainWindow
::
QGC_MAINWINDOW_STYLE
style
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ui/designer/QGCXYPlot.h
+
1
−
1
View file @
85017a13
...
...
@@ -48,7 +48,7 @@ private:
double
y
;
/**< Last unused value for the x-coordinate */
quint64
y_timestamp_us
;
/**< Timestamp that we last recieved a value for x */
bool
y_valid
;
/**< Whether we have recieved an x value but so far no corresponding y value */
int
max_timestamp_diff_us
;
/**< Only combine x and y to a data point if the timestamp for both doesn't differ by more than this */
qu
int
64
max_timestamp_diff_us
;
/**< Only combine x and y to a data point if the timestamp for both doesn't differ by more than this */
};
#endif // QGCXYPLOT_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment