diff options
author | Andrew Tridgell <tridge@samba.org> | 2014-11-03 11:24:28 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-11-26 07:35:32 +0100 |
commit | 4724c050478900a0b0b760877f1613e43c0aa97c (patch) | |
tree | e4413028d92068110e3742e0c246c8b927b0743e | |
parent | 8e932cec10aa7e64e4a5cd17a571778f3ff60e9b (diff) | |
download | px4-firmware-4724c050478900a0b0b760877f1613e43c0aa97c.tar.gz px4-firmware-4724c050478900a0b0b760877f1613e43c0aa97c.tar.bz2 px4-firmware-4724c050478900a0b0b760877f1613e43c0aa97c.zip |
airspeed: use _retries=2 for I2C retries once initialised
airspeed sensors often need to be on longer cables due to having to be
outside the prop wash.
-rw-r--r-- | src/drivers/airspeed/airspeed.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/drivers/airspeed/airspeed.cpp b/src/drivers/airspeed/airspeed.cpp index 3a1e1b7b5..6db6713c4 100644 --- a/src/drivers/airspeed/airspeed.cpp +++ b/src/drivers/airspeed/airspeed.cpp @@ -159,13 +159,15 @@ out: int Airspeed::probe() { - /* on initial power up the device needs more than one retry - for detection. Once it is running then retries aren't - needed + /* on initial power up the device may need more than one retry + for detection. Once it is running the number of retries can + be reduced */ _retries = 4; int ret = measure(); - _retries = 0; + + // drop back to 2 retries once initialised + _retries = 2; return ret; } |