How can i set the Accelerometer Sensor Range to 8g?

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

The Accelerometer Sensor is set to a Range of 2 - 4 g on most devices.
There is no option to turn it up to 8 or 16 G, which my sensor and most others are capable of.
I found some Information but cant get any further how to achieve this.

I have the LIS3DSH Sensor in my Xiaomi Device.

There is a manual which states that in the configuration .hal file you can set
/* ACCELEROMETER SENSOR \*/
#define SENSOR_ACC_LABEL “LSM303DLHC 3-axis Accelerometer“
#define SENSOR_ACC_INCLUDE_FILE_NAME “lsm303dlhc.h“
#define SENSOR_DATANAME_ACCELEROMETER LSM303DLHC_ACC_DEV_NAME
#define ACCEL_DELAY_FILE_NAME “pollrate_ms“
#define ACCEL_ENABLE_FILE_NAME “enable_device”
#define ACCEL_RANGE_FILE_NAME “range”
#define ACCEL_MAX_RANGE 16*GRAVITY_EARTH
#define ACCEL_MAX_ODR 400
#define ACCEL_POWER_CONSUMPTION 0.033f
#define ACCEL_DEFAULT_FULLSCALE 4

But i have no idea how to do this.

I can not Link to the manual since i dont have 10 posts, but you can google for:

AN4156
Application note

would be glad about any information.
 
Hi Rubkat, thank you for the information.
But how does this work?
I cant find where to download the source files.
Or is there already a version on my phone.
And do i compile only the sensor modules or do i recompile the whole android system.
I am really not a pro in the os knowledge.
im glad for any information.
Cheers,
Tolga
 

Trending Posts

Forum statistics

Threads
955,925
Messages
6,966,105
Members
3,163,430
Latest member
chelleulkner