mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-11 18:03:41 +08:00
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.
This commit is contained in:
committed by
Lorenz Meier
parent
8e932cec10
commit
4724c05047
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user