airspeed: retry initial I2C probe 4 times

this fixes a problem with detecting a MS4525D0 at boot
This commit is contained in:
Andrew Tridgell 2013-08-27 18:07:31 +10:00 committed by Lorenz Meier
parent 11257cbade
commit 9c58d2c5c6
1 changed files with 8 additions and 1 deletions

View File

@ -146,7 +146,14 @@ out:
int
Airspeed::probe()
{
return measure();
/* on initial power up the device needs more than one retry
for detection. Once it is running then retries aren't
needed
*/
_retries = 4;
int ret = measure();
_retries = 0;
return ret;
}
int