Revert "Removed compass offset hack. It only "worked" if the phone was lying flat anyway, and only for some people."
Rajko assures me this works for most people, so I'll leave it until I get more feedback one way or another. This reverts commit c60f5846d61a91f94244a6dcf7ff6fd659e14729.
This commit is contained in:
parent
935a9ce797
commit
2dbf06e5df
@ -260,6 +260,18 @@ static void AKECS_Report_Value(short *rbuf)
|
||||
rbuf[6], rbuf[7], rbuf[8]);
|
||||
#endif
|
||||
|
||||
/* Offset compass hack taken from michyprimas kernel */
|
||||
short valueint = rbuf[0];
|
||||
if ((valueint + 85) < 360)
|
||||
{
|
||||
rbuf[0] = valueint + 85;
|
||||
}
|
||||
else
|
||||
{
|
||||
short diff = 359 - valueint;
|
||||
rbuf[0] = 85 - diff;
|
||||
}
|
||||
|
||||
/* Report magnetic sensor information */
|
||||
if (atomic_read(&m_flag)) {
|
||||
input_report_abs(data->input_dev, ABS_RX, rbuf[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user