OSDN Git Service
(root)
/
android-x86
/
device-ibm-thinkpad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feed05f
)
this is not correct but the UI rotation works correctly like this - need to investigate
author
Stefan Seidel
<android@stefanseidel.info>
Mon, 6 Feb 2012 12:59:33 +0000
(13:59 +0100)
committer
Stefan Seidel
<android@stefanseidel.info>
Mon, 6 Feb 2012 12:59:33 +0000
(13:59 +0100)
libsensors/sensors.c
patch
|
blob
|
history
diff --git
a/libsensors/sensors.c
b/libsensors/sensors.c
index
17ccb90
..
bae9808
100644
(file)
--- a/
libsensors/sensors.c
+++ b/
libsensors/sensors.c
@@
-110,11
+110,10
@@
static int device__poll(struct sensors_poll_device_t *device,
// Android imagines the device in portrait mode, but hdaps measures in landscape mode,
// so swap x and y axis!
case ABS_X:
- data->acceleration.
y = -
(float) event.value * CONVERT;
+ data->acceleration.
x =
(float) event.value * CONVERT;
break;
case ABS_Y:
- data->acceleration.x = - (float) event.value * CONVERT;
- break;
+ data->acceleration.y = -(float) event.value * CONVERT;
break;
}
} else if (event.type == EV_SYN) {