About rotate screen use G-SENSOR

by lgbk » Mon, 17 May 2010 15:42:14 GMT


Sponsored Links
 Hi all,
  I'm debuging my gsensor in my devices.And now in my sensor HAL layer
code ,I return two types data.(ID_ACCELERATION and ID_ORIENTATION).I'm
confused how covert x,y,z data to pitch,roll.....In my code I use
                  pitch = atan(sensors.acceleration.y/
sensors.acceleration.z)*360/M_PI;
                  roll = atan(sensors.acceleration.x/
sensors.acceleration.z)*180/M_PI;
                  sensors.orientation.azimuth = 0.0;
But it seems have some error.Now I can not rotate my screen
automaitic,but can play some g-sensor game,like(labyrinthfull.apk).So
my question is that ,if I want to rotate screen automatic,which data
the system need to use?x,y,z? or pitch roll azimuth? or antoher data?
Can somebody show me some example,thanks.Any suggestion is appracite.

-- 



About rotate screen use G-SENSOR

by lgbk » Mon, 17 May 2010 17:28:26 GMT


 Some guys told me the sensor raw data is enough.So if it is right ,I
think the raw data I have covert and report successfull.So maybe I
forget some config in system.I also heared that I need config
something in init,rc but I didn,t know what need I add.Can anybody
told me or give me some suggestion,thanks!!!




-- 


Sponsored Links


Other Threads

1. org.xml.sax.SAXParseException: Unexpected end of document

Hi everybody,
I am parsing following xml with SimpleParser, but I am facing error as
follows: Can anyone tell me why is this happening?

XML: <?xml version="1.0" encoding="utf-8"?><result><status>552</
status><statustext>No Results Found</statustext></result>

Error: 01-29 10:28:51.220: WARN/System.err(520):
org.xml.sax.SAXParseException: Unexpected end of document
01-29 10:28:51.239: WARN/System.err(520):     at
org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:
129)
01-29 10:28:51.239: WARN/System.err(520):     at
org.simpleframework.xml.stream.DocumentProvider.provide(DocumentProvider.java:
97)
01-29 10:28:51.239: WARN/System.err(520):     at
org.simpleframework.xml.stream.DocumentProvider.provide(DocumentProvider.java:
83)
01-29 10:28:51.239: WARN/System.err(520):     at
org.simpleframework.xml.stream.NodeBuilder.read(NodeBuilder.java:71)
01-29 10:28:51.239: WARN/System.err(520):     at
org.simpleframework.xml.core.Persister.read(Persister.java:569)
01-29 10:28:51.239: WARN/System.err(520):     at
org.simpleframework.xml.core.Persister.read(Persister.java:506)
01-29 10:28:51.249: WARN/System.err(520):     at
org.simpleframework.xml.core.Persister.read(Persister.java:415)
01-29 10:28:51.249: WARN/System.err(520):     at
com.optumizeme.vminterface.UserProvider.onResponseReceived(UserProvider.java:
788)
01-29 10:28:51.249: WARN/System.err(520):     at
com.optumizeme.network.CallbackWrapper.run(CallbackWrapper.java:15)
01-29 10:28:51.249: WARN/System.err(520):     at
android.os.Handler.handleCallback(Handler.java:587)
01-29 10:28:51.249: WARN/System.err(520):     at
android.os.Handler.dispatchMessage(Handler.java:92)
01-29 10:28:51.249: WARN/System.err(520):     at
android.os.Looper.loop(Looper.java:123)
01-29 10:28:51.249: WARN/System.err(520):     at
android.app.ActivityThread.main(ActivityThread.java:4363)
01-29 10:28:51.249: WARN/System.err(520):     at
java.lang.reflect.Method.invokeNative(Native Method)
01-29 10:28:51.259: WARN/System.err(520):     at
java.lang.reflect.Method.invoke(Method.java:521)
01-29 10:28:51.259: WARN/System.err(520):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-29 10:28:51.259: WARN/System.err(520):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-29 10:28:51.259: WARN/System.err(520):     at
dalvik.system.NativeStart.main(Native Method)

-- 

2. kernel compile error

Who can compile samsung kernel tree successI make the s3c6400 config
file is the default config and compile the kernel source get the error
:

arch/arm/plat-samsung/pm.c:33:33: error: plat/irq-eint-group.h: No
such file or directory
arch/arm/plat-samsung/pm.c: In function 's3c_pm_enter':
arch/arm/plat-samsung/pm.c:371: error: 'S5P_WAKEUP_STAT' undeclared
(first use in this function)
arch/arm/plat-samsung/pm.c:371: error: (Each undeclared identifier is
reported only once
arch/arm/plat-samsung/pm.c:371: error: for each function it appears in.)
arch/arm/plat-samsung/pm.c:382: error: 'S5P_CLK_DIV0' undeclared
(first use in this function)
arch/arm/plat-samsung/pm.c:397: error: implicit declaration of
function 's5pv210_restore_eint_group'

my soc is s3c6410 and board is smdk 6410  .
just for help

-- 

3. Custom Dialog without context application

4. Submenus in Options Menu on Honeycomb - broken, or I'm using it in wrong way?

5. help to build an intent filter

6. How to keep adb from being launched too early?

7. How to bring Activity to top of stack and reset it?