aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/state_machine_helper.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-14 00:04:02 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-14 00:04:02 +0200
commit7968c6864e1255b4a65427187119aec2c3fc7ae0 (patch)
tree96fa217546a0179d8f5868c5b3d84d57ed39da30 /src/modules/commander/state_machine_helper.cpp
parent56ad0c708d2695515489802676cc295f040b3606 (diff)
downloadpx4-firmware-7968c6864e1255b4a65427187119aec2c3fc7ae0.tar.gz
px4-firmware-7968c6864e1255b4a65427187119aec2c3fc7ae0.tar.bz2
px4-firmware-7968c6864e1255b4a65427187119aec2c3fc7ae0.zip
Force update of offset, do not add offset in final value
Diffstat (limited to 'src/modules/commander/state_machine_helper.cpp')
-rw-r--r--src/modules/commander/state_machine_helper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index 09ea12c38..372ba9d7d 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -668,8 +668,8 @@ int prearm_check(const struct vehicle_status_s *status, const int mavlink_fd)
struct airspeed_s airspeed;
- if (ret = orb_copy(ORB_ID(airspeed), fd, &airspeed) ||
- hrt_elapsed_time(&airspeed.timestamp) > 50 * 1000) {
+ if ((ret = orb_copy(ORB_ID(airspeed), fd, &airspeed)) ||
+ (hrt_elapsed_time(&airspeed.timestamp) > (50 * 1000))) {
mavlink_log_critical(mavlink_fd, "ARM FAIL: AIRSPEED SENSOR MISSING");
failed = true;
goto system_eval;