Laurens Valk
e4ddd1ffce
pybricks.geometry.Axis: Drop ANY.
...
This was previously dropped in a2583944d9
but it was added in again in c666009511 .
Since this module was never included in a release (it was hidden),
it is OK to do this.
2022-04-01 14:28:38 +02:00
Laurens Valk
0a31bc711f
pybricks.common.Control: Add deceleration setter.
...
Fixes https://github.com/pybricks/pybricks-api/issues/97
2022-03-21 11:17:34 +01:00
Pavel Lobodinský
d8bd890101
pybricks.common: Charger, IMU and System auto-completion
2022-03-02 10:31:53 -06:00
David Lechner
2ba7edab0c
pybricks.ev3/pupdevices: fix Motor code completion
...
The Microsoft Python extension for VS code doesn't include imports in
type hints, so the Motor type wasn't working properly. We can fix this
by wrapping the import type in a new, empty class definition.
The DCMotor class was also missing from ev3devices and the typing for
the overloaded reset_angle method in pupdevices was missing. These are
fixed as well.
2022-02-21 10:59:00 -06:00
Pavel Lobodinský
616051149b
pybricks.common.Speaker: Add volume setter.
2022-01-20 08:56:29 +01:00
Laurens Valk
0ceabe8497
pybricks.common.Charger: Document it.
2022-01-14 15:14:28 +01:00
Pavel Lobodinský
97002948d1
pybricks.common: Refactored Speaker API to be hub specific.
...
The Prime/Inventor Hub Speaker allows only a subset of EV3 Speaker API. Hence, splitting the API up.
2022-01-05 12:10:11 -06:00
Pavel Lobodinský
70aa5ee0e2
pybricks._common: Renamed incorrect argument name, fixed tuple type.
2022-01-03 11:01:33 +01:00
Pavel Lobodinský
efc1650e7f
pybricks.parameters: Added Icon class, added missing methods and attributes.
...
Added missing Icon class present in the firmware
2022-01-03 11:01:33 +01:00
Pavel Lobodinský
fe60636072
pybricks.geometry: Fixed Matrix incorrect rows type, added missing methods.
2022-01-03 11:01:33 +01:00
Pavel Lobodinský
a1342f77c9
pybricks.hubs: Default values for the PrimeHub.
2022-01-03 11:01:33 +01:00
Laurens Valk
d806fe9fbe
pybricks.common.Control: Fix docstring and type hints for limits().
...
Fixes https://github.com/pybricks/support/issues/565
2021-12-30 09:12:27 +01:00
David Lechner
c666009511
pybricks.geometry: add Axis.ANY
...
This exists in the firmware but was missing here.
2021-12-16 15:08:50 -06:00
David Lechner
7f4234fc1e
pybricks._common: remove type hint for integral_range()
...
This was removed in e061617 .
Also fix import of Axis while we are touching this file.
2021-12-16 15:07:33 -06:00
David Lechner
482289c384
pybricks.robotics: add type hint for curve()
...
This method was added in 30803fc .
2021-12-16 15:06:00 -06:00
Laurens Valk
30803fc017
pybricks.robotics.DriveBase: Add curve method.
...
This generalizes motion to curves (arcs), which is in
between straight lines and in-place turns.
2021-12-01 15:38:27 +01:00
Laurens Valk
749eceefc4
pybricks.robotics.DriveBase: Document then and wait arguments.
2021-12-01 15:35:37 +01:00
Laurens Valk
57f6f0fbef
pybricks.pupdevices.DCMotor: Document settings method.
...
Also update changelog for recent changes.
2021-12-01 14:55:34 +01:00
Laurens Valk
e061617c34
pybricks.common.Control: Drop integral_range.
...
This setting is no longer used. We leave a placeholder setting so we don't break existing programs.
See https://github.com/pybricks/pybricks-micropython/commit/e82dd6a2be4e378ab0b1ee7e3b2643fe654de4a9#diff-e529f43c94cf766ade4b68930f9713a45b62618f4305e4c0c88ba872e9f9cd0e
2021-12-01 14:54:21 +01:00
Laurens Valk
eb09ecd7c7
pybricks.common.Control: Drop duty limit.
...
This is now a per-motor voltage limit.
See https://github.com/pybricks/support/issues/536
2021-12-01 14:41:09 +01:00
Laurens Valk
06a1542613
pybricks.pupdevices.DCMotor: Document settings method.
...
See https://github.com/pybricks/support/issues/536
2021-12-01 14:40:06 +01:00
David Lechner
b6d1eef2a1
pybricks.iodevices.LWP3Device: add api and docs
...
This adds docs and API stubs for pybricks.iodevices.LWP3Device.
Fixes: https://github.com/pybricks/support/issues/534
2021-11-19 19:31:53 -06:00
David Lechner
2f574e8c03
pybricks.pupdevices.ColorLightMatrix: add api and docs
...
This adds the SPIKE 3x3 Color Light Matrix to the API and docs.
2021-11-19 19:30:57 -06:00
Laurens Valk
a0f4818e26
ubuiltins.int: Document it.
2021-08-06 14:59:45 +02:00
Laurens Valk
af23c10566
ubuiltins.float: Document it.
...
Override typed docstrings in order to hide types like SupportsFloat.
2021-08-06 14:58:19 +02:00
Laurens Valk
d7096dad80
ubuiltins.complex: Document it.
...
Override typed docstrings in order to hide types like SupportsFloat and SupportsComplex.
Avoid use of ``real`` and ``imag``, since both ``a`` and ``b`` can be
either.
Also reduce number of overloads by letting ``b`` default to 0, which is true in practice.
See also https://github.com/pybricks/pybricks-api/issues/84
2021-08-06 14:25:00 +02:00
Laurens Valk
d86b5584fb
ubuiltins: Type enumerate as a class.
...
This reverts commit a0ea0d8ca0 because of https://github.com/pybricks/pybricks-api/issues/72
2021-08-06 09:51:52 +02:00
Laurens Valk
1c01e981e0
usys: Clean up.
...
Add requirements, drop autodoc, and add a few cross references.
2021-08-05 16:13:50 +02:00
Laurens Valk
786770cff2
ubuiltins.bool: Use arguments.
...
https://github.com/pybricks/pybricks-api/issues/82
2021-08-05 12:49:44 +02:00
Laurens Valk
572b573d2f
ubuiltins: Fix _type typos.
...
This was accidentally introduced via https://github.com/pybricks/pybricks-api/issues/71 by replacing too many things automatically.
2021-08-05 12:33:00 +02:00
Laurens Valk
15bd870140
ubuiltins: Use argument layout.
...
https://github.com/pybricks/pybricks-api/issues/82
2021-08-05 12:32:56 +02:00
Laurens Valk
b101d1992d
ubuiltins.print: Use English.
2021-08-05 12:32:51 +02:00
Laurens Valk
b013204f88
ubuiltins.input: Say what it does.
...
The docstring said something about an argument, but not what this function is for.
2021-08-05 12:32:47 +02:00
Laurens Valk
0ecf536cda
ubuiltins: Add compatibility everywhere.
...
This lets us sort everything by category or alphabetically without having to make special categories for Move Hub.
2021-08-05 12:32:37 +02:00
Laurens Valk
b02895e5fc
ubuiltins: Use raw strings for inline math.
...
This resolves the following warnings:
./src/ubuiltins/__init__.py:143:31: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:143:38: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:174:31: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:174:38: W605 invalid escape sequence '\l'
2021-08-05 12:32:21 +02:00
Laurens Valk
486ac60ea0
ubuiltins.bool: Clarify docs.
...
Avoid double and triple negatives.
2021-08-05 12:32:17 +02:00
Laurens Valk
a3b6507a15
ubuiltins.bytes: Clarify docs.
2021-08-05 12:32:14 +02:00
Laurens Valk
75bc15f071
ubuiltins: Add bytearray.
2021-08-05 12:32:03 +02:00
Laurens Valk
0b9280a8df
uerrno: Display on separate page.
...
Fixes https://github.com/pybricks/pybricks-api/issues/78
2021-08-02 11:01:20 +02:00
David Lechner
677656f669
pybricks.robotics.DriveBase: Fix arg name in type hints.
...
This fixes the `speed` arg name in the `DriveBase.drive()` method in the type hint file. Fixes #76 .
2021-07-30 15:27:09 -05:00
Laurens Valk
a8ab8b2314
pybricks.pupdevices.Motor: Add reset_angle kwarg.
...
Documents https://github.com/pybricks/support/issues/389
2021-07-28 16:07:53 +02:00
Laurens Valk
8463206f8e
pybricks.pupdevices.Remote: Add name().
...
https://github.com/pybricks/support/issues/404
2021-07-28 13:41:00 +02:00
Laurens Valk
78bd21b197
pybricks.common.Control: Drop feed_forward.
...
The implementation no longer includes this, so it is removed from the docs as well.
Fixes https://github.com/pybricks/pybricks-api/issues/74
2021-07-23 15:35:13 +02:00
Laurens Valk
24bba6d24c
pybricks.pupdevices.Motor: Document control here.
...
Based on user feedback, we learned that the control attribute is used more frequently than anticipated. Therefore it makes sense to document it here, just like we do with instances of pybricks.common classes in hubs.
This makes it a bit easier to find and see how it is used, along with some of the existing examples.
2021-07-23 15:33:18 +02:00
Laurens Valk
0edddbb0c2
pybricks.common.Control: Fix scale doc.
...
Document it as an attribute instead of in the main docstring. This way we can choose where it shows up in the docs.
2021-07-23 14:51:21 +02:00
Laurens Valk
923e8caf84
ubuiltins: Organize exceptions.
2021-07-21 11:12:51 +02:00
Laurens Valk
e8d47ffca1
uerrno: Document alongside OSError.
...
These are meant to be used together, so document them in the same place along with a practical example.
2021-07-19 15:03:10 +02:00
Laurens Valk
2c32d093d0
ubuiltins.bytes: Clarify range up to 255.
...
Be consistent and use <= for both. A bit more intuitive because the number 256 cannot be used in bytes objects.
2021-07-16 16:12:43 +02:00
Laurens Valk
ba6d7ac3f5
ubuiltins: Fix unwanted ubuiltins prefix.
...
Fixes https://github.com/pybricks/pybricks-api/issues/71 .
2021-07-16 16:07:55 +02:00
Laurens Valk
a0ea0d8ca0
ubuiltins: Document enumerate as a function.
...
Though it is technically its own type in MicroPython, this change follows the CPython documentation. Essentially this just drops the class prefix and leaves everything else unchanged.
This makes more sense when organizing this module by classes and functions. It's also a bit more logical since the equivalent example we provoide is a function definition, not a class definition.
2021-07-16 16:07:55 +02:00