Changing Accelerometer Range using Swift Language

edited July 2016 in iOS
Please guide me how to change the accelerometer using Swift language.

In "DeviceController.swift", I have written the following code 

var accelerometerBMI160: MBLAccelerometerBMI160 = (self.device.accelerometer as! MBLAccelerometerBMI160)

        accelerometerBMI160.fullScaleRange = MBLAccelerometerBMI160Range16G



        

But I'm getting the following error "Use of unresolved identifier MBLAccelerometerBMI160Range16G"


Please guide.


        

Comments

  • edited July 2016
    Sorry, seems like the docs are out of date.  Use MBLAccelerometerBoschRange16G
  • Thanks Eric.

    MBLAccelerometerBoschRange.Range16G worked for me instead of MBLAccelerometerBoschRange16G

This discussion has been closed.