Commit Graph
255 Commits
Author SHA1 Message Date
Laurens Valk e0f48b178b pybricks.messaging: Document AppData. 2026-05-29 11:41:45 +02:00
Laurens Valk 8ed5a489b9 pybricks.messaging.BLERadio: Include raised errors. 2026-05-29 11:24:41 +02:00
Laurens Valk a2ba8e4dcd pybricks.hubs: Move .ble to BLERadio.
Follows upstream firmware change.

Update tests and examples too.
2026-05-29 11:12:50 +02:00
Frederik LeonhardtandLaurens Valk 7014f46441 pybricks.common.BLE: Improve typing for broadcast() and observe()
- Add overloads for broadcast(). It accepts either a single value, or a tuple,
  or a list.

- Adjust return type of observe(). It either returns a single value, or a tuple.
2026-05-28 11:12:17 +02:00
Frederik LeonhardtandLaurens Valk 7411a246c9 pybricks.common.BLE: Improve typing for hub constructor.
Update type hint for broadcast_channel to Optional, as None is allowed.
2026-05-28 11:12:17 +02:00
Lasse Deleuran 3bc2f35e3e pybricks.iodevices: Added missing functions and parameters.
* Added missing functions and parameters to documentation.

- AnalogSensor: Missing parameter "custom".
- I2CDevice: Missing parameters "port", "address", "custom", "powered", and "nxt_quirk" with attempted explanation of parameters.
- UARTDevice: Missing default parameter value.
- LWP3Device: Missing "connect" parameter.
- Added missing connect and disconnnect methods.
- XboxController: Missing documentation in constructor and missing methods.

* Minor changes to the documentation

Made it more clear and less verbose when to skip connect to bluetooth devices.
2026-05-28 10:47:04 +02:00
kai-morichandGitHub 61578b5547 pybricks.parameters: Add/fix operators for Color type.
* Implement `Color.__eq__`, fix `Color.__mul__`. This allows testing of color block sorting algorithms with CPython.
* implement `Color.__lshift__` and immutability for completeness.
2026-04-25 11:01:54 -05:00
JoBeandGitHub c615ccf986 pybricks._common: Fix parameter name in LightMatrix.orientation().
The parameter `up` was named `top` here, which does not reflect the state of the current code.

