api/pupdevices/PFMotor: DCMotor functionality

This replaces the on-off method in ColorDistanceSensor.remote()
with a PFMotor class that works just like the DCMotor class. This
provides much more functionality without having to invent a new API.
This commit is contained in:
Laurens Valk
2020-08-11 12:05:53 +02:00
committed by Laurens Valk
parent 70ffbfa4f3
commit 4d88fbbbd2
2 changed files with 37 additions and 17 deletions
+14 -2
View File
@@ -266,9 +266,21 @@ Color and Distance Sensor
.. automethod:: pybricks.pupdevices::ColorDistanceSensor.light.off
.. rubric:: Power Functions 1.0 Control
Power Functions
^^^^^^^^^^^^^^^^^^^^^^^^^
.. automethod:: pybricks.pupdevices.ColorDistanceSensor.remote
.. autoclass:: pybricks.pupdevices.PFMotor
:noindex:
:no-members:
.. automethod:: pybricks.pupdevices.PFMotor.dc
:noindex:
.. automethod:: pybricks.pupdevices.PFMotor.stop
:noindex:
.. automethod:: pybricks.pupdevices.PFMotor.brake
:noindex:
Color Sensor