diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-13 09:14:43 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-13 09:14:43 +0200 |
commit | 2cc5c6e84f2fed508a358d2b2fc9c38085c446db (patch) | |
tree | 608db7b44f9920df6aa3dd00fb7059ab4298a388 /src/modules/position_estimator_inav/position_estimator_inav_main.c | |
parent | 3f63b67eb66b44524b74847696a65d7a531d73d6 (diff) | |
download | px4-firmware-2cc5c6e84f2fed508a358d2b2fc9c38085c446db.tar.gz px4-firmware-2cc5c6e84f2fed508a358d2b2fc9c38085c446db.tar.bz2 px4-firmware-2cc5c6e84f2fed508a358d2b2fc9c38085c446db.zip |
INAV: Add braces to ensure statements are evaluated correctly
Diffstat (limited to 'src/modules/position_estimator_inav/position_estimator_inav_main.c')
-rw-r--r-- | src/modules/position_estimator_inav/position_estimator_inav_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/position_estimator_inav/position_estimator_inav_main.c b/src/modules/position_estimator_inav/position_estimator_inav_main.c index 06a81e3fe..81bbaa658 100644 --- a/src/modules/position_estimator_inav/position_estimator_inav_main.c +++ b/src/modules/position_estimator_inav/position_estimator_inav_main.c @@ -788,21 +788,21 @@ int position_estimator_inav_thread_main(int argc, char *argv[]) } /* check for timeout on GPS topic */ - if (gps_valid && t > gps.timestamp_position + gps_topic_timeout) { + if (gps_valid && (t > (gps.timestamp_position + gps_topic_timeout))) { gps_valid = false; warnx("GPS timeout"); mavlink_log_info(mavlink_fd, "[inav] GPS timeout"); } /* check for timeout on vision topic */ - if (vision_valid && t > vision.timestamp_boot + vision_topic_timeout) { + if (vision_valid && (t > (vision.timestamp_boot + vision_topic_timeout))) { vision_valid = false; warnx("VISION timeout"); mavlink_log_info(mavlink_fd, "[inav] VISION timeout"); } /* check for sonar measurement timeout */ - if (sonar_valid && t > sonar_time + sonar_timeout) { + if (sonar_valid && (t > (sonar_time + sonar_timeout))) { corr_sonar = 0.0f; sonar_valid = false; } |