See https://github.com/pybricks/pybricks-micropython/blob/master/pybricks/common/pb_type_lightmatrix.c#L59C25 for usage in the code itself.
2026-03-29 17:41:34 -05:00
Gabriel CouchenourandGitHub 32f974e7e5 Robotics.py: Fix issue with the type stub for DriveBase.angle() (#165)
The type was changed from `int` to `float` in https://github.com/pybricks/pybricks-micropython/commit/4d457a17fc13d42d9b311df99e05dafaeed67862.

Technically, it is still `int` on BOOST Move hub (any system without floating point support). But most platforms use `float` so makes sense to have that in the type hints.
2025-09-19 21:53:37 -05:00
Laurens Valk 0efcfd4a36 pybricks.iodevices.LWP3Device: Document new parameters. 2025-06-16 11:05:13 +02:00
Laurens Valk 116368e4c7 pybricks.hubs: List missing system.info method. 2025-05-01 11:25:56 +02:00
Laurens Valk ed3059b47b pybricks.common.IMU: Clarify notes on calibrated values. 2025-03-11 13:01:10 +01:00
Laurens Valk c5cfcd0ac8 tests: Update for IMU changes. 2025-02-25 11:16:27 +01:00
Laurens Valk 827eda031b pybricks.common.System: Document new system info. 2025-02-25 11:16:27 +01:00
Laurens Valk c77b440270 pybricks.parameters: Allow iterating colors.
https://github.com/pybricks/support/issues/1661
2025-02-25 11:16:27 +01:00
Laurens Valk 789e70a42b pybricks.common.BLE: Broadcast fixes.
Fix missing awaitable. Fix default broadcast channel following firmware update.
2025-02-25 11:16:27 +01:00
Laurens Valk 53d6d14de6 pybricks.common.IMU: Document calibration kwarg option. 2025-02-25 11:16:27 +01:00
Laurens Valk ce9d7420fb pybricks.common.IMU: Document new settings.
Also dcument hub.system.reset_storage.
2025-02-25 11:16:27 +01:00
Laurens Valk 044903b193 pybricks.common.Motor: Clarify drive base reset side effect.
Fixes https://github.com/pybricks/support/issues/1449
2025-02-25 11:16:27 +01:00
Laurens Valk 25bfd0e80e pybricks.robotics.DriveBase: Document curve and reset updates. 2025-02-25 11:16:27 +01:00
Laurens Valk 52b3b4c007 pybricks.tools.read_input_byte: Add last and chr options. 2024-04-04 21:45:26 +02:00
Laurens Valk d228b7de99 pybricks.pupdevices.Remote: Add disconnect. 2024-04-04 20:42:17 +02:00
Laurens Valk 2d0cf6c28c pybricks.iodevices.XboxController: Add rumble. 2024-03-21 17:06:41 +01:00
Laurens Valk d4e7657d31 pybricks.hubs: Add shutdown and stop button blocks. 2024-03-21 17:06:04 +01:00
JandLaurens Valk 65748ca56c pybricks.common.Motor: Specify geartrain order. 2024-03-11 09:45:33 +01:00
Laurens Valk 7acdfc035e pybricks.tools: Document run loop active check. 2024-03-05 15:00:03 +01:00
Laurens Valk 2e538b66c3 pybricks.hubs: Change button to buttons.
Fixes https://github.com/pybricks/support/issues/1254
2024-03-05 14:52:54 +01:00
Laurens Valk b2b183ef8f pybricks.common.BLE: Document multitasked broadcast. 2024-03-05 14:42:35 +01:00
Laurens Valk 72f25cb88e pybricks.robotics: Car class updates.
Match minor firmware changes.
2024-03-05 14:29:58 +01:00
Laurens Valk 079b108680 pybricks.parameters: Add Xbox buttons. 2024-03-05 14:10:29 +01:00
Laurens Valk 194949c668 pybricks.iodevices.XboxController: Document pairing. 2024-02-14 19:34:12 +01:00
Laurens Valk d3ca8ee719 pybricks.iodevices: Add XboxController. 2024-02-11 14:26:03 +01:00
Laurens Valk b4adb50adf pybricks.robotics: Add Car class. 2024-01-25 20:38:02 +01:00
Laurens Valk 43f0e72a09 blocks: Initial round of images. 2023-11-28 15:06:45 +01:00
Laurens Valk f509178dab pybricks.pupdevices.Motor: Document close. 2023-11-20 14:03:12 +01:00
Laurens Valk fd61866f2b pybricks.iodevices: Make LWP3 write awaitable. 2023-11-16 12:01:28 +01:00
Laurens Valk 91bc9a5d60 pybricks.hubs.MoveHub: Enable imu orientation. 2023-11-13 11:06:57 +01:00
Laurens Valk f470f1c510 pupdevices: Fix remote light being external.
So it is awaitable.
2023-11-13 08:49:19 +01:00
Laurens Valk d7f9723f6f pybricks.common.Accelerometer: Move tilt to simple.
The Move Hub has it too now.
2023-11-13 08:49:15 +01:00
Laurens Valk e7377dff31 pybricks.pupdevices.Motor: Clarify profile setting. 2023-10-26 14:31:16 +02:00
Laurens Valk d935841399 pybricks.robotics.DriveBase: Add brake. 2023-10-26 14:18:56 +02:00
David LechnerandLaurens Valk 3335042218 ubuiltins: add set class
Add type stubs and docs for builtin `set` type.

Issue: https://github.com/pybricks/support/issues/402
2023-10-26 09:21:41 +02:00
Laurens Valk 209fba5c7e pybricks.tools: Document multitasking. 2023-10-24 17:05:10 +02:00
Laurens Valk faf11581c0 pybricks.tools: Document hub_menu.
Fixes https://github.com/pybricks/pybricks-api/issues/144
2023-10-24 16:23:59 +02:00
Laurens Valk 8819446513 pybricks.common.BLE: Update broadcast API.
Match firmware updates.
2023-10-24 10:40:52 +02:00
Laurens Valk 6bbdccb25f pybricks.hubs.ThisHub.storage: Fix duplicate self.
Fixes https://github.com/pybricks/pybricks-api/issues/146
2023-10-23 16:36:13 +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
David Lechner 41b9ce71dd pybricks.tools: add read_input_byte()
This adds stubs and docs for the new `pybricks.tools.read_input_byte()`
function.
2023-06-12 11:06:20 -05:00
David Lechner 4dc289ad61 pybricks.common.BLE.broadcast: fix missing `
This caused bad formatting.
2023-05-16 16:02:13 -05:00