Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Contributor
SammyBGoode
Posts: 19
Registered: ‎11-12-2012
My Carrier: Bell

Apparent bug in accelerometer library?

Hello there,

 

There seems to be an inconsistency with the accelerometer interface.  QAcceleromer::start() is returning "true" yet a) the accelerometers do not appear to be working and b) I am getting an error notification in the console. 

 

Code snippet:

 

qDebug() << "Starting accelerometer";
bool success = _accelerometer->start();
qDebug() << "Did it work? " << success;

 

And here is a cut and paste from the console:

 

Starting accelerometer
Starting sensor "/dev/sensor/linAccel" failed: "Unknown error"
Starting sensor "/dev/sensor/linAccel" failed: "Unknown error"
Did it work?  true

 

In the least, shouldn't ::start() be return false?  Addiitonally, I have no idea why it is not starting.  (It has worked before, maybe with the previous cut of the sdk. ??)

 

Using the latest SDK on a DevAlpha.

 

Thanks in advance.  SbG.

Please use plain text.
Contributor
SammyBGoode
Posts: 19
Registered: ‎11-12-2012
My Carrier: Bell

Re: Apparent bug in accelerometer library?

Small update here: In the example above, I had set the mode to "USER", whereas previously I had set it to "COMBINED", the default.  I switched it back to COMBINED and the accelerometers started working again.  So this appears another glitch.  It remains however that ::start() appears to be returning an incorrect value.

 

I have filed an issue here with the bug tracking department (BBTEN-598).  SbG.

Please use plain text.