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.

inside custom component

Native Development

Reply
Contributor
Posts: 22
Registered: ‎11-12-2012
My Device: Bold 9900
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.

Contributor
Posts: 22
Registered: ‎11-12-2012
My Device: Bold 9900
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.