| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I7cad5c048c1a9877889216ca8ca43bb13daeb4b0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Orientation Sensor is deprecated and no longer required.
Additionally this implementation is never even used, since Android
automatically replaces it by it's own implementation if the sensor HAL
doesn't also provide a Rotation Vector sensor. Furthermore the current
implementation only uses the accelerometer and magnetometer for the
sensor fusion and doesn't make use of the Gyroscope. So should we at
some point decide to implement our own complete sensor fusion this
would have to be rewritten anyway.
Change-Id: I45d8a9afd2089b49131e6cc69cdf2f3dfee46c92
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
also fix a typo
Change-Id: I69246a96c53d7ec02ca90d73bc85dec4cbc73343
|
|
|
|
| |
Change-Id: I81ff71c8ae6bf25c1aabac4a6d8d6fcf64bd2e0b
|
|
|
|
| |
Change-Id: Iee501b65c23bed22bfe769496bafc852f939a8ac
|
|
|
|
| |
Change-Id: I3dd56f4d7fb0de8feca2422c165fe0c3cd92761a
|
|
|
|
|
|
|
|
|
| |
This reverts commit 9f7182d0542f4c82b6fe4722b8b9389021ad6ae9.
Let's not mess with the magnetometer sensitivity adjustments.
The magnetometer orientations are correct as is.
Change-Id: I218578088c43a27f4ff89d8c9e1671641725817a
|
|
|
|
|
|
| |
- Orientation sensor still broken
Change-Id: I7d20afbbc1f8b1ca5d046a38c0c3b7ce824c12cd
|
|
|
|
| |
Change-Id: I3c5cd29a497d2a84da7742b8fdf54bf4e0869cee
|
|
|
|
| |
Change-Id: I5adfaacbfd6eff42e4e861fcd67281421e230f86
|
|
|
|
| |
Change-Id: I35255735cc895047d7594bdb595db052a8a086ac
|
|
Change-Id: Ia104c31f165fcaca1ee5dc471f7d71ca9abd387f
|