HFP AG implementation

This commit is contained in:
Josh Wu
2024-04-05 23:46:06 +08:00
committed by zxzxwu
parent c65188dcbf
commit deba181857
5 changed files with 1024 additions and 225 deletions

View File

@@ -37,7 +37,7 @@ hf_protocol: Optional[HfProtocol] = None
# -----------------------------------------------------------------------------
def on_dlc(dlc: rfcomm.DLC, configuration: hfp.Configuration):
def on_dlc(dlc: rfcomm.DLC, configuration: hfp.HfConfiguration):
print('*** DLC connected', dlc)
global hf_protocol
hf_protocol = HfProtocol(dlc, configuration)
@@ -96,7 +96,7 @@ async def main():
# Hands-Free profile configuration.
# TODO: load configuration from file.
configuration = hfp.Configuration(
configuration = hfp.HfConfiguration(
supported_hf_features=[
hfp.HfFeature.THREE_WAY_CALLING,
hfp.HfFeature.REMOTE_VOLUME_CONTROL,