-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pybricks.pupdevices.Remote: Add name().
- Loading branch information
1 parent
1cf6f8d
commit 8463206
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,19 +38,30 @@ class Remote: | |
_Button.LEFT_PLUS, | ||
_Button.RIGHT_PLUS | ||
)) | ||
address = None | ||
"""Bluetooth address of the remote, or ``None`` if it is not connected.""" | ||
|
||
def __init__(self, address=None, timeout=10000): | ||
"""Connects to the remote. | ||
def __init__(self, name=None, timeout=10000): | ||
"""When you instantiate this class, the hub will search for a remote | ||
and connect automatically. | ||
The remote must be on and ready for a connection, as indicated by a | ||
white blinking light. | ||
Arguments: | ||
device (str): Bluetooth address of the remote. If no address is | ||
given, it connects to the first available remote that it finds. | ||
name (str): Bluetooth name of the remote. If no name is given, | ||
the hub connects to the first remote that it finds. | ||
timeout (:ref:`time`): How long to search for the remote. | ||
""" | ||
pass | ||
|
||
def name(self, name=None): | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
"""Gets or sets the Bluetooth name of the remote. | ||
If no name is given, this method returns the current name. | ||
Arguments: | ||
name (str): New Bluetooth name of the remote. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dlech
Member
|
||
""" | ||
|
||
|
||
class TiltSensor: | ||
"""LEGO® Powered Up Tilt Sensor.""" | ||
|
Should this use
@overload
?