Skip to content

Commit 2300e8d

Browse files
committed
updated
1 parent 41fb23f commit 2300e8d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

adafruit_ble/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ def __init__(self, adapter=None):
162162
self._current_advertisement = None
163163
self._connection_cache = {}
164164

165-
def start_advertising(self, advertisement, scan_response=None, interval=0.1, timeout=0):
165+
def start_advertising(
166+
self, advertisement, scan_response=None, interval=0.1, timeout=None
167+
):
166168
"""
167169
Starts advertising the given advertisement.
168170
@@ -171,7 +173,7 @@ def start_advertising(self, advertisement, scan_response=None, interval=0.1, tim
171173
`BLERadio.name` and `BLERadio.tx_power`.
172174
:param float interval: advertising interval, in seconds
173175
:param int timeout: advertising timeout in seconds.
174-
If 0, no timeout.
176+
If None, no timeout.
175177
"""
176178
advertisement_bytes = bytes(advertisement)
177179
scan_response_bytes = b""
@@ -181,6 +183,7 @@ def start_advertising(self, advertisement, scan_response=None, interval=0.1, tim
181183
scan_response.tx_power = self.tx_power
182184
if scan_response:
183185
scan_response_bytes = bytes(scan_response)
186+
timeout = 0 if timeout is None else timeout
184187
self._adapter.start_advertising(
185188
advertisement_bytes,
186189
scan_response=scan_response_bytes,
@@ -327,5 +330,5 @@ def address_bytes(self):
327330

328331
@property
329332
def advertising(self):
330-
"""The adverstising state"""
333+
"""The advertising state"""
331334
return self._adapter.advertising

adafruit_ble/services/standard/hid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def __init__(self, service, report_id, usage_page, usage, *, max_length):
243243

244244
@property
245245
def report(self):
246+
"""The HID OUT report"""
246247
return self._characteristic.value
247248

248249

0 commit comments

Comments
 (0)