-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi Folks,
Thanks for such a great BlueTooth SDK, I appreciated for your hard work.
I am stuck at the point where I don't get BlueSTSDKFeatureMemsSensorFusion feature values in did update function.
I am subscribing for two service one is for battery status BlueSTSDKFeatureBattery and another one for BlueSTSDKFeatureMemsSensorFusion
This is how i am subscribing:
if let feature = self.blueSTSDKFeatureMemsSensorFusion {
node.enableNotification(feature)
feature.add(self)
}
self.blueSTSDKFeatureBattery = node.getFeatureOfType(BlueSTSDKFeatureBattery.self) as? BlueSTSDKFeatureBattery
if let service = self.blueSTSDKFeatureBattery {
node.enableNotification(service)
service.add(self)
service.readCapacity()
}```
in my did update function I get the first 2-3 value for `BlueSTSDKFeatureMemsSensorFusion` feature and after that I am just receiving all the values for `BlueSTSDKFeatureBattery`. i tried to move the device but it's just keep posting me the value for the battery
func didUpdate(_ feature: BlueSTSDKFeature, sample: BlueSTSDKFeatureSample) {
if feature == blueSTSDKFeatureBattery {
print("battery value")
}
if feature == blueSTSDKFeatureMemsSensorFusion {
print("read sensor value")
}
}
i am not sure why it's happening, is there anything we have to tell the node to enable multiple subscription etc? i am stuck for past 2 days please help me her.
Metadata
Metadata
Assignees
Labels
No labels