Skip to content

Commit 32ba126

Browse files
committed
Add the RawTextPacket class to the documentation, and mention its use in Packet.from_stream()
1 parent 92a6ea7 commit 32ba126

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

adafruit_bluefruit_connect/packet.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def from_stream(cls, stream):
8181
set on stream, using its own preset timeout.
8282
Return None if there was no input, otherwise return an instance
8383
of one of the packet classes registered with ``Packet``.
84-
Raise an Error if the packet was not recognized or was malformed
84+
Raise an Error if the packet was not recognized or was malformed.
85+
86+
If a packet of type "RT" (like ``RawTextPacket``) is registered, it will be
87+
used to return the raw data line when no packet type was recognized.
8588
8689
:param stream stream: an input stream that provides standard stream read operations,
8790
such as ``ble.UARTServer`` or ``busio.UART``.

docs/api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030

3131
.. automodule:: adafruit_bluefruit_connect.quaternion_packet
3232
:members:
33+
34+
.. automodule:: adafruit_bluefruit_connect.raw_text_packet
35+
:members:

0 commit comments

Comments
 (0)