aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-26 20:23:19 -0800
committerpx4dev <px4@purgatory.org>2013-01-26 20:23:19 -0800
commit636e0cc56ad251318614f05d49b53f677456d2c1 (patch)
tree47ddd11b427e1cf89b4c61d3498dc1c40cd648a2
parent6d0363faff7f5a59264198f04bae6f5b61c54510 (diff)
downloadpx4-firmware-636e0cc56ad251318614f05d49b53f677456d2c1.tar.gz
px4-firmware-636e0cc56ad251318614f05d49b53f677456d2c1.tar.bz2
px4-firmware-636e0cc56ad251318614f05d49b53f677456d2c1.zip
It looks like retrying reads from the ms5611 is not safe either.
-rw-r--r--apps/drivers/ms5611/ms5611.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp
index 9b1d8d5b7..231006ae3 100644
--- a/apps/drivers/ms5611/ms5611.cpp
+++ b/apps/drivers/ms5611/ms5611.cpp
@@ -332,8 +332,7 @@ MS5611::probe()
if ((OK == probe_address(MS5611_ADDRESS_1)) ||
(OK == probe_address(MS5611_ADDRESS_2))) {
/*
- * Disable retries; we may enable them selectively in some cases,
- * but the device gets confused if we retry some of the commands.
+ * Disable retries; the device gets confused if we retry some of the commands.
*/
_retries = 0;
return OK;
@@ -654,11 +653,7 @@ 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)
@@ -686,8 +681,6 @@ MS5611::collect()
/* this should be fairly close to the end of the conversion, so the best approximation of the time */
_reports[_next_report].timestamp = hrt_absolute_time();
- /* it's OK to retry on collection, as it has no side-effects */
- _retries = 3;
ret = transfer(&cmd, 1, &data[0], 3);
if (ret != OK) {
perf_count(_comms_errors);