mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
pybricks: remove non-EV3 APIs
This is the v2 branch which only supports EV3. Removing the extra APIs will prevent them from showing up when this library is used for code completion.
This commit is contained in:
@@ -16,25 +16,3 @@ Select your programmable hub using the buttons below.
|
||||
:height: 15 em
|
||||
|
||||
.. include:: hubs_ev3brick.inc
|
||||
|
||||
.. tab-container:: movehub
|
||||
:title: Move Hub
|
||||
|
||||
.. figure:: ../api/images/movehub_label.png
|
||||
:height: 15 em
|
||||
|
||||
.. include:: hubs_movehub.inc
|
||||
|
||||
.. tab-container:: cityhub
|
||||
:title: City Hub
|
||||
|
||||
.. figure:: ../api/images/cityhub.png
|
||||
:height: 15 em
|
||||
|
||||
.. include:: hubs_cityhub.inc
|
||||
|
||||
.. tab-container:: cplushub
|
||||
:title: Control+ Hub
|
||||
|
||||
.. figure:: ../api/images/cplushub.png
|
||||
:height: 15 em
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
.. autoclass:: pybricks.hubs.CityHub
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Using the hub status light
|
||||
|
||||
.. automethod:: pybricks.hubs::CityHub.light.on
|
||||
|
||||
.. automethod:: pybricks.hubs::CityHub.light.off
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
.. automethod:: pybricks.hubs::CityHub.battery.voltage
|
||||
|
||||
.. automethod:: pybricks.hubs::CityHub.battery.current
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
.. autoclass:: pybricks.hubs.MoveHub
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Using the hub status light
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.light.on
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.light.off
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.battery.voltage
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.battery.current
|
||||
+1
-24
@@ -7,28 +7,7 @@ run your first scripts.
|
||||
|
||||
**Step 1: Install Pybricks**
|
||||
|
||||
To get started, go to the :doc:`EV3 Quick Start <start_ev3>`
|
||||
or the :doc:`Powered Up Quick Start <start_ev3>` or pick your hub
|
||||
below.
|
||||
|
||||
.. list-table::
|
||||
|
||||
* - **EV3 Brick**
|
||||
- **Move Hub**
|
||||
- **City Hub**
|
||||
- **Control+ Hub**
|
||||
|
||||
* - .. image:: images/ev3brick.png
|
||||
:target: start_ev3.html
|
||||
|
||||
- .. figure:: images/movehub.png
|
||||
:target: start_pup.html
|
||||
|
||||
- .. figure:: images/cityhub.png
|
||||
:target: start_pup.html
|
||||
|
||||
- .. figure:: images/cplushub.png
|
||||
:target: start_pup.html
|
||||
To get started, go to the :doc:`EV3 Quick Start <start_ev3>`.
|
||||
|
||||
|
||||
**Step 2: Start coding!**
|
||||
@@ -68,7 +47,6 @@ findings on our `support page`_ so we can make Pybricks even better.
|
||||
:hidden:
|
||||
|
||||
start_ev3
|
||||
start_pup
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
@@ -76,7 +54,6 @@ findings on our `support page`_ so we can make Pybricks even better.
|
||||
:hidden:
|
||||
|
||||
hubs
|
||||
pupdevices
|
||||
ev3devices
|
||||
nxtdevices
|
||||
iodevices
|
||||
|
||||
+10
-41
@@ -7,42 +7,19 @@
|
||||
.. autoclass:: pybricks.parameters.Port
|
||||
:no-members:
|
||||
|
||||
.. content-tabs::
|
||||
Motor ports:
|
||||
|
||||
.. tab-container:: ev3brick
|
||||
:title: EV3 Brick
|
||||
.. data:: A
|
||||
.. data:: B
|
||||
.. data:: C
|
||||
.. data:: D
|
||||
|
||||
Motor ports:
|
||||
Sensor ports:
|
||||
|
||||
.. data:: A
|
||||
.. data:: B
|
||||
.. data:: C
|
||||
.. data:: D
|
||||
|
||||
Sensor ports:
|
||||
|
||||
.. data:: S1
|
||||
.. data:: S2
|
||||
.. data:: S3
|
||||
.. data:: S4
|
||||
|
||||
.. tab-container:: movehub
|
||||
:title: Move Hub
|
||||
|
||||
Input/Output ports:
|
||||
|
||||
.. data:: A
|
||||
.. data:: B
|
||||
.. data:: C
|
||||
.. data:: D
|
||||
|
||||
.. tab-container:: cityhub
|
||||
:title: City Hub
|
||||
|
||||
Input/Output ports:
|
||||
|
||||
.. data:: A
|
||||
.. data:: B
|
||||
.. data:: S1
|
||||
.. data:: S2
|
||||
.. data:: S3
|
||||
.. data:: S4
|
||||
|
||||
.. autoclass:: pybricks.parameters.Direction
|
||||
:no-members:
|
||||
@@ -53,8 +30,6 @@
|
||||
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:
|
||||
@@ -89,9 +64,3 @@
|
||||
|
||||
.. autoclass:: pybricks.parameters.Button
|
||||
:no-members:
|
||||
|
||||
.. .. autoclass:: pybricks.parameters.Axis
|
||||
.. :no-members:
|
||||
|
||||
.. .. autoclass:: pybricks.parameters.Side
|
||||
.. :no-members:
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
:mod:`pupdevices <pybricks.pupdevices>` -- Powered Up Devices
|
||||
=============================================================
|
||||
|
||||
.. automodule:: pybricks.pupdevices
|
||||
:no-members:
|
||||
|
||||
Motors without Rotation Sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _fig_pupdcmotors:
|
||||
|
||||
.. figure:: ../api/images/pupdcmotors_label.png
|
||||
:width: 70 %
|
||||
:alt: pupmotors
|
||||
:align: center
|
||||
|
||||
Powered Up motors without rotation sensors. The arrows indicate the default
|
||||
positive direction.
|
||||
|
||||
.. autoclass:: pybricks._common.DCMotor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks._common.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks._common.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks._common.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
Motors with Rotation Sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _fig_pupmotors:
|
||||
|
||||
.. figure:: ../api/images/pupmotors_label.png
|
||||
:width: 100 %
|
||||
:alt: pupmotors
|
||||
:align: left
|
||||
|
||||
Powered Up motors with rotation sensors. The arrows indicate the default
|
||||
positive direction. See the :mod:`hubs <pybricks.hubs>` module for default
|
||||
directions of built-in motors.
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.Motor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Measuring
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.speed
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.angle
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.reset_angle
|
||||
|
||||
.. rubric:: Stopping
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.stop
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.brake
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.hold
|
||||
|
||||
.. rubric:: Action
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run_time
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run_angle
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run_target
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.run_until_stalled
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.dc
|
||||
|
||||
.. rubric:: Advanced motion control
|
||||
|
||||
.. automethod:: pybricks.pupdevices.Motor.track_target
|
||||
|
||||
.. autoattribute:: pybricks.pupdevices.Motor.control
|
||||
:annotation:
|
||||
|
||||
|
||||
Color and Distance Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../api/images/sensor_colordistance.png
|
||||
:width: 35 %
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.ColorDistanceSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.color
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.ambient
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.reflection
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.distance
|
||||
|
||||
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.remote
|
||||
|
||||
.. rubric:: Built-in light
|
||||
|
||||
This sensor has a built-in light. You can make it red, green, blue, or turn
|
||||
it off. If you use the sensor to measure something afterwards, the light
|
||||
automatically turns back on at the default color for that sensing method.
|
||||
|
||||
.. automethod:: pybricks.pupdevices::ColorDistanceSensor.light.on
|
||||
|
||||
.. automethod:: pybricks.pupdevices::ColorDistanceSensor.light.off
|
||||
|
||||
|
||||
.. Tilt Sensor
|
||||
.. ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. .. autoclass:: pybricks.pupdevices.TiltSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: neutral
|
||||
|
||||
.. automethod:: acceleration
|
||||
|
||||
.. automethod:: tilt
|
||||
|
||||
.. automethod:: up
|
||||
|
||||
|
||||
.. Remote Control
|
||||
.. ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. .. autoclass:: pybricks.pupdevices.RemoteControl
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.pupdevices::RemoteControl.light.on
|
||||
|
||||
.. automethod:: pybricks.pupdevices::RemoteControl.light.off
|
||||
|
||||
.. automethod:: pybricks.pupdevices::RemoteControl.buttons.pressed
|
||||
@@ -1,4 +0,0 @@
|
||||
Powered Up Quick Start
|
||||
########################
|
||||
|
||||
Coming soon!
|
||||
Reference in New Issue
Block a user