mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
doc/pupdevices/Motor: fix reset_angle
The note about absolute angle support had accidentally ended up in the GyroSensor. It applies only to pupdevices.Motor.
This commit is contained in:
@@ -192,7 +192,7 @@ class Motor(DCMotor):
|
||||
pass
|
||||
|
||||
def reset_angle(self, angle):
|
||||
"""Resets the accumulated rotation angle of the motor.
|
||||
"""Sets the accumulated rotation angle of the motor to a desired value.
|
||||
|
||||
Arguments:
|
||||
angle (:ref:`angle`): Value to which the angle should be reset.
|
||||
|
||||
@@ -186,9 +186,6 @@ class GyroSensor:
|
||||
def reset_angle(self, angle):
|
||||
"""Sets the rotation angle of the sensor to a desired value.
|
||||
|
||||
If you don't specify an angle, the absolute value will be used if
|
||||
available.
|
||||
|
||||
Arguments:
|
||||
angle (:ref:`angle`): Value to which the angle should be reset.
|
||||
"""
|
||||
|
||||
+16
-2
@@ -3,8 +3,22 @@
|
||||
|
||||
"""LEGO® Powered Up motor, sensors, and lights."""
|
||||
|
||||
from .builtins import KeyPad, Accelerometer, ColorLight
|
||||
from .builtins import Motor # noqa E402
|
||||
from .builtins import KeyPad, Accelerometer, ColorLight, Motor
|
||||
|
||||
|
||||
class Motor(Motor):
|
||||
"""Generic class to control motors with built-in rotation sensors."""
|
||||
|
||||
def reset_angle(self, angle=None):
|
||||
"""Sets the accumulated rotation angle of the motor to a desired value.
|
||||
|
||||
If you don't specify an angle, the :ref:`absolute angle <absangles>`
|
||||
will be used if your motor supports it.
|
||||
|
||||
Arguments:
|
||||
angle (:ref:`angle`): Value to which the angle should be reset.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class RemoteControl:
|
||||
|
||||
Reference in New Issue
Block a user