Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User smitis's Avatar
    Join Date
    Oct 2011
    Posts
    44
    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
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,299
    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 smitis's Avatar
    Join Date
    Oct 2011
    Posts
    44
    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 Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    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 Tiger54's Avatar
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121
    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 Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    Please kindly create a bug report in that case.

  7. #7
    Nokia Developer Expert Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    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 Tiger54's Avatar
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121
    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 Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    From 1.2.0 the system backends replace the generic backends, so exactly that is when the change had happened.

  10. #10
    Registered User Tiger54's Avatar
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121
    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 vesao's Avatar
    Join Date
    Feb 2011
    Posts
    3
    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 Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    Linking the solution from the relevant discussion here too.

  13. #13
    Registered User Tiger54's Avatar
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121
    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 C++
    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 C++
    Replies: 7
    Last Post: 2007-10-10, 21:19
  5. E61 KEY VALUES OF PLUS(+) and LETTER 'P' Values
    By pavan in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved