This is the documentation page for the Linux components of the sensors-hal iio.
Configuration file can be used to set parameters at runtime (during init). If a parameter is set in the configuration file, default value for that parameter will be discarded.
Here a list of possible parameters:
- max-odr
- rot-matrix-1.SENSORTYPE
- rot-matrix-2.SENSORTYPE
- placement-1.SENSORTYPE
- placement-2.SENSORTYPE
- max-range.SENSORTYPE
where SENSORTYPE can be one of these values:
- accel
- magn
- gyro
Example of configuration file usage (default /etc/stm-sensors-hal/config):
#max odr that can be used is 250Hz
max-odr = 250
#accel rotation matrix
rot-matrix-1.accel = "1.0,0,0,0,1.0,0,0,0,1.0"
#accel position in mm
placement-1.accel = "10,20,30"
#accel full-scale to support reading of at least 70m/s^2
max-range.accel = 70
#magn full-scale to support reading of at least 2000uT
max-range.magn = 2000
#gyro full-scale to support reading of at least 8rad/s
max-range.gyro = 8
Default parameters can be set at compile time by changing the CMakeLists.txt cflags (under core, see core documentation).
1> clone this repository into desired folder:
git clone https://github.com/STMicroelectronics/st-mems-android-linux-sensors-hal.git
cmake -DCMAKE_BUILD_TYPE=Release ${PROJECT_SOURCE_PATH}
cmake -DCMAKE_BUILD_TYPE=Debug ${PROJECT_SOURCE_PATH}
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${PROJECT_SOURCE_PATH}
- arm64
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm64.cmake ${PROJECT_SOURCE_PATH}
- arm32
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm32.cmake ${PROJECT_SOURCE_PATH}
cmake -GNinja ${PROJECT_SOURCE_PATH}