mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 01:33:33 +08:00
Increase the retry count while probing for I2C sensors. This will also unwedge stuck sensors.
This commit is contained in:
@@ -317,11 +317,12 @@ MS5611::close_last(struct file *filp)
|
||||
int
|
||||
MS5611::probe()
|
||||
{
|
||||
if (OK == probe_address(MS5611_ADDRESS_1))
|
||||
return OK;
|
||||
|
||||
if (OK == probe_address(MS5611_ADDRESS_2))
|
||||
_retries = 3;
|
||||
if((OK == probe_address(MS5611_ADDRESS_1)) ||
|
||||
(OK == probe_address(MS5611_ADDRESS_2))) {
|
||||
_retries = 1;
|
||||
return OK;
|
||||
}
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user