pybricks.pupdevices.DCMotor: Document settings method.

See https://github.com/pybricks/support/issues/536
This commit is contained in:
Laurens Valk
2021-12-01 14:40:06 +01:00
parent 82a8f2ae89
commit 06a1542613
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -70,6 +70,8 @@ Motors with rotation sensors
example, you can change them at the start of your program. Alternatively,
first call :meth:`stop() <pybricks.pupdevices.Motor.stop>`, and then change the settings.
.. automethod:: pybricks.pupdevices.Motor.settings
.. automethod:: pybricks.pupdevices.Motor.control.limits
.. automethod:: pybricks.pupdevices.Motor.control.pid
+10
View File
@@ -88,6 +88,16 @@ class DCMotor:
is generated while the motor is still moving."""
pass
def settings(self, max_voltage):
"""Configures (electrical) motor settings. If no arguments are given,
this returns the current values.
Arguments:
max_voltage (:ref:`voltage`):
Maximum voltage applied to the motor during all motor commands.
"""
pass
class Control:
"""Class to interact with PID controller and settings."""