pybricks.pupdevices.Motor: Document control here.

Based on user feedback, we learned that the control attribute is used more frequently than anticipated. Therefore it makes sense to document it here, just like we do with instances of pybricks.common classes in hubs.

This makes it a bit easier to find and see how it is used, along with some of the existing examples.
This commit is contained in:
Laurens Valk
2021-07-23 15:33:18 +02:00
parent 0edddbb0c2
commit 24bba6d24c
7 changed files with 42 additions and 62 deletions
+2 -4
View File
@@ -190,10 +190,8 @@ class Control:
pass
def load(self):
"""Gets the load acting on the ``Motor`` or ``DriveBase``.
This value is determined from the feedback torque that is
needed to track the speed or position command given by the user.
"""Estimates the load based on the torque required to maintain the
specified speed or angle.
When coasting, braking, or controlling the duty cycle manually, the
load cannot be estimated in this way. Then this method returns zero.