AP_RangeFinder: setup for split I2C transfers

this fixes PulsedLight Lidar on Linux
This commit is contained in:
Andrew Tridgell 2016-12-09 12:58:57 +11:00 committed by Lucas De Marchi
parent a2e445cf24
commit df1da3c14e

View File

@ -147,6 +147,9 @@ bool AP_RangeFinder_PulsedLightLRF::init(void)
}
_dev->set_retries(3);
// LidarLite needs split transfers
_dev->set_split_transfers(true);
if (!(_dev->read_registers(LL40LS_HW_VERSION, &hw_version, 1) &&
hw_version > 0 &&
_dev->read_registers(LL40LS_SW_VERSION, &sw_version, 1) &&