-
Couldn't load subscription status.
- Fork 1.4k
Closed
Labels
help wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitieshelpers ✋improvements ✨
Description
I'm submitting a...
Current behavior
The ObservableGattCharacteristics does not respect the properties when calling methods.
Expected behavior
Respect the bluetooth specs.
Potential fix
These fixes might contain pseudo code:
ReadValueAsync
if (!Enum<GattCharacteristicProperties>.Flags.IsFlagSet(_characteristic.CharacteristicProperties, GattCharacteristicProperties.Read))
{
Log.Debug($"[{this}] Reading is not supported");
return null;
}
SetIndicateAsync
if (!Enum<GattCharacteristicProperties>.Flags.IsFlagSet(_characteristic.CharacteristicProperties, GattCharacteristicProperties.Indicate))
{
Log.Debug($"[{this}] Indicate is not supported");
return false;
}
SetNotifyAsync
if (!Enum<GattCharacteristicProperties>.Flags.IsFlagSet(_characteristic.CharacteristicProperties, GattCharacteristicProperties.Notify))
{
Log.Debug($"[{this}] Notify is not supported");
return false;
}
Metadata
Metadata
Assignees
Labels
help wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitieshelpers ✋improvements ✨