mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
api/builtin: add missing DCMotor.stop() method
This was missing. It also has a different default value from the Motor class, so Motor overrides this method.
This commit is contained in:
@@ -74,6 +74,9 @@ This class can be used to control classic LEGO motors using converter cables.
|
||||
.. automethod:: pybricks.builtins.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.builtins.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
Ev3dev sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ Motors without Rotation Sensors
|
||||
.. automethod:: pybricks.builtins.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.builtins.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
Motors with Rotation Sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -30,6 +30,15 @@ class DCMotor:
|
||||
"""
|
||||
pass
|
||||
|
||||
def stop(self, stop_type=Stop.COAST):
|
||||
"""Stop the motor.
|
||||
|
||||
Arguments:
|
||||
stop_type (Stop): Whether to coast, brake, or hold (*Default*:
|
||||
:class:`Stop.COAST <.parameters.Stop>`).
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class Control:
|
||||
"""Class to interact with PID controller and settings.
|
||||
|
||||
Reference in New Issue
Block a user