Commit Graph
1121 Commits
Author SHA1 Message Date
Laurens Valk c3802d38c2 pybricks.ev3devices: Keep motor class in sync.
Let's make sure we keep EV3 pages building.
2022-12-02 12:43:24 +01:00
Laurens Valk ac23a9bb59 pybricks.common.Motor: Document compatibility.
Control methods are not available on Move Hub.

Fixes: https://github.com/pybricks/pybricks-api/issues/106
2022-12-02 12:15:25 +01:00
Laurens Valk 631cf31a07 pybricks.common.Motor: Document when settings take effect.
This updates how and when settings take effect. In this release, you can
change them even while the motor is moving. Some settings do not
take effect right away, as now indicated in the relevant methods.

See also https://github.com/pybricks/pybricks-api/issues/105
2022-12-02 12:10:31 +01:00
Laurens Valk 115ae0d856 pybricks.common.Motor: Add done, stalled, load.
These used to be implemented as part of the Control object,
but now they are available directly on the motor.

This way they:
- Also give useful values when control is passive, via dc().
- Can be supported on Move Hub
- Give useful values for drive bases (see next commits).

Fixes https://github.com/pybricks/pybricks-api/issues/115
2022-12-02 12:02:22 +01:00
Laurens Valk eec6d2ff85 pybricks.parameters: Delete TODO on hue.
This should be an issue, not a mark in the released docs.
2022-12-01 16:59:54 +01:00
Laurens Valk 4d360d2b01 pybricks.parameters: Reduce floating warning to note.
This is a good case of a box. But nothing blows up if you try it, so a note suffices.
2022-12-01 16:59:08 +01:00
Laurens Valk 52cb0fe81e ubuiltins: Fix missing types on print args. 2022-12-01 16:49:45 +01:00
Laurens Valk 961cebe48b ustruct: Document modules. 2022-12-01 16:48:20 +01:00
Laurens Valk 87c2802b17 jedi/tests: Fix order for Poll/poll.
Poll needs to come first for correct typing of poll.
2022-12-01 15:06:31 +01:00
Laurens Valk 3c0aaea207 usys: Add version info.
Fixes https://github.com/pybricks/pybricks-api/issues/119
2022-12-01 15:02:25 +01:00
Laurens Valk 553490874b usys: Add examples. 2022-12-01 14:21:12 +01:00
Laurens Valk 31d3872405 uselect: Rewrite the docs. 2022-12-01 14:11:41 +01:00
Laurens Valk 6f55e90365 urandom: Update remaining functions.
Also modify the categories given implicitly in the Python
file and make them explicit in the docs.

Most users are going to want to use `randint` or `random`, so
that basic category comes first.
2022-12-01 11:19:42 +01:00
Laurens Valk 76f129f6d1 urandom: Update docstring style.
Also remove the tip boxes. The entire documentation consist of tips of
one form or another.

Boxes should only be used when necessary such as safety reasons (warnings)
or to prevent costly/time consuming mistakes (notes/tips).
2022-12-01 10:48:06 +01:00
Laurens Valk d4d7971a56 pybricks.hubs: Update storage documentation.
This moves the per-hub storage size to the respective page.

This also clarifies that data is cleared when updating Powered Up hubs.

Also flip docstring signatures around to work around https://github.com/pybricks/pybricks-api/issues/117
2022-12-01 10:17:41 +01:00
Laurens Valk 64b0489a73 urandom: Move example to Move Hub.
Move it do a dedicated example instead of hardcoding it in the module docstring.

Also update changelog for missing previous changes while we are at it.
2022-12-01 09:55:40 +01:00
Laurens Valk 87ed7353b4 ujson, urandom, uselect: Document compatibility. 2022-11-29 20:32:53 +01:00
Laurens Valk aca23197a1 micropython: Document compatibility.
Fixes https://github.com/pybricks/pybricks-api/issues/118
2022-11-29 20:32:09 +01:00
Laurens Valk 69a2a2b8a2 uio: Don't use alloc_size.
Follows the upstream MicroPython guidance.
2022-11-29 20:30:08 +01:00
Laurens Valk f5d9a4f1c6 uio: Document getvalue. 2022-11-29 20:28:08 +01:00
Laurens Valk 71ce165a46 uio: Update style.
Also fix compatibility information.
2022-11-29 20:23:23 +01:00
Laurens Valk 56ab509630 ujson: Document module. 2022-11-29 16:00:00 +01:00
Laurens Valk 9608a16d95 micropython: Update style.
This makes it consistent with our other modules.

