mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
doc: remove ascii art for motor directions
We have actual graphics of motors with their default clockwise directions now, so refer to those instead.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
.. module:: pybricks.hubs
|
||||
|
||||
.. _fig_hubs:
|
||||
|
||||
Select your programmable hub using the buttons below.
|
||||
|
||||
.. content-tabs::
|
||||
|
||||
@@ -47,6 +47,15 @@
|
||||
.. autoclass:: pybricks.parameters.Direction
|
||||
:no-members:
|
||||
|
||||
In general, clockwise is defined by **looking at the motor shaft, just
|
||||
like looking at a clock**.
|
||||
|
||||
Some motors have two shafts. If in doubt, refer to the following diagrams:
|
||||
|
||||
- Clockwise direction for :ref:`EV3/NXT motors <fig_ev3motors>`
|
||||
- Clockwise direction for :ref:`Powered Up Motors <fig_pupmotors>`
|
||||
- Clockwise direction for :ref:`Move Hub Motors <fig_hubs>`
|
||||
|
||||
.. autoclass:: pybricks.parameters.Stop
|
||||
:no-members:
|
||||
|
||||
|
||||
+8
-47
@@ -107,8 +107,7 @@ class Stop(_PybricksEnum):
|
||||
|
||||
|
||||
class Direction(_PybricksEnum):
|
||||
"""Rotational direction for positive speed values: clockwise or
|
||||
counterclockwise.
|
||||
"""Rotational direction for positive speed or angle values.
|
||||
|
||||
.. data:: CLOCKWISE
|
||||
|
||||
@@ -118,51 +117,13 @@ class Direction(_PybricksEnum):
|
||||
|
||||
A positive speed value should make the motor move counterclockwise.
|
||||
|
||||
For all motors, this is defined when looking at the shaft, just like
|
||||
looking at a clock.
|
||||
|
||||
For NXT or EV3 motors, make sure to look at the motor with the red/orange
|
||||
shaft to the lower right.
|
||||
|
||||
+----------------------------+-------------------+-----------------+
|
||||
| Parameter | Positive speed | Negative speed |
|
||||
+============================+===================+=================+
|
||||
| Direction.CLOCKWISE | clockwise | counterclockwise|
|
||||
+----------------------------+-------------------+-----------------+
|
||||
| Direction.COUNTERCLOCKWISE | counterclockwise | clockwise |
|
||||
+----------------------------+-------------------+-----------------+
|
||||
|
||||
::
|
||||
|
||||
|
||||
Medium EV3 Motor:
|
||||
|
||||
|
||||
counterclockwise clockwise
|
||||
____ _____
|
||||
/ \\
|
||||
/ _____________ \\
|
||||
/ / \\ \\
|
||||
| | _ | |
|
||||
| | __| |__ | |
|
||||
v | |__ o __| | v
|
||||
| |_| |
|
||||
| |
|
||||
\\______________/
|
||||
|
||||
|
||||
Large EV3 Motor:
|
||||
|
||||
________
|
||||
/ \\ ___ ___
|
||||
_| \\ / \\
|
||||
| ----/------ \\
|
||||
counterclockwise | __\\__ | clockwise
|
||||
\\ __________ v / \\ v
|
||||
-------| + |
|
||||
\\_____/
|
||||
|
||||
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``positive_direction =`` | Positive speed: | Negative speed: |
|
||||
+================================+===================+=================+
|
||||
| ``Direction.CLOCKWISE`` | clockwise | counterclockwise|
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``Direction.COUNTERCLOCKWISE`` | counterclockwise | clockwise |
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
"""
|
||||
|
||||
CLOCKWISE = 0
|
||||
|
||||
Reference in New Issue
Block a user