Laurens Valk
72f25cb88e
pybricks.robotics: Car class updates.
...
Match minor firmware changes.
2024-03-05 14:29:58 +01:00
Laurens Valk
b4adb50adf
pybricks.robotics: Add Car class.
2024-01-25 20:38:02 +01:00
Laurens Valk
d935841399
pybricks.robotics.DriveBase: Add brake.
2023-10-26 14:18:56 +02:00
Laurens Valk
1a49d396d2
pybricks.robotics: Document use_gyro.
2023-10-23 15:39:52 +02:00
David Lechner
821a3e4455
pybricks.*: add MaybeAwaitable types
...
Many blocking functions now return Awaitable[T] when the async run
loop is running. The static analysis tools don't have a way of
knowing this, so the best we can do is return both types so that
x = method() and x = await method() both work mostly as expected.
2023-06-12 17:04:09 -05:00
Laurens Valk
8bca5eb6e4
pybricks.robotics: Add GyroDriveBase.
2023-04-21 10:42:30 +02:00
Laurens Valk
95a12a7386
pybricks.robotics: Drop note suggesting to flip motors.
...
This will still work, but it is asking for trouble when including the gyro.
So it is probably better not to mention this at all.
2023-04-21 10:42:30 +02:00
Laurens Valk
98f2bb27fe
pybricks.robotics.DriveBase: Drop positive direction.
...
This reverts commit e4650cb1c9 .
This is not needed for gyro support, so it is better to remove it
before it is ever released.
2023-04-21 10:42:30 +02:00
Laurens Valk
ccd2b46819
pybricks.robotics.DriveBase: Revert gyro use via init.
...
This reverts commit dadaab6f61 .
We will introduce a separate class instead.
2023-04-21 10:42:30 +02:00
Laurens Valk
c0cb05dd74
pybricks.robotics.DriveBase: Document use of gyro.
2023-04-21 10:42:30 +02:00
Laurens Valk
e4650cb1c9
pybricks.robotics.DriveBase: Document positive direction.
...
Fixes https://github.com/pybricks/support/issues/992
2023-03-20 14:22:25 +01:00
Laurens Valk
91154a394c
pybricks.robotics.DriveBase: Clarify settings method.
...
Fixes https://github.com/pybricks/support/issues/882
2023-03-20 14:00:42 +01:00
Laurens Valk
4da4ce8f7c
pybricks.robotics.DriveBase: Add clarifying comments.
...
Fixes https://github.com/pybricks/support/issues/698
2022-12-06 16:38:31 +01:00
Laurens Valk
99d5210313
pybricks.robotics.DriveBase: Add stalled, done.
2022-12-02 12:43:24 +01:00
David Lechner
e95386e23e
jedi: improve signature information
...
This fixes numerous issues where jedi provided incomplete or poorly
formatted signatures and docstrings.
Issue: https://github.com/pybricks/pybricks-code/issues/932
2022-06-25 23:54:49 -05:00
David Lechner
a2d9c33eb5
jedi: add new pybricks_jedi package
...
This package will be used in Pybricks Code to provide some intellesense
operations.
2022-06-24 14:52:45 -05:00
Laurens Valk
e456c8ef91
pybricks: Drop underscores on imports.
...
Fixes https://github.com/pybricks/pybricks-api/issues/101
2022-06-10 11:10:20 +02:00
Laurens Valk
6500440031
pybricks: Drop most ellipsis and pass instances.
...
See [1]: "I still prefer ... over pass. This clarifies to the readers that they are reading a stub. But if there's a docstring we need neither."
[1] https://github.com/srittau/type-stub-pep/issues/88#issuecomment-758843441
Fixes https://github.com/pybricks/pybricks-api/issues/101#issuecomment-1148780369
2022-06-10 10:46:44 +02:00
Laurens Valk
877391dea7
pybricks.parameters: Add typing.
2022-06-10 10:05:13 +02:00
Laurens Valk
fb3446ad0d
pybricks.robotics: Add typing.
2022-06-10 10:05:12 +02: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
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
David Lechner and laurensvalk
7126431f9f
pybricks: move into src/ directory
...
Moving the pybricks package into a src/ directory so that we can add
additional packages without polluting the top-level directory.
2021-07-14 09:41:30 +02:00