aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-10-09 09:24:08 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-10-09 09:24:08 +0200
commitd524b17164125415c831e38ec1e7db11a6ea97e1 (patch)
tree85661121d0cd04d91b23a90331b8635bb88a9f4d /src/modules
parente0719f21417d3ba572df18460073faa923d5ff29 (diff)
downloadpx4-firmware-d524b17164125415c831e38ec1e7db11a6ea97e1.tar.gz
px4-firmware-d524b17164125415c831e38ec1e7db11a6ea97e1.tar.bz2
px4-firmware-d524b17164125415c831e38ec1e7db11a6ea97e1.zip
Disambiguate local variable names.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ekf_att_pos_estimator/estimator_23states.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/ekf_att_pos_estimator/estimator_23states.cpp b/src/modules/ekf_att_pos_estimator/estimator_23states.cpp
index e629d3345..c17e034ad 100644
--- a/src/modules/ekf_att_pos_estimator/estimator_23states.cpp
+++ b/src/modules/ekf_att_pos_estimator/estimator_23states.cpp
@@ -2561,15 +2561,15 @@ void AttPosEKF::CovarianceInit()
P[22][22] = sq(0.5f);
}
-float AttPosEKF::ConstrainFloat(float val, float min, float max)
+float AttPosEKF::ConstrainFloat(float val, float min_val, float max_val)
{
float ret;
- if (val > max) {
- ret = max;
- ekf_debug("> max: %8.4f, val: %8.4f", (double)max, (double)val);
- } else if (val < min) {
- ret = min;
- ekf_debug("< min: %8.4f, val: %8.4f", (double)min, (double)val);
+ if (val > max_val) {
+ ret = max_val;
+ ekf_debug("> max: %8.4f, val: %8.4f", (double)max_val, (double)val);
+ } else if (val < min_val) {
+ ret = min_val;
+ ekf_debug("< min: %8.4f, val: %8.4f", (double)min_val, (double)val);
} else {
ret = val;
}