Follows https://github.com/pybricks/pybricks-api/issues/82
2022-11-29 15:59:32 +01:00
Laurens Valk 9b314777e0 micropython: Document heap_lock, heap_unlock.
Fixes https://github.com/pybricks/pybricks-api/issues/116
2022-11-29 13:51:34 +01:00
Laurens Valk 1ae0a9005f pybricks.parameters.Stop: Document NONE.
Fixes https://github.com/pybricks/pybricks-api/issues/104
2022-11-28 17:10:53 +01:00
Laurens Valk 1d5956a58a pybricks.parameters.Stop: Document COAST_SMART.
See https://github.com/pybricks/pybricks-api/issues/104
2022-11-28 17:01:06 +01:00
Laurens Valk 73c4a449ab ubuiltins: Document super. 2022-11-28 16:17:36 +01:00
Laurens Valk aeeed159d7 ubuiltins: Document isinstance, issubclass. 2022-11-28 16:13:59 +01:00
Laurens Valk 104fd7d70f ubuiltins: Document setattr. 2022-11-28 16:07:10 +01:00
Laurens Valk e9e5f48756 ubuiltins: Document getattr, hasattr. 2022-11-28 16:04:25 +01:00
Laurens Valk 8260d71cd7 ubuiltins: Document dir. 2022-11-28 15:51:44 +01:00
Laurens Valk ac43f8a29f ubuiltins: Document callable. 2022-11-28 15:45:30 +01:00
Laurens Valk f6f87fec95 ubuiltins: Document help. 2022-11-28 15:37:20 +01:00
Laurens Valk d1081229b3 ubuiltins: Document id. 2022-11-28 15:32:54 +01:00
Laurens Valk 8a73e916e7 ubuiltins: Fix id. 2022-11-28 15:31:25 +01:00
Laurens Valk 17c45c3245 ubuiltins: Document hash. 2022-11-28 15:30:55 +01:00
Laurens Valk 0ecf1cabde ubuiltins: Document globals. 2022-11-28 15:27:47 +01:00
Laurens Valk ba8d9806f7 ubuiltins: Document exec. 2022-11-28 15:25:12 +01:00
Laurens Valk 99b289aa58 ubuiltins: Document eval. 2022-11-28 15:19:43 +01:00
Laurens Valk 334b91f128 ubuiltins: Document sum. 2022-11-28 15:07:44 +01:00
Laurens Valk f7380b8bb0 ubuiltins: Remove set. This is not enabled. 2022-11-28 15:03:18 +01:00
Laurens Valk 6ad229c7c0 ubuiltins: Document round. 2022-11-28 15:02:03 +01:00
Laurens Valk 94dfbbf7c1 ubuiltins: Document pow. 2022-11-28 14:54:11 +01:00
Laurens Valk 88b2502eb3 ubuiltins: Fix pow.
MICROPY_PY_BUILTINS_POW3 is not enabled.

And floats are accepted.
2022-11-28 14:50:59 +01:00
Laurens Valk cd2e53f70b ubuiltins: Document max, min. 2022-11-28 14:41:29 +01:00
Laurens Valk e009ff2cbc ubuiltins: Document divmod. 2022-11-28 14:36:02 +01:00
Laurens Valk 4816b58914 ubuiltins: Document zip. 2022-11-28 14:23:55 +01:00
Laurens Valk 875a433182 ubuiltins: Document sorted. 2022-11-28 14:16:51 +01:00
Laurens Valk dc8d029e96 ubuiltins: Document reversed. 2022-11-28 14:05:48 +01:00
Laurens Valk af80c4770e ubuiltins: Document range. 2022-11-28 14:01:40 +01:00