Browse Source

airspeed: retry initial I2C probe 4 times

this fixes a problem with detecting a MS4525D0 at boot
sbg
Andrew Tridgell 12 years ago committed by Lorenz Meier
parent
commit
9c58d2c5c6
  1. 9
      src/drivers/airspeed/airspeed.cpp

9
src/drivers/airspeed/airspeed.cpp

@ -146,7 +146,14 @@ out:
int int
Airspeed::probe() 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 int

Loading…
Cancel
Save