I just submitted a pull request that adds magnetometer support to the sensor API as well as the LSM303DLHC driver: https://github.com/apache/incubator-mynewt-core/pull/152

It wasn't clear to me what the right approach is to registering a sensor, however, when the sensor contains more than one sensor type: https://github.com/microbuilder/incubator-mynewt-core/blob/sensors_branch/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c#L276

If someone on the dev list can perhaps clarify the correct registration process, I can update the PR if necessary?

Kevin

PS: sensor_shell.c currently prints an integer for mag data which isn't accurate (it should be a float) but for debug purposes I cast to an integer for now due to the lack of %f support in mynewt's libc.

Reply via email to