projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d291970
)
l3g4200d filte wave avoid wobble
author
cdy
<cdy@rock-chips.com>
Mon, 4 Feb 2013 01:56:01 +0000
(09:56 +0800)
committer
wuhao
<wuhao@wuhao@rock-chips.com>
Mon, 4 Feb 2013 01:56:01 +0000
(09:56 +0800)
drivers/input/sensors/gyro/l3g4200d.c
patch
|
blob
|
history
diff --git
a/drivers/input/sensors/gyro/l3g4200d.c
b/drivers/input/sensors/gyro/l3g4200d.c
index 6d08849fa17dd465f01d86aa5a5042213f108676..e1075854e5b8b41c307f7da083a30ed4329b3d6e 100755
(executable)
--- a/
drivers/input/sensors/gyro/l3g4200d.c
+++ b/
drivers/input/sensors/gyro/l3g4200d.c
@@
-192,7
+192,7
@@
static int sensor_report_value(struct i2c_client *client)
}
//filter gyro data
- if(
(abs(axis.x) > pdata->x_min)||(abs(axis.y) > pdata->y_min)||(abs(axis.z) > pdata->z_min)
)
\r
+ if(
((abs(axis.x) > pdata->x_min) & (abs(axis.x) < 240))||(abs(axis.x) > 260) || ((abs(axis.y) > pdata->y_min)& (abs(axis.y) < 240))||(abs(axis.y) > 260)|| ((abs(axis.z) > pdata->z_min) & (abs(axis.z) < 250)) || (abs(axis.z) > 260)
)
\r
{
\r
gyro_report_value(client, &axis);
\r
\r