pybricks.common.Control: Fix scale doc.

Document it as an attribute instead of in the main docstring. This way we can choose where it shows up in the docs.
This commit is contained in:
Laurens Valk
2021-07-23 14:51:21 +02:00
parent a11af0845b
commit 0edddbb0c2
2 changed files with 9 additions and 6 deletions
+3
View File
@@ -25,6 +25,9 @@ the settings.
.. autoclass:: pybricks._common.Control
:no-members:
.. autoattribute:: pybricks._common.Control.scale
:annotation:
.. rubric:: Status
.. automethod:: pybricks._common.Control.done
+6 -6
View File
@@ -90,13 +90,13 @@ class DCMotor:
class Control:
"""Class to interact with PID controller and settings.
"""Class to interact with PID controller and settings."""
.. data:: scale
Scaling factor between the controlled integer variable
and the physical output. For example, for a single
motor this is the number of encoder pulses per degree of rotation.
scale = 1.0
"""
Scaling factor between the controlled integer variable
and the physical output. For example, for a single
motor this is the number of encoder pulses per degree of rotation.
"""
def limits(self, speed, acceleration, duty, torque):