mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
api/builtins/Motor: separate methods for stop
stop(Stop.COAST) stop(Stop.BRAKE) stop(Stop.HOLD) becomes stop() brake() hold() This is easier to type and remember.
This commit is contained in:
@@ -18,10 +18,16 @@ Motor
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.reset_angle
|
||||
|
||||
.. rubric:: Action
|
||||
.. rubric:: Stopping
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.stop
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.brake
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.hold
|
||||
|
||||
.. rubric:: Action
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_time
|
||||
|
||||
+10
-1
@@ -17,6 +17,9 @@ Motors without Rotation Sensors
|
||||
.. automethod:: pybricks.builtins.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.builtins.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
Motors with Rotation Sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -32,10 +35,16 @@ Motors with Rotation Sensors
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.reset_angle
|
||||
|
||||
.. rubric:: Action
|
||||
.. rubric:: Stopping
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.stop
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.brake
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.hold
|
||||
|
||||
.. rubric:: Action
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run_time
|
||||
|
||||
Reference in New Issue
Block a user