pybricks.common.Motor: Clarify drive base reset side effect.

Fixes https://github.com/pybricks/support/issues/1449
This commit is contained in:
Laurens Valk
2025-02-25 11:16:27 +01:00
parent 25bfd0e80e
commit 044903b193
2 changed files with 11 additions and 2 deletions
+5
View File
@@ -471,6 +471,11 @@ class Motor(DCMotor):
Sets the accumulated rotation angle of the motor to a desired value.
If this motor is also being used by a drive base, its distance and
angle values will also be affected. You might want to
use its :meth:`reset <pybricks.robotics.DriveBase.reset>`
method instead.
Arguments:
angle (Number, deg): Value to which the angle should be reset.
"""
+6 -2
View File
@@ -86,11 +86,15 @@ class Motor(_common.Motor):
Sets the accumulated rotation angle of the motor to a desired value.
If you don't specify an angle, the absolute angle
will be used if your motor supports it.
If this motor is also being used by a drive base, its distance and
angle values will also be affected. You might want to
use its :meth:`reset <pybricks.robotics.DriveBase.reset>`
method instead.
Arguments:
angle (Number, deg): Value to which the angle should be reset.
Choose ``None`` to reset it to the absolute
value of the motor.
"""