Magnetometer causing lag?

Put your problem here if it does not fit any of the other categories.

Magnetometer causing lag?

Postby mrjohs » Wed Nov 10, 2010 8:19 am

I'm developing an application which will use magnetometer data for interaction, by moving a magnet towards and away from the phone. This works fine (enough), but it seems like when I move the magnet too close to the phone, a noticeable lag occurs, and these messages are being spit out to the log:

Tag Message
AK8973 HRET = AKSC_HOF_DSS_START
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_REQUEST
AK8973 HRET = AKSC_HOF_DSS_COMPLETE

This can be also demonstrated for example in the app "Compass 3D" which is available on Market. It is enough to move a headphone in direct contact with the phone, it will produce a lag for at least 4-500 msec, and the messages above printed to Logcat. This is on my HTC Hero.

Any ideas as to what is causing this lag, or how to work around it?

All ideas and theories are helpful! Speculate!
Apploudable - Entertainment apps for the Android platform
http://apploudable.com
mrjohs
Freshman
Freshman
 
Posts: 8
Joined: Fri Oct 01, 2010 3:42 pm

Top

Re: Magnetometer causing lag?

Postby blundell » Wed Nov 10, 2010 5:13 pm

Is the lag being caused by your app or another?

If it is your app, are you asking for updates to frequently? causing laaaag
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Magnetometer causing lag?

Postby mrjohs » Wed Nov 10, 2010 9:31 pm

It is my app, and pretty much any other app using the magnetometer. I heard something about "hysteresis" going on in magnetometers, so I'm assuming this is a technical limitation. After all the magnetometer is intended to function as a compass, not for controlling games.

If someone has other suggestions, please let me know.
Apploudable - Entertainment apps for the Android platform
http://apploudable.com
mrjohs
Freshman
Freshman
 
Posts: 8
Joined: Fri Oct 01, 2010 3:42 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 22 guests