This commit is contained in:
Gilles Boccon-Gibod
2024-05-12 11:54:16 -07:00
parent f910a696ad
commit 999d7b07e1
4 changed files with 98 additions and 30 deletions

View File

@@ -26,8 +26,8 @@ import struct
from typing import Any, Callable, Dict, Iterable, List, Optional, Type, Union, ClassVar
from bumble import crypto
from .colors import color
from .core import (
from bumble.colors import color
from bumble.core import (
BT_BR_EDR_TRANSPORT,
AdvertisingData,
DeviceClass,
@@ -36,6 +36,7 @@ from .core import (
name_or_number,
padded_bytes,
)
from bumble.utils import OpenIntEnum
# -----------------------------------------------------------------------------
@@ -1104,7 +1105,7 @@ HCI_SUPPORTED_COMMANDS_MASKS = {
# LE Supported Features
# See Bluetooth spec @ Vol 6, Part B, 4.6 FEATURE SUPPORT
class LeFeature(enum.IntEnum):
class LeFeature(OpenIntEnum):
LE_ENCRYPTION = 0
CONNECTION_PARAMETERS_REQUEST_PROCEDURE = 1
EXTENDED_REJECT_INDICATION = 2

View File

@@ -734,7 +734,13 @@ class DLC(EventEmitter):
self.emit('close')
def __str__(self) -> str:
return f'DLC(dlci={self.dlci},state={self.state.name})'
return (
f'DLC(dlci={self.dlci}, '
f'state={self.state.name}, '
f'max_frame_size={self.max_frame_size}, '
f'window_size={self.window_size}'
')'
)
# -----------------------------------------------------------------------------