mirror of
https://github.com/google/bumble.git
synced 2026-05-09 04:08:02 +00:00
Add characteristics initial values
Sets default values for characteristics if not specified explicitly
This commit is contained in:
@@ -78,10 +78,10 @@ class GamingAudioService(TemplateService):
|
|||||||
UUID = GATT_GAMING_AUDIO_SERVICE
|
UUID = GATT_GAMING_AUDIO_SERVICE
|
||||||
|
|
||||||
gmap_role: Characteristic
|
gmap_role: Characteristic
|
||||||
ugg_features: Optional[Characteristic]
|
ugg_features: Optional[Characteristic] = None
|
||||||
ugt_features: Optional[Characteristic]
|
ugt_features: Optional[Characteristic] = None
|
||||||
bgs_features: Optional[Characteristic]
|
bgs_features: Optional[Characteristic] = None
|
||||||
bgr_features: Optional[Characteristic]
|
bgr_features: Optional[Characteristic] = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -93,6 +93,11 @@ class GamingAudioService(TemplateService):
|
|||||||
) -> None:
|
) -> None:
|
||||||
characteristics = []
|
characteristics = []
|
||||||
|
|
||||||
|
ugg_features = UggFeatures(0) if ugg_features is None else ugg_features
|
||||||
|
ugt_features = UgtFeatures(0) if ugt_features is None else ugt_features
|
||||||
|
bgs_features = BgsFeatures(0) if bgs_features is None else bgs_features
|
||||||
|
bgr_features = BgrFeatures(0) if bgr_features is None else bgr_features
|
||||||
|
|
||||||
self.gmap_role = Characteristic(
|
self.gmap_role = Characteristic(
|
||||||
uuid=GATT_GMAP_ROLE_CHARACTERISTIC,
|
uuid=GATT_GMAP_ROLE_CHARACTERISTIC,
|
||||||
properties=Characteristic.Properties.READ,
|
properties=Characteristic.Properties.READ,
|
||||||
|
|||||||
Reference in New Issue
Block a user