×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    44

    QRotationSensor values

    Hi,

    When I use QRotationSensor and values from reading->x() , there are values only like 0, 15, 30 , 45 simply with step 15° ... Is there any solution (like some setProperty or anything) like get value with step 1° (so 0,1,2,3,4 etc...) and not only 15°???

    Thanks.

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QRotationSensor values

    You can change that Rotation reading : http://doc.qt.nokia.com/qtmobility-1...nreading-units

    Check this above article, If you face any problem write here.

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    44

    Re: QRotationSensor values

    I have looked over QRotationSensor very well, but I can`t see there some solution to resolve my problem. I want to only get values from roration sensor with step 1° (or smaller) and not with step 15°. Do you understand what I want?

  4. #4
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QRotationSensor values

    It may be more accurate create this 15° degree resolution from the raw QAccelerometerReading data. Unfortunately the pitch and roll calculation in not depending on any property.

    /0

  5. #5
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: QRotationSensor values

    I think it is a Qt bug.

    I always used this function and it always worked (with a step of 0.0001°). Since Qt4.7.4, I also get a step of only 15°!

    Some times, if I restart my phone it works good the first time and after I restart the app, I get only this 15° step!

    The angry thing, is that if I start an app compiled with the old Qt, the sensor works on that app!
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  6. #6
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QRotationSensor values

    Please kindly create a bug report in that case.

  7. #7
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QRotationSensor values

    Other option to check the sensor's supported outputRanges(). However if the sensor backend accuracy is set to 15° not much can be done without communicating with the sensor with native APIs. The application may not even need to know which backend it connects to.

  8. #8
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: QRotationSensor values

    It is hard to follow you... It was so easy with mobility 1.1.2. After the sensor was created, I was able to read it and set a filter to filter the data. Now every thing I made, has no effect for this accuracy

    I am not able to implement the native C code in my project. On my N8, if I check my outputranges, I get a list of 1 range:
    min: -180, max: 180, accuracy: 0.0416667.

    I was hoping that with the last update (yesterday) it worked again, but I get always an accuracy of 15°

    EDIT: setting the outputrange to -1 (or also to 0) has no effect: mySensor.setOutputRange(-1);
    Last edited by Tiger54; 2012-02-03 at 16:32.
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  9. #9
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QRotationSensor values

    From 1.2.0 the system backends replace the generic backends, so exactly that is when the change had happened.

  10. #10
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: QRotationSensor values

    Do you think that it will be ever fixed for symbian phones? Or should I try to create the app with Qt mobility 1.1.2?
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  11. #11
    Registered User
    Join Date
    Feb 2011
    Posts
    3

    Re: QRotationSensor values

    Hi,

    Symbian Belle upgrade is causing this problem to my app as well. It's using QRotationSensor to control the app (game). It was working fine on Symbian^3/Anna and N9 using Qt 4.7.3 and QtMobility 1.1.3. Now rotation sensor returns only 0,15,30,.. degrees. The same problem occurs on app compiled against Qt 4.7.3 / Mobility 1.1.3 target and Qt 4.7.4 / Mobility 1.2.1 target.

    Application output is showing following messages:
    [Qt Message] loaded the Generic plugin
    [Qt Message] Loaded the symbian sensor plugins
    [Qt Message] loaded the Generic plugin
    [Qt Message] Loaded the symbian sensor plugins
    [Qt Message] A backend with type "QProximitySensor" and identifier "sym.proximity" has already been registered!
    [Qt Message] A backend with type "QAmbientLightSensor" and identifier "sym.ambientlight" has already been registered!
    [Qt Message] A backend with type "QMagnetometer" and identifier "sym.magnetometer" has already been registered!
    [Qt Message] A backend with type "QCompass" and identifier "sym.compass" has already been registered!
    [Qt Message] A backend with type "QOrientationSensor" and identifier "sym.orientation" has already been registered!
    [Qt Message] A backend with type "QAccelerometer" and identifier "sym.accelerometer" has already been registered!
    [Qt Message] A backend with type "QRotationSensor" and identifier "sym.rotation" has already been registered!
    [Qt Message] A backend with type "QTapSensor" and identifier "sym.tap" has already been registered!

  12. #12
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: QRotationSensor values

    Linking the solution from the relevant discussion here too.

  13. #13
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: QRotationSensor values

    Great

    Quote Originally Posted by vesao View Post
    It worked, thank you!

    Solution was to add following lines before starting rotation sensor:
    rotationSensor->setIdentifier("generic.rotation");
    rotationSensor->connectToBackend();
    It works also by me

    But I noticed that the accuracy is not anymore good like in version 1.0.2. Now I have an accuracy of 0.7°-0.8°.

    It is surely better than 15°, but also 0.7° is not really the best what a N8 can offer.
    Last edited by Tiger54; 2012-03-09 at 10:28.
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

Similar Threads

  1. Find RGB values
    By swarna.nokia in forum Mobile Java Media (Graphics & Sounds)
    Replies: 21
    Last Post: 2009-07-09, 11:21
  2. not getting exact values???
    By arun09 in forum Symbian
    Replies: 0
    Last Post: 2009-06-19, 11:30
  3. how can i set values inTextSettingItem
    By arumilli in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2008-04-15, 09:46
  4. Not Coorect Values
    By Hadad.Net in forum Symbian
    Replies: 7
    Last Post: 2007-10-10, 21:19
  5. Replies: 0
    Last Post: 2007-06-11, 06:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×