mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 06:51:37 +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
|
int
|
||||||
Airspeed::probe()
|
Airspeed::probe()
|
||||||
{
|
{
|
||||||
/* on initial power up the device needs more than one retry
|
/* on initial power up the device may need more than one retry
|
||||||
for detection. Once it is running then retries aren't
|
for detection. Once it is running the number of retries can
|
||||||
needed
|
be reduced
|
||||||
*/
|
*/
|
||||||
_retries = 4;
|
_retries = 4;
|
||||||
int ret = measure();
|
int ret = measure();
|
||||||
_retries = 0;
|
|
||||||
|
// drop back to 2 retries once initialised
|
||||||
|
_retries = 2;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user