Magd Service for accelerometer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Magd Service for accelerometer

2,079件の閲覧回数
rahulthakre
Contributor I

Hi, I am working on a project in which i have a task of rotating screen of device. But my device only have a mma8451 accelerometer sensor and don't have magnetometer sensor. I have a pdf in which clearly mentioned that Magd service will work only when both sensors (Accelerometer and Magnetometer ) are present otherwise Magd service will exit. Now i dont have magnetometer in my device so how can i use Magd to rotate screen using accelerometer only . I don't have a source code of Magd service. I am attaching two pdfs that i was referring

ラベル(4)
0 件の賞賛
返信
2 返答(返信)

1,931件の閲覧回数
david_diaz
NXP Employee
NXP Employee

Hello Rahul,

I hope all is great with you.

Have you considered using the ORIENTATION detection function of the MMA8451Q device?

The MMA8451Q incorporates an advanced algorithm for orientation detection (ability to detect all six orientations) with configurable trip points. The embedded algorithm allows the selection of the midpoint with the desired hysteresis value.

Please review the application note below, I know it will be useful for you.

Embedded Orientation Detection Using the MMA8451, 2, 3Q

 

Please let me know if you have any further question.

Regards,

David

0 件の賞賛
返信

1,931件の閲覧回数
rahulthakre
Contributor I

Hi David,

Thanks for replying.

I have already tried what you have suggested. Driver mma8451 working fine

for embedded linux(yocto) but for android only event is generating which we

can see using “getevent ” command. I have a sensors.default.so in

/system/lib/hw and libsensorservice.so in /system/lib. Any file i am missing

in android so that android screen is not rotating from landscape to portrait

and vice versa. If possible can you share how the information pass from

mma8451 to user space and what files are required in android to pass event

of accelerometer sensor.

Regards

Rahul Thakre| Software Developer

0 件の賞賛
返信