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

Comments

  • Here's the function from the start

    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();

    ...
  • Are you using a MetaMotion board with firmware v1.3.3?
  • It's running v1.2.5 and for some reason says it's the latest.
  • Are you using a metamotion board?
  • I am using MetaWear CPRO. Is sensor fusion not available for that board?
  • Correct, sensor fusion is not available on CPRO firmware.  You will need to incorporate a third party library to do sensor fusion.
This discussion has been closed.