SensorFusion hanging on configure?
Hey guys I am attempting to setup Sensor Fusion but it seems the script just hangs on the configuration. Here's my code:
final SensorFusionBosch sensorFusion = board.getModule(SensorFusionBosch.class);
Log.i("asdf","Asdfsafds0");
sensorFusion.configure()
.mode(SensorFusionBosch.Mode.IMU_PLUS)
.accRange(SensorFusionBosch.AccRange.AR_8G)
.gyroRange(SensorFusionBosch.GyroRange.GR_1000DPS)
.commit();
Log.i("asdf","Asdfsafds1");
The app doesn't crash and there is no messages at all.
Iif I attempt to use getModuleOrThrow instead of getModule it will hang on that line.
Any ideas? I have tried different settings with no success
final SensorFusionBosch sensorFusion = board.getModule(SensorFusionBosch.class);
Log.i("asdf","Asdfsafds0");
sensorFusion.configure()
.mode(SensorFusionBosch.Mode.IMU_PLUS)
.accRange(SensorFusionBosch.AccRange.AR_8G)
.gyroRange(SensorFusionBosch.GyroRange.GR_1000DPS)
.commit();
Log.i("asdf","Asdfsafds1");
The app doesn't crash and there is no messages at all.
Iif I attempt to use getModuleOrThrow instead of getModule it will hang on that line.
Any ideas? I have tried different settings with no success
This discussion has been closed.
Comments
Handler handler = new Handler();
handler.postDelayed(new Runnable(){
@Override
public void run(){
board.connectAsync().continueWith(new Continuation() {
@Override
public Void then(Task task) throws Exception {
Log.i("---","-----------------");
if (task.isFaulted()) {
board.tearDown();
} else {
Log.i("asdf","Asdfsafds0a");
final SensorFusionBosch sensorFusion = board.getModule(SensorFusionBosch.class);
Log.i("asdf","Asdfsafds0");
sensorFusion.configure()
.mode(SensorFusionBosch.Mode.IMU_PLUS)
.accRange(SensorFusionBosch.AccRange.AR_8G)
.gyroRange(SensorFusionBosch.GyroRange.GR_1000DPS)
.commit();
...