hi (this is my first post),
i'm trying to tweak the maximum from the pressure sensor in the galaxy s4 coding up a variometer app (yes, i know there are several).
the chip in the device is a bosch180 with quite impressive specs.
i've tried to increase polling rate so as to do filtering without encoding too much delay (which is what other apps are suffering from, imho - hence the motivation).
i found that no matter what poll interval i specify (either through SensorManager.registerListener in java or ASensorEventQueue_setEventRate in native), the refresh rate is always the same (as per logcat):
Sensors(814): Pressure old sensor_state 129, new sensor_state : 137 en : 1
or and diffing event timestamps in the app (that actually shows 170-180 millisecs)
so i went digging further, trying to untangle the mysteries of pressure sensor. i checked the chip specs and linux drivers, and still believe faster polling should be possible.
i'm on cm11-jflte (both release and built from source), rooted
cm11 kernel is configured to use the sensorhub ssp drivers for the pressure sensor (not bmp085.c or bmp18x.c), i tried to re-hardcode the default polling rate for the pressure sensor in the ssp driver files (which is otherwise 200ms for all sensors across the board), which changes the poll_delay file contents on the sysfs, but doesn't change the behavior in the app.
i currently don't have the time to untangle the workings of ssp.
QUESTION: where in the (java or) native android layer or the ssp kernel drivers are the default(?) polling rates for specific sensors specified?
ALT: other ideas as to how to proceed?
(i will reconfigure the kernel to use one of the the other bmp drivers next, but fear how that will impact the rest of the sensorhub...)
(i realize this is more of a hacking/tweaking topic, but as i just signed up to ask this specific question, i'm not yet allowed to post in the rom/tweaks development section - if a moderator could maybe move the thread...)
thanks for all ideas in advance!
i'm trying to tweak the maximum from the pressure sensor in the galaxy s4 coding up a variometer app (yes, i know there are several).
the chip in the device is a bosch180 with quite impressive specs.
i've tried to increase polling rate so as to do filtering without encoding too much delay (which is what other apps are suffering from, imho - hence the motivation).
i found that no matter what poll interval i specify (either through SensorManager.registerListener in java or ASensorEventQueue_setEventRate in native), the refresh rate is always the same (as per logcat):
Sensors(814): Pressure old sensor_state 129, new sensor_state : 137 en : 1
or and diffing event timestamps in the app (that actually shows 170-180 millisecs)
so i went digging further, trying to untangle the mysteries of pressure sensor. i checked the chip specs and linux drivers, and still believe faster polling should be possible.
i'm on cm11-jflte (both release and built from source), rooted
cm11 kernel is configured to use the sensorhub ssp drivers for the pressure sensor (not bmp085.c or bmp18x.c), i tried to re-hardcode the default polling rate for the pressure sensor in the ssp driver files (which is otherwise 200ms for all sensors across the board), which changes the poll_delay file contents on the sysfs, but doesn't change the behavior in the app.
i currently don't have the time to untangle the workings of ssp.
QUESTION: where in the (java or) native android layer or the ssp kernel drivers are the default(?) polling rates for specific sensors specified?
ALT: other ideas as to how to proceed?
(i will reconfigure the kernel to use one of the the other bmp drivers next, but fear how that will impact the rest of the sensorhub...)
(i realize this is more of a hacking/tweaking topic, but as i just signed up to ask this specific question, i'm not yet allowed to post in the rom/tweaks development section - if a moderator could maybe move the thread...)
thanks for all ideas in advance!