SensorFusion CorrectedAcceleration issue

Hello,

I would like to use this feature on my MotionC sensor, but looks like faulty. I am using similar code as in the documentation:
final SensorFusionBosch sensorFusion = metawear.getModule(SensorFusionBosch.class);
sensorFusion.configure()
.mode(SensorFusionBosch.Mode.NDOF)
.accRange(SensorFusionBosch.AccRange.AR_2G)
.gyroRange(SensorFusionBosch.GyroRange.GR_2000DPS)
.commit();

sensorFusion.correctedAcceleration().addRouteAsync(new RouteBuilder() {
@Override
public void configure(RouteComponent source) {
source.limit(33).stream(new Subscriber() {
@Override
public void apply(Data data, Object... env) {
SensorFusionBosch.CorrectedAcceleration acceleration = data.value(SensorFusionBosch.CorrectedAcceleration.class);
Log.i(TAG, acceleration.toString());

}
});
}
}).continueWith(new Continuation<Route, Void>() {
@Override
public Void then(Task<Route> ignored) throws Exception {
sensorFusion.correctedAcceleration().start();
sensorFusion.start();
return null;
}
});
But this is usually not working, sometimes I got few data peaces and stop doing everything. Am I miss something with the code or is it an api/fw fault?
Firmware is 1.3.3, API: 3.0.32

Comments

  • Does it properly work if you remove the time limiter?  You should also add error handling in the Continuation to check if the addRouteAsync task faulted.  

    As a last resort, reset the board and try streaming quaternions from the MetaBase app.
  • Quaternions is working properly in my app with the time limiter.
    Without limit() the correctedAcceleration is sending data, but floods the phone. I see lots of out of buffers logs.
  • edited July 2017
    Hrm, in that case, it could be a fw issue but we'll have to debug further.  For now, just use the normal accelerometer data if you need to control the data rate.
This discussion has been closed.