mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
pybricks.pupdevices.Motor: Document close.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
## Added
|
||||
- Enabled tilt and orientation config for `MoveHub()`.
|
||||
- Documented `Motor.close()`
|
||||
|
||||
## Fixed
|
||||
- Fixed missing awaitable for `Remote.light` and LWP3 writes.
|
||||
|
||||
@@ -62,6 +62,8 @@ Motors with rotation sensors
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.settings
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.close
|
||||
|
||||
.. rubric:: Control settings
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
@@ -605,6 +605,16 @@ class Motor(DCMotor):
|
||||
rotate to.
|
||||
"""
|
||||
|
||||
def close(self) -> None:
|
||||
"""close()
|
||||
|
||||
Closes the motor object so you can call ``Motor`` again to initialize
|
||||
a new object.
|
||||
|
||||
This allows advanced users to change properties such as gearing in the
|
||||
middle of the program, which can be useful for removeable attachments.
|
||||
"""
|
||||
|
||||
|
||||
class Speaker:
|
||||
"""Plays beeps and sounds using a speaker."""
|
||||
|
||||
Reference in New Issue
Block a user