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
Firmware is 1.3.3, API: 3.0.32
This discussion has been closed.
Comments
addRouteAsync
task faulted.Without limit() the correctedAcceleration is sending data, but floods the phone. I see lots of out of buffers logs.