api/pupdevices/Remote: add address

After connecting (automatically), this address can be printed so next time you can connect directly without scanning.

This is useful if you have more than one remote.
This commit is contained in:
Laurens Valk
2020-12-29 20:16:34 +01:00
parent c2d2884794
commit 313a51219a
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -13,6 +13,9 @@ Remote Control
.. autoclass:: pybricks.pupdevices.Remote
:no-members:
.. autoattribute:: pybricks.pupdevices::Remote.address
:annotation:
.. automethod:: pybricks.pupdevices::Remote.light.on
.. automethod:: pybricks.pupdevices::Remote.light.off
+1 -1
View File
@@ -31,7 +31,7 @@ class Remote:
light = _ColorLight()
buttons = _Keypad()
address = None
"""Bluetooth address of the remote."""
"""Bluetooth address of the remote, or ``None`` if it is not connected."""
def __init__(self, address=None, timeout=10000):
"""Connects to the remote.