×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Question Data from sensor API

    Hi,

    I want to use Sensor API. But I have a question about the data returned from the sensor API. What is the meaning of the returned data from accelerometer sensor and rotation sensor? What is its data range? (about +/-300 for 1G in my N95, N82, but some people say +256/-255 for 1G.) Rotation data doesn't make sense to me. Can anyone explain it for me?

    The data type is TInt. It's different from other platforms. In Android and IPhone, the data type is floating point and normalized to +1.0 and -1.0. And the API structure is a little bit different. In Android and IPhone, the APIs provides a update frequency. How often does the SensorListenor get called in Symbian? Is it also controllable?

    Alioth.
    Last edited by aliothliu; 2008-08-29 at 19:15.

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Data from sensor API

    yes the Return type is different then other OS .

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    27

    Re: Data from sensor API

    I found a very strange API bug.

    Code:
    CRRSensorApi* aObj = CRRSensorApi::NewL();
    aObj->AddDataListener(this);
    ...
    
    // at some time.
    aObj->RemoveDataListener();
    
    // and then add the Listener again
    aObj->AddDataListener(this);   <<= Bane!
    The program crashes at the last call to AddDataListener in N82. But it doesn't crash in N95. However, the callback never get called afterward. The error message is E32User-CBase:42.

    It seems that RemoveDataListener() doesn't call Cancel(). Anyway, you can walk around the bug if you always free the object after remove data listener and allocate the object again when you need it.

    Does anyone have other solution?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Data from sensor API

    Looks like you already have some calls active to your active object.

Similar Threads

  1. 3G Voice Call and simultaneous data connection
    By olshevch in forum General Development Questions
    Replies: 8
    Last Post: 2009-12-19, 14:26
  2. Replies: 3
    Last Post: 2008-09-09, 04:53
  3. Replies: 1
    Last Post: 2007-04-17, 10:47
  4. Replies: 4
    Last Post: 2006-08-30, 10:15
  5. Unicode Song Title In NSM Ringtone
    By mcai7db3 in forum Smart Messaging
    Replies: 3
    Last Post: 2002-08-28, 06:58

Posting Permissions

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