mirror of
https://github.com/google/bumble.git
synced 2026-05-08 03:58:01 +00:00
Fix show attributes
`show attributes` wasn't being populated since `show_attributes()` was never called. Also updated `show attributes` to match the color and indentation of `show services`
This commit is contained in:
@@ -46,7 +46,6 @@ from bumble.hci import (
|
||||
HCI_LE_Connection_Complete_Event,
|
||||
HCI_LE_Read_Remote_Features_Complete_Event,
|
||||
HCI_Number_Of_Completed_Packets_Event,
|
||||
HCI_Object,
|
||||
HCI_Packet,
|
||||
)
|
||||
|
||||
@@ -1029,7 +1028,7 @@ class Controller:
|
||||
}
|
||||
return bytes([HCI_SUCCESS])
|
||||
|
||||
def on_hci_le_read_transmit_power_command(self, command):
|
||||
def on_hci_le_read_transmit_power_command(self, _command):
|
||||
'''
|
||||
See Bluetooth spec Vol 2, Part E - 7.8.74 LE Read Transmit Power Command
|
||||
'''
|
||||
|
||||
@@ -204,7 +204,7 @@ async def open_pyusb_transport(spec):
|
||||
await self.sink.stop()
|
||||
usb.util.release_interface(self.device, 0)
|
||||
|
||||
usb_find = usb.core.find
|
||||
usb_find = usb.core.find
|
||||
try:
|
||||
import libusb_package
|
||||
except ImportError:
|
||||
@@ -215,9 +215,7 @@ async def open_pyusb_transport(spec):
|
||||
# Find the device according to the spec moniker
|
||||
if ':' in spec:
|
||||
vendor_id, product_id = spec.split(':')
|
||||
device = usb_find(
|
||||
idVendor=int(vendor_id, 16), idProduct=int(product_id, 16)
|
||||
)
|
||||
device = usb_find(idVendor=int(vendor_id, 16), idProduct=int(product_id, 16))
|
||||
else:
|
||||
device_index = int(spec)
|
||||
devices = list(
|
||||
|
||||
@@ -51,8 +51,12 @@ def load_libusb():
|
||||
else:
|
||||
if libusb_path := libusb_package.get_library_path():
|
||||
logger.debug(f'loading libusb library at {libusb_path}')
|
||||
dll_loader = ctypes.WinDLL if platform.system() == 'Windows' else ctypes.CDLL
|
||||
libusb_dll = dll_loader(str(libusb_path), use_errno=True, use_last_error=True)
|
||||
dll_loader = (
|
||||
ctypes.WinDLL if platform.system() == 'Windows' else ctypes.CDLL
|
||||
)
|
||||
libusb_dll = dll_loader(
|
||||
str(libusb_path), use_errno=True, use_last_error=True
|
||||
)
|
||||
usb1.loadLibrary(libusb_dll)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user