Not getting flat events from sensor.

I have the following code to try to process flat events from the sensor but the event handler callback is never called:

 MBLAccelerometerBMI160* accelerometerBMI160 = (MBLAccelerometerBMI160*) device.accelerometer;

                        

[accelerometerBMI160.flatEvent startNotificationsWithHandlerAsync:^(MBLNumericData *obj, NSError *error) {

                            

    if (obj != nil) {

      NSLog(@Flat change: %u, obj.value.boolValue);

    }

}];


I am also asking for notifications on orientation events, but those get called correctly.

Comments

  • What firmware version and iOS api version are you using?
  • FW 1.3.3   Metawear iOS API 2.8.3
  • I was able to stream both flat events and orientation events without error.  Can you try deleting your app off your phone to fully clear the cache and try again?  You may also want to connect to the device with the MetaWear Sample App and press the "Reset To Factory Defaults" button.

    Thanks,
    -Stephen
This discussion has been closed.