Skip to content

Commit

Permalink
Merge pull request #423 from zxzxwu/vcp
Browse files Browse the repository at this point in the history
Fix Lint error in VCP example
  • Loading branch information
zxzxwu committed Feb 5, 2024
2 parents 1a3272d + 567146b commit 6d91e7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 5 additions & 6 deletions examples/run_vcp_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
import json

from bumble.core import AdvertisingData
from bumble.device import Device
from bumble.device import Device, AdvertisingParameters, AdvertisingEventProperties
from bumble.hci import (
CodecID,
CodingFormat,
OwnAddressType,
HCI_LE_Set_Extended_Advertising_Parameters_Command,
)
from bumble.profiles.bap import (
CodecSpecificCapabilities,
Expand Down Expand Up @@ -154,11 +153,11 @@ def on_volume_state(volume_setting: int, muted: int, change_counter: int):
+ csis.get_advertising_data()
)

await device.start_extended_advertising(
advertising_properties=(
HCI_LE_Set_Extended_Advertising_Parameters_Command.AdvertisingProperties.CONNECTABLE_ADVERTISING
await device.create_advertising_set(
advertising_parameters=AdvertisingParameters(
advertising_event_properties=AdvertisingEventProperties(),
own_address_type=OwnAddressType.PUBLIC,
),
own_address_type=OwnAddressType.PUBLIC,
advertising_data=advertising_data,
)

Expand Down
6 changes: 2 additions & 4 deletions tests/vcp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import asyncio
import os
import pytest
import pytest_asyncio
import logging

from bumble import device
from bumble import gatt
from bumble.profiles import vcp
from .test_utils import TwoDevices

Expand All @@ -32,7 +30,7 @@


# -----------------------------------------------------------------------------
@pytest.fixture
@pytest_asyncio.fixture
async def vcp_client():
devices = TwoDevices()
devices[0].add_service(
Expand Down

0 comments on commit 6d91e7e

Please sign in to comment.