| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit 381a05756bdbe474ab76242a4e2934d81b8975e9.
|
|
|
|
|
|
|
|
| |
* based off t0lte sensors
* AkmSensor kanged from i9100 (added sensor status support)
* has a working compass!
Change-Id: Iaed0463c33089ca0b636be4ba3f966f2e25f34f9
|
|
|
|
|
|
|
|
| |
Even though we changed the signature of the set_delay() methods,
we can still get an overflow while actually writing the values to sysfs.
Let's adapt sysfs_value_read() and sysfs_value_write() too.
Change-Id: If8eda7204831f0edabec890d4e3127be520fa3bf
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a strict basetype only coding style is not a good idea
especially when we are dealing with callbacks which use portable
typedef like int64_t. This kind of coding style would most likely
end up in overflows at various places especially when dealing with
timestamps and sensor delays which are caused when typecasting
datatypes of different size.
Switch to portable typedefs and get rid of "long".
Change-Id: I75b9cace7602345dba9095f046292e6d4db07df4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actually this fixes several more problems, but the compass orientation
is the most noticeable symptom of this:
Android expects sensor event timestamps in nanoseconds. Linux timestamps
on the other hand are saved in the timeval struct in seconds and micro-
seconds. Therefore these need to be converted, which is easy enough and
is implemented in input.c of libsensors. Unfortunately, the current
implementation uses type long int for the return value and all further
calculations. Since the nanosecond values easily exceed 2^32 the buffers
overflow and wrap, which results in the reported timestamps moving between
-2^16 and 2^16. The consequences of this are noticeable especially with
fused sensors integrating the gyroscope readings, which use the difference
of two timestamps to calculate the change in orientation by multiplying it
by the rotation rate. When the buffer wraps around this results in a huge
time difference and thus leads to a momentary orientation change every
~4.3 seconds.
This commit fixes this behavior by using long long int.
Change-Id: Ib47bdc36ece16371c82f61b125315074ec048e32
|
|
|
|
| |
Change-Id: I3dd56f4d7fb0de8feca2422c165fe0c3cd92761a
|
|
|
|
|
|
| |
- Orientation sensor still broken
Change-Id: I7d20afbbc1f8b1ca5d046a38c0c3b7ce824c12cd
|
|
Change-Id: Ia104c31f165fcaca1ee5dc471f7d71ca9abd387f
|