Decawave / uwb-apps

Apache License 2.0
33 stars 31 forks source link

Support for DWM1001's LIS2DH12 IMU #13

Open yakinikuman opened 3 years ago

yakinikuman commented 3 years ago

I'm using the RTDOA example. Is there any way to enable support for the LIS2DH12 accelerometer? I see that in the syscfg.yml for the RTDOA example, there are parameters LSM6DSL_ONB, LIS2MDL_ONB, and LPS22HB_ONB, but unfortunately not for DWM1001's onboard LIS2DH12.

Looking through the code, I see that IMU data is periodically printed out. Is the IMU data used at all in the RTDOA solution, or is it just informational? If it isn't needed by the RTDOA algorithm, then I won't be concerned so much.

seijikun commented 3 years ago

I also needed access to the IMU. Luckily, Apache mynewt already has a working driver for the LIS2DH12 accelerometer, one just has to get it to load and power up. See my PR for how to do this, and an example application making use of it.