Hi, the value we capture from acceleration sensor is the gravity of earth (9.8 m/s^2 in normal) if we get the 20 m/s^2, that means a volatile movement to us. we can not detect the correct orientation in the unstable status.
So, yes, it's a geekphone problem. Regards, viral ----- Original Message ----- From: "A. Crespo" <[email protected]> To: "Viral Wang" <[email protected]> Cc: "Dev B2G List" <[email protected]> Sent: Tuesday, January 14, 2014 5:43:26 PM Subject: Re: [b2g] Orientation sensor not working. Hi, You are right, z is almost 20. But If it were using that, It would mean that FxOS that when it is flipped to the right, X would come Z and would be almost 20 too. It should be detected as an orientation change, despite it's values. Anyways, how to fix it? Is it a geeksphone problem? Regards. 2014/1/14 Viral Wang <[email protected]> > Hi, > > We still use acceleration sensor to calculate the orientation in 1.4 > I check the Keon phone and find the data from acceleration sensor seems > not correct. > One easy test is to put device on the desk, we expect the x,y are close to > 0, and z is close to 9.8. > However, z is almost 20 now. > If the acceleration data didn't report correctly, we can not get the > correct orientation. > > Regards, > viral > > ----- Original Message ----- > From: "A. Crespo" <[email protected]> > To: "Viral Wang" <[email protected]> > Cc: "Dev B2G List" <[email protected]> > Sent: Monday, January 13, 2014 7:38:22 PM > Subject: Re: [b2g] Orientation sensor not working. > > Hi, > > I'm using also 1.4, I think it worked with 1.2, but I don't use 1.2 since > long time ago. > > When you say that you did use the accel sensor do you mean that you don't > use it anymore? > > Regards. > > > 2014/1/13 Viral Wang <[email protected]> > > > Hi, > > > > We did use the acceleration sensor for orientation detection. > > I'm guessing you didn't change any setting in your device. > > > > I take one reference phone with 1.4, the orientation looks good to me. > > Any version information we can have? like which gecko/gaia version your > > orientation sensor ever works. > > or which version it didn't work. > > > > Regards, > > viral > > > > ----- Original Message ----- > > From: "A. Crespo" <[email protected]> > > To: "Viral Wang" <[email protected]> > > Cc: "Dev B2G List" <[email protected]> > > Sent: Monday, January 13, 2014 6:44:34 PM > > Subject: Re: [b2g] Orientation sensor not working. > > > > Hi, > > > > The accelerationIncludingGravity property seems to work okay, but the > > rotationRate doesn't. > > > > Does the orientation detection use the same sensor, the acceleration > > sensor? > > > > If it works, I can't understand why I can't set my browser, camera, > gallery > > or video to landscape mode :( > > > > Thanks you! > > > > > > 2014/1/13 Viral Wang <[email protected]> > > > > > Hi, > > > > > > Here's one quick method to verified your sensor is to check the sensor > > > data in your device. > > > Here's a website using standard API to read the data from orientation > > > sensor. > > > > > > > > > http://www.html5rocks.com/en/tutorials/device/orientation/devicemotionsample.html > > > > > > Regards, > > > viral > > > > > > ----- Original Message ----- > > > From: "A. Crespo" <[email protected]> > > > To: "Dev B2G List" <[email protected]> > > > Sent: Saturday, January 11, 2014 9:47:03 PM > > > Subject: [b2g] Orientation sensor not working. > > > > > > Hi, > > > > > > My screen orientation doesn't change even when I have disabled lock > > > orientation. Have you ever seen anything like that? I am wondering if > the > > > orientation sensor is broken, is there any way to debug it? Could I > test > > it > > > using any tool from the dogfood apps, perhaps? > > > > > > I'm using FxOS 1.4 in a GP Keon device. > > > > > > Regards. > > > _______________________________________________ > > > dev-b2g mailing list > > > [email protected] > > > https://lists.mozilla.org/listinfo/dev-b2g > > > > > > _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
