Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 4d20714

Browse files
author
Andrew Tridgell
committed
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.
1 parent be4f68e commit 4d20714

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/drivers/airspeed/airspeed.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ Airspeed::init()
159159
int
160160
Airspeed::probe()
161161
{
162-
/* on initial power up the device needs more than one retry
163-
for detection. Once it is running then retries aren't
164-
needed
162+
/* on initial power up the device may need more than one retry
163+
for detection. Once it is running the number of retries can
164+
be reduced
165165
*/
166166
_retries = 4;
167167
int ret = measure();
168-
_retries = 0;
168+
169+
// drop back to 2 retries once initialised
170+
_retries = 2;
169171
return ret;
170172
}
171173

0 commit comments

Comments
 (0)