Error connecting sf11c lidar to i2c in pixhawk4


Hi i have a problem.

In pixhawk4, I connected sf11c lidar to i2c, but I do not get the sensor value.
When tested with a single product, the sensor value is displayed. The sf11c setting is set to 0x66.
The parameters set in Qgroundcontrol are as follows.

EKF2_HGT_MODE Range sensor
EKF2_RNG_AID Range aid enabled

So I try to start by modifying the source code. I want to know how to change the PX4_I2C_BUS_EXPANSION of the source code (src / drivers / distance_sensor / sf1xx / sf1xx.cpp) to PX4_I2C_BUS_ONBOARD.

Help me please.


I personally never been able to get sf11c to work on pixhawk4. Had to switch to lidarlite v3.


Thank you very much cooldude.
I will try it the way you recommend.