mirror of
https://github.com/google/bumble.git
synced 2026-05-09 04:08:02 +00:00
Support LE Subrating reply to comments
This commit is contained in:
@@ -1789,8 +1789,12 @@ class Connection(utils.CompositeEventEmitter):
|
|||||||
connection_interval: float # Connection interval, in milliseconds. [LE only]
|
connection_interval: float # Connection interval, in milliseconds. [LE only]
|
||||||
peripheral_latency: int # Peripheral latency, in number of intervals. [LE only]
|
peripheral_latency: int # Peripheral latency, in number of intervals. [LE only]
|
||||||
supervision_timeout: float # Supervision timeout, in milliseconds.
|
supervision_timeout: float # Supervision timeout, in milliseconds.
|
||||||
subrate_factor: int = 1
|
subrate_factor: int = (
|
||||||
continuation_number: int = 0
|
1 # See Bluetooth spec Vol 6, Part B - 4.5.1 Connection events
|
||||||
|
)
|
||||||
|
continuation_number: int = (
|
||||||
|
0 # See Bluetooth spec Vol 6, Part B - 4.5.1 Connection events
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -6242,10 +6246,13 @@ class Device(utils.CompositeEventEmitter):
|
|||||||
continuation_number: int,
|
continuation_number: int,
|
||||||
supervision_timeout: int,
|
supervision_timeout: int,
|
||||||
):
|
):
|
||||||
connection.parameters.subrate_factor = subrate_factor
|
connection.parameters = Connection.Parameters(
|
||||||
connection.parameters.peripheral_latency = peripheral_latency
|
connection.parameters.connection_interval,
|
||||||
connection.parameters.continuation_number = continuation_number
|
peripheral_latency,
|
||||||
connection.parameters.supervision_timeout = supervision_timeout * 10
|
supervision_timeout * 10.0,
|
||||||
|
subrate_factor,
|
||||||
|
continuation_number,
|
||||||
|
)
|
||||||
connection.emit(connection.EVENT_LE_SUBRATE_CHANGE)
|
connection.emit(connection.EVENT_LE_SUBRATE_CHANGE)
|
||||||
|
|
||||||
@host_event_handler
|
@host_event_handler
|
||||||
|
|||||||
@@ -6499,7 +6499,7 @@ class HCI_LE_Subrate_Change_Event(HCI_LE_Meta_Event):
|
|||||||
See Bluetooth spec @ 7.7.65.35 LE Subrate Change event
|
See Bluetooth spec @ 7.7.65.35 LE Subrate Change event
|
||||||
'''
|
'''
|
||||||
|
|
||||||
status: int = field(metadata=metadata(1))
|
status: int = field(metadata=metadata(STATUS_SPEC))
|
||||||
connection_handle: int = field(metadata=metadata(2))
|
connection_handle: int = field(metadata=metadata(2))
|
||||||
subrate_factor: int = field(metadata=metadata(2))
|
subrate_factor: int = field(metadata=metadata(2))
|
||||||
peripheral_latency: int = field(metadata=metadata(2))
|
peripheral_latency: int = field(metadata=metadata(2))
|
||||||
|
|||||||
Reference in New Issue
Block a user