Skip to content

Commit 1bc0f75

Browse files
authored
Merge pull request #8 from dhalbert/no-auto-adv-fix-doc
do not start advertising automatically; update examples; fix doc issues
2 parents 4e9fd61 + bb2e2ea commit 1bc0f75

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

adafruit_ble/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
3434
**Hardware:**
3535
36-
inline format: "* `Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>`_"
36+
Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>
3737
3838
**Software and Dependencies:**
3939

adafruit_ble/beacon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, company_id, uuid, major, minor, rssi, interval=1.0):
7474
Example::
7575
7676
from adafruit_ble.beacon import LocationBeacon
77-
from adafruit_ble.uuid import UUID
77+
from bleio import UUID
7878
test_uuid = UUID('12345678-1234-1234-1234-123456789abc')
7979
test_company = 0xFFFF
8080
b = LocationBeacon(test_company, test_uuid, 123, 234, -54)

adafruit_ble/uart.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ def __init__(self, timeout=1.0, buffer_size=64):
6969
self._rx_buffer = CharacteristicBuffer(self._nus_rx_char,
7070
timeout=timeout, buffer_size=buffer_size)
7171

72-
self._periph.start_advertising()
73-
7472
def start_advertising(self):
7573
"""Start advertising the service. When a client connects, advertising will stop.
7674
When the client disconnects, restart advertising by calling ``start_advertising()`` again.

docs/api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@
66
77
.. automodule:: adafruit_ble
88
:members:
9+
10+
.. automodule:: adafruit_ble.advertising
11+
:members:
12+
13+
.. automodule:: adafruit_ble.beacon
14+
:members:
15+
16+
.. automodule:: adafruit_ble.uart
17+
:members:

examples/ble_uart_echo_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
while not uart.connected:
88
pass
99

10+
# When the client disconnects, the program will exit.
1011
while uart.connected:
1112
# Returns b'' if nothing was read.
1213
one_byte = uart.read(1)
1314
if one_byte:
14-
uart.write(bytes([one_byte]))
15+
uart.write(one_byte)

0 commit comments

Comments
 (0)