mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
pybricks: Indexing fixes.
The noindex made them not show up. Also fix misc related indexing issues.
This commit is contained in:
@@ -14,14 +14,12 @@ automatically detect the motor and use the correct and safe settings.
|
||||
:width: 40 %
|
||||
|
||||
.. autoclass:: pybricks.iodevices.DCMotor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.settings
|
||||
|
||||
@@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order.
|
||||
.. _OSError:
|
||||
|
||||
.. autoclass:: ubuiltins.OSError
|
||||
:noindex:
|
||||
|
||||
.. autoclass:: ubuiltins.OverflowError
|
||||
:no-members:
|
||||
|
||||
@@ -6,5 +6,14 @@ Axis
|
||||
.. autoclass:: pybricks.parameters.Axis
|
||||
:no-members:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.X
|
||||
:annotation: = vector(1, 0, 0)
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.Y
|
||||
:annotation: = vector(0, 1, 0)
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.Z
|
||||
:annotation: = vector(0, 0, 1)
|
||||
|
||||
On Move Hub, doing math with these vectors is not supported. The axes can still
|
||||
be used to set up the hub orientation.
|
||||
|
||||
@@ -21,20 +21,16 @@ Motors without rotation sensors
|
||||
.. blockimg:: pybricks_blockMotorDuty_DCMotor
|
||||
|
||||
.. automethod:: pybricks.pupdevices.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_DCMotor_coast
|
||||
|
||||
.. automethod:: pybricks.pupdevices.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_DCMotor_brake
|
||||
|
||||
.. automethod:: pybricks.pupdevices.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.pupdevices.DCMotor.settings
|
||||
:noindex:
|
||||
|
||||
Examples
|
||||
-------------------
|
||||
|
||||
@@ -21,23 +21,19 @@ and ambient conditions.
|
||||
.. blockimg:: pybricks_variables_set_pf_motor
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.PFMotor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. blockimg:: pybricks_blockMotorDuty_PFMotor
|
||||
|
||||
.. automethod:: pybricks.pupdevices.PFMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_PFMotor_coast
|
||||
|
||||
.. automethod:: pybricks.pupdevices.PFMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_PFMotor_brake
|
||||
|
||||
.. automethod:: pybricks.pupdevices.PFMotor.brake
|
||||
:noindex:
|
||||
|
||||
Examples
|
||||
-------------------
|
||||
|
||||
@@ -984,12 +984,13 @@ METHOD_PARAMS = [
|
||||
pytest.param(
|
||||
"pybricks.robotics",
|
||||
"DriveBase",
|
||||
"curve",
|
||||
"arc",
|
||||
[
|
||||
(
|
||||
[
|
||||
"radius: Number",
|
||||
"angle: Number",
|
||||
"angle: Number=None",
|
||||
"distance: Number=None",
|
||||
"then: Stop=Stop.HOLD",
|
||||
"wait: bool=True",
|
||||
],
|
||||
|
||||
@@ -58,16 +58,12 @@ class _PybricksEnum(Enum, metaclass=_PybricksEnumMeta):
|
||||
|
||||
|
||||
class Axis:
|
||||
"""Unit axes of a coordinate system.
|
||||
|
||||
.. data:: X = vector(1, 0, 0)
|
||||
.. data:: Y = vector(0, 1, 0)
|
||||
.. data:: Z = vector(0, 0, 1)
|
||||
|
||||
"""
|
||||
"""Unit axes of a coordinate system."""
|
||||
|
||||
X: _Matrix = _vector(1, 0, 0)
|
||||
|
||||
Y: _Matrix = _vector(0, 1, 0)
|
||||
|
||||
Z: _Matrix = _vector(0, 0, 1)
|
||||
|
||||
|
||||
|
||||
@@ -265,21 +265,6 @@ class DriveBase:
|
||||
radius cannot be zero. Use :meth:`.turn` for in-place turns.
|
||||
"""
|
||||
|
||||
def curve(
|
||||
self, radius: Number, angle: Number, then: Stop = Stop.HOLD, wait: bool = True
|
||||
) -> MaybeAwaitable:
|
||||
"""curve(radius, angle, then=Stop.HOLD, wait=True)
|
||||
|
||||
Drives an arc along a circle of a given radius, by a given angle.
|
||||
|
||||
Arguments:
|
||||
radius (Number, mm): Radius of the circle.
|
||||
angle (Number, deg): Angle along the circle.
|
||||
then (Stop): What to do after coming to a standstill.
|
||||
wait (bool): Wait for the maneuver to complete before continuing
|
||||
with the rest of the program.
|
||||
"""
|
||||
|
||||
def done(self) -> bool:
|
||||
"""done() -> bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user