Updating configuration to connected device (Meta Wear C)
I am trying to update the MBLAccelerometerBMI160.lowOrHighGEvent.highGThreshold without disconnecting the device. I have an iOS app where the user can change the GThreshold on a User Interface View. Tweaking/customizing the GThreshold is important for my app and it would be nice to update the MBLAccelerometerBMI160.lowOrHighGEvent.highGThreshold without disconnecting and reconnecting the device, which seems to me, currently, like the only way to use MBLMetaWear setConfiguration, which seems strange because the device is connected when I call MBLMetaWear setConfiguration yet I can clearly see that a device that has been connected for even 30 seconds, I cannot call MBLMetaWear setConfiguration again.
Currently, every time I update the settings I disconnect from the device and reconnect like so:
device.disconnectWithHandler({ (error: NSError?) -> Void in
self.device.connectWithTimeout(15, handler: { (error: NSError?) -> Void in
Device.sharedManager().setAndConfigureDevice(self.device, gForceThreshold: Settings.sharedSettings.onsetThreshold)
NSLog("We are connected")
})
})
This discussion has been closed.