From df1da3c14e43f3d8fee876bb1e676e71c7e8ccd1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 9 Dec 2016 12:58:57 +1100 Subject: [PATCH] AP_RangeFinder: setup for split I2C transfers this fixes PulsedLight Lidar on Linux --- libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp index 98cd9fc1ed..19d8cfa795 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_PulsedLightLRF.cpp @@ -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) &&