Laurens Valk
dd39a2e00f
api/robotics: update DriveBase API
...
Make arc a non-blocking function similar to drive. This allows users to drive the robot along an arc until a sensor (e.g. color) is triggered, instead of relying on the rotation sensors only.
This also lets us simplify the language of some other method docstrings.
2020-01-23 17:58:24 +01:00
Laurens Valk
00f5b9e13b
doc/screen: simplify print doc
...
Only say what it does, not what it doesn't do.
Also delete "on the image" because this is also used for the screen.
2020-01-16 13:48:56 +01:00
Laurens Valk
f7ff1e511e
api/builtins/ColorLight: remove brightness
...
Brightness control will not be implemented for the next release, so remove it.
2020-01-16 13:34:18 +01:00
Laurens Valk
90314b3f49
api/ev3.speaker: Fix missing language arg
...
This was added to the docstring but not the method.
2020-01-16 13:31:04 +01:00
Laurens Valk
b6f75eca9c
config: ignore literals by regexp and config files
...
No need to have all of them in the ignore list now.
2020-01-16 13:28:09 +01:00
Laurens Valk
834a2173b4
doc/builtins: fix typos
2020-01-16 11:40:34 +01:00
Laurens Valk
50a9d36314
api/ev3.speaker: separate language and voice settings
2020-01-16 11:25:13 +01:00
Laurens Valk
8904413084
doc/speaker: Put language under show/hide toggle
...
This list is rather long, so hide it by default.
2020-01-16 10:34:56 +01:00
Laurens Valk
7a16c637aa
doc/speaker: fix typo
2020-01-16 10:27:31 +01:00
David Lechner
dc82ccce40
resources renamed to media.ev3dev
2020-01-14 17:32:40 -06:00
Laurens Valk
a6e6de28b5
api/nxtdevices: update sound audible argument
...
rename to audible_only for a more precise description.
2020-01-14 21:27:01 +01:00
Laurens Valk
5a0dc278d0
api/nxtdevices: add Energy Meter
2020-01-14 20:17:43 +01:00
Laurens Valk
b1cb062c7c
api/nxtdevices: add Temperature Sensor
2020-01-14 20:16:40 +01:00
Laurens Valk
aed3823af1
api/nxtdevices: add Sound Sensor
2020-01-14 20:16:10 +01:00
Laurens Valk
7b7b69a141
api/nxtdevices: add Ultrasonic Sensor
2020-01-14 20:15:29 +01:00
Laurens Valk
23b8700773
api/nxtdevices: add Color Sensor
2020-01-14 20:14:56 +01:00
Laurens Valk
7f3ac46558
api/nxtdevices: add Light Sensor
2020-01-14 20:13:23 +01:00
Laurens Valk
19e4d3d36f
api/nxtdevices: add Touch Sensor
2020-01-14 20:12:27 +01:00
Laurens Valk
ad12d13355
api/nxtdevices: add module
2020-01-14 20:10:33 +01:00
Laurens Valk
46de4b73ca
doc/ev3devices: drop millimeters note
...
This is already shown as the return type, so this is a duplicate.
2020-01-14 19:38:59 +01:00
Laurens Valk
fe39782b5a
config: rename _instances
...
Now that the instance hack has been dropped, all that remains is the simplified motor docs, so rename file accordingly.
2020-01-14 17:58:10 +01:00
Laurens Valk
6875e6ff42
config: drop _instances for methods
...
This is no longer needed with the double colon reference to link to class instances.
2020-01-14 17:47:47 +01:00
Laurens Valk
02d64775af
doc/*/button: update to double colon reference
...
This lets us drop the instances hack
2020-01-14 17:37:07 +01:00
Laurens Valk
b578693422
doc/*/light: update to double colon reference
...
This lets us drop the instances hack
2020-01-14 17:34:04 +01:00
Laurens Valk
6371ebb870
doc/battery: update to double colon reference
...
This lets us drop the instances hack
2020-01-14 17:15:41 +01:00
David Lechner
9c024e17c4
pybricks/builtins: update speaker methods
...
Update Speaker class with newly implemented methods
2020-01-13 20:14:49 -06:00
David Lechner
0398d04af9
pybricks/resources/image: add show_image() method
2020-01-13 20:12:50 -06:00
David Lechner
c3e74273d2
pybricks/builtins: update Speaker docs
2020-01-13 12:59:21 -06:00
David Lechner
ee0819adef
pybricks/builtins: remove deprecated Display class
...
The Display class is from Pybricks MicroPython 1.0 and has been
replaced by the Image class.
2020-01-13 12:59:07 -06:00
David Lechner
b4cd9113b5
doc/api/hubs_ev3brick: add Image class as EV3Brick.screen
...
This duplicates the Image class documentation In pybricks.ev3devices
as EV3Bricks.screen.
2020-01-13 12:59:07 -06:00
David Lechner
f694de2277
pbyricks/resources: new Image and Font classes
...
This adds API and documentation for the pybricks.resources module
Image and Font classes.
2020-01-13 12:59:07 -06:00
Laurens Valk
220ad471b8
api/ev3devices: remove duplicate AnalogSensor
...
This has previously been moved to the iodevices class
2020-01-13 13:30:08 +01:00
Laurens Valk
e244f28ddb
api/builtins: drop method string override
...
We had these because enums expanded to numeric values. Because we now have an alternate enum implementation, we don't need these strings anymore.
2020-01-13 12:19:59 +01:00
David Lechner
1b426b90f7
pybricks/parameters: introduce _PybricksEnum class
...
This adds a _PybricksEnum base class for all enums. In Pybricks
MicroPython, we don't have an Enum class, but rather just simple
lookup tables.
The __repr__() method prints the enum values like the Pybricks
MicroPython implementation and also causes sphinx doc to correctly
print the value when used as a default value for aguments.
The __dir__() method is overloaded for both the instance and the class
to match what is seen in Pybricks MicroPython. This should help hide
things from code Python completion that are not present in MicroPython.
2020-01-11 21:08:24 -06:00
David Lechner
31a639f55b
doc/api/conf.py: enable nitpicky
...
This enables the sphinx doc nitpicky option to detect broken references.
Also fix all of the broken references.
2020-01-11 21:08:20 -06:00
Laurens Valk
1bafa67979
api/iodevices: add Ev3devSensor
2020-01-09 22:21:42 +01:00
Laurens Valk
5a2d1f5406
api/iodevices: simplify LUMPDevice API
...
All these device can do is read or write values at a particular mode. There is also no need for separate mode setters.
2020-01-06 17:48:03 +01:00
Laurens Valk
09d453480b
api/robotics: add DriveBase state getters
2020-01-02 16:51:50 +01:00
Laurens Valk
3d9a6f11cc
api/robotics: add DriveBase draft
...
This is a concept for a DriveBase class for common robot tasks.
2020-01-02 16:36:37 +01:00
Laurens Valk
af3954989a
doc/iodevices: add note about EV3 compatibility.
...
Some iodevices are only available on EV3 (for now or forever).
2020-01-02 16:02:10 +01:00
Laurens Valk
f73e7f08bc
api/iodevices: add LUMPDevice
...
This can be used to interface with LPF2 and EV3 sensors that use the LEGO UART Messaging Protocol.
2020-01-02 15:53:44 +01:00
Laurens Valk
21a0b8766e
api: rename customdevices to iodevices
...
These devices are not always custom. Rather, the classes in this module are very generic and apply to a wide range of input/output devices.
2020-01-01 16:41:29 +01:00
Laurens Valk
46dba95342
api/builtins: add DCMotor
...
This is a strict subset of Motor, covering functionality of DC motors only. This is useful for motors without encoders, such as train motors.
It is inherited by Motor, which adds functionality that requires encoders.
2020-01-01 13:18:41 +01:00
Laurens Valk
990527c12a
api/builtins/Motor: update reset_angle text
...
Control+ motors have absolute encoders, but no marker on the shaft. This revises the text accordingly.
2019-12-28 14:07:39 +01:00
Laurens Valk
d78db6aefb
doc/customdevices: use correct default argument
...
Make it match the implementation.
2019-12-10 13:25:06 +01:00
Laurens Valk
893b23ce90
api/builtins/Speaker: add speech
2019-12-09 14:15:43 +01:00
Laurens Valk
be1522ad04
api/builtins: Update speaker API
...
- Volume is a setting.
- Remove beeps method. To do multiple beeps, users can make their own loop.
- Rename file to play.
2019-12-09 13:13:06 +01:00
Laurens Valk
2e78033720
doc/devices: simplify motor docs, reduce detail
...
Previously, we simplified the docs for initializing a motor. This commit also simplifies the docstrings for common motor methods, by leaving out details and optional arguments. Full details are still available on the dedicated motor page.
2019-12-09 11:09:11 +01:00
Laurens Valk
184763e81a
Revert "add option to enable/disable encoders"
...
Encoderless motors are more an exception than the rule, so they will get a separate class.
This reverts commit 6f68c60d3b .
2019-12-06 15:19:18 +01:00
Laurens Valk
1187f059fa
api/customdevices: add UARTDevice
2019-12-06 14:57:43 +01:00