aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/ms5611/ms5611.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-02-05 18:28:41 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-02-05 18:28:41 +0100
commit167ec25c4f04ceed699a20fd6490db6cdf74e223 (patch)
tree0e78fb98ca2a32c14afc6fac8837af7f8bfa0499 /apps/drivers/ms5611/ms5611.cpp
parenta196e73842259152595d524b150a611076ca91d0 (diff)
downloadpx4-firmware-167ec25c4f04ceed699a20fd6490db6cdf74e223.tar.gz
px4-firmware-167ec25c4f04ceed699a20fd6490db6cdf74e223.tar.bz2
px4-firmware-167ec25c4f04ceed699a20fd6490db6cdf74e223.zip
Fixed altitude jump issue, hunted down and fix by Andrew Tridgell.
Diffstat (limited to 'apps/drivers/ms5611/ms5611.cpp')
-rw-r--r--apps/drivers/ms5611/ms5611.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp
index 231006ae3..30166828a 100644
--- a/apps/drivers/ms5611/ms5611.cpp
+++ b/apps/drivers/ms5611/ms5611.cpp
@@ -331,8 +331,9 @@ MS5611::probe()
if ((OK == probe_address(MS5611_ADDRESS_1)) ||
(OK == probe_address(MS5611_ADDRESS_2))) {
- /*
- * Disable retries; the device gets confused if we retry some of the commands.
+ /*
+ * Disable retries; we may enable them selectively in some cases,
+ * but the device gets confused if we retry some of the commands.
*/
_retries = 0;
return OK;
@@ -653,7 +654,11 @@ MS5611::measure()
/*
* Send the command to begin measuring.
+ *
+ * Disable retries on this command; we can't know whether failure
+ * means the device did or did not see the write.
*/
+ _retries = 0;
ret = transfer(&cmd_data, 1, nullptr, 0);
if (OK != ret)