mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
kxcjk1013: code cleanup and update sensor description
Code cleanup and proper close iio device in destructor. KXCJK-1013 is tri-axis accelerometer from Kionix. This sensor can measure acceleration in metre per second squared or in G-forces. The library provided is libupm-kxcjk1013.so.0.4.0. The example provided is kxcjk1013-example where it will print x,y,z axis when trigger buffer data is ready. Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com> Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
3
examples/c++/kxcjk1013.cxx
Normal file → Executable file
3
examples/c++/kxcjk1013.cxx
Normal file → Executable file
@ -44,8 +44,7 @@ data_callback(char* data)
|
||||
{
|
||||
float x, y, z;
|
||||
accelerometer->extract3Axis(data, &x, &y, &z);
|
||||
printf("%.1f %.1f %.1f\n", x, y, z);
|
||||
// usleep(100);
|
||||
printf("% .1f % .1f % .1f\n", x, y, z);
|
||||
}
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user