mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-09 17:34:01 -04:00
AP_RangeFinder: added a 1.5 delay to probe of LW20 I2C
the LW20 takes a long time to boot and be ready to probe
This commit is contained in:
parent
bcfdc91900
commit
0f6b8375bb
@ -380,6 +380,10 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance)
|
|||||||
break;
|
break;
|
||||||
case RangeFinder_TYPE_LWI2C:
|
case RangeFinder_TYPE_LWI2C:
|
||||||
if (params[instance].address) {
|
if (params[instance].address) {
|
||||||
|
// the LW20 needs a long time to boot up, so we delay 1.5s here
|
||||||
|
if (!hal.util->was_watchdog_armed()) {
|
||||||
|
hal.scheduler->delay(1500);
|
||||||
|
}
|
||||||
#ifdef HAL_RANGEFINDER_LIGHTWARE_I2C_BUS
|
#ifdef HAL_RANGEFINDER_LIGHTWARE_I2C_BUS
|
||||||
_add_backend(AP_RangeFinder_LightWareI2C::detect(state[instance], params[instance],
|
_add_backend(AP_RangeFinder_LightWareI2C::detect(state[instance], params[instance],
|
||||||
hal.i2c_mgr->get_device(HAL_RANGEFINDER_LIGHTWARE_I2C_BUS, params[instance].address)));
|
hal.i2c_mgr->get_device(HAL_RANGEFINDER_LIGHTWARE_I2C_BUS, params[instance].address)));
|
||||||
|
Loading…
Reference in New Issue
Block a user