Compare commits

...
Author SHA1 Message Date
BertandDavid Lechner 7e79c20f7d pybricks.messaging: Fix a few minor typos in docstrings.
A few docstrings contained spelling and grammar mistakes. These changes improve readability and do not affect functionality.
2026-06-27 11:17:32 -05:00
Laurens Valk d17b40796c v4.0.0 2026-06-08 15:16:08 +02:00
kai-morichandLaurens Valk 121e19b33d pybricks.parameters: make Colors hashable.
The MicroPython implementation support hashing, we this should too.
2026-06-04 15:00:58 +02:00
Laurens Valk a4e4f9cb52 v4.0.0b12 2026-06-02 12:24:39 +02:00
Laurens Valk a442264953 npm/ide-docs: Export namespace index.
Make the linter happy.
2026-06-02 12:20:54 +02:00
Laurens Valk 1118aa2af8 jedi: Fallback to tomllib backport. 2026-06-02 12:03:41 +02:00
Laurens Valk 32ff42d583 CHANGELOG: Move version notes.
No need to post these in all release notes.
2026-06-02 12:02:21 +02:00
Laurens Valk 7895cac17f index: Simplify landing.
Docs are great if you know what to look for already. Otherwise it is better to start in the welcome guide.
2026-06-02 12:01:00 +02:00
Laurens Valk b891f6c35e blockimg: Update screenshots for BLERadio and hubs.
Matches API update to move to BLERadio.

Also update DriveBase method images matching API update.
2026-06-02 11:48:19 +02:00
Laurens Valk 307abbf085 v4.0.0b11 2026-06-01 16:38:48 +02:00
Laurens Valk 9acbdb8367 conf: Build a json symbol index on build.
Ship it with the docs so we can parse it in Pybricks for namespace based lookup.
2026-06-01 16:38:34 +02:00
Laurens Valk 7409057b9c pybricks: Indexing fixes.
The noindex made them not show up. Also fix misc related indexing issues.
2026-06-01 16:26:24 +02:00
Laurens Valk 89e5bde8e7 pybricks.pupdevices.Motor: Namespace model and control.
Otherwise the duplicate the Motor class in the object index.
2026-06-01 15:32:57 +02:00
Laurens Valk 5ecad4a845 pybricks.parameters. Document with full namespace.
This types them in full for the object index.
2026-06-01 15:18:09 +02:00
Laurens Valk a402ae02e9 poetry: Update locks.
0.0.0 can't be pinned.
2026-05-30 11:47:05 +02:00
Laurens Valk cd58dde773 v4.0.0b10 2026-05-30 11:40:00 +02:00
Laurens Valk 2926b4af71 npm/jedi: Build pybricks-api from source.
Now that we use a single release pipeline, the API itself might not yet be on
PyPI by the time we build jedi, so we build it locally.

We'll still keep the API docs on PyPI so users can have local autocomplete,
but that path is no longer a dependency for building jedi.

Also explain CHANGELOG synchronization with firmware repo.
2026-05-30 11:39:00 +02:00
Laurens Valk 614453aa32 .github/workflows: Fix permissions and npm version tags. 2026-05-30 11:32:04 +02:00
Laurens Valk 0f6b8dee67 npm: Simplify release pipeline.
Releasing API updates is quite a long and error prone process, so the point
that it was limiting our ability to push frequent updates in practice. There
were 5 tag, commit, wait, and proceed steps and you'd have to start over or
force push if a mistake was made.

This keeps all the npm packages as they were, but versions everything from a
single source of truth, which is this project's main version. Everything
builds on a tag on the main repo, much like we did for a regular IDE docs RTD
release.

It also skips the PyPI for jedi as an intermediate step, which isn't really
needed and required us to have this strict order of publication steps.
2026-05-30 11:31:38 +02:00
Laurens Valk a9be86238d pybricks.messaging.BLERadio: Fix example paths. 2026-05-29 20:28:36 +02:00
Laurens Valk 16d5ba64d2 pybricks.ev3devices: Update return types. 2026-05-29 20:09:06 +02:00
Laurens Valk d8802ace7d pybricks.common: Update system info. 2026-05-29 20:08:53 +02:00
Laurens Valk acb5206349 pybricks.robotics: Update DriveBase. 2026-05-29 20:06:56 +02:00
Laurens Valk 6686fce3c3 pybricks.pupdevices: Document MarioHub, TechnicMoveHub and DuploTrain. 2026-05-29 16:59:51 +02:00
Laurens Valk 7d27fbb5d8 pybricks.iodevices: Document DCMotor. 2026-05-29 15:39:24 +02:00
Laurens Valk a0e98ba75f pybricks.iodevices: Document pinout. 2026-05-29 15:34:58 +02:00
Laurens Valk 1b69e42b6b pybricks.iodevices: Update UARTDevice docstrings. 2026-05-29 14:57:53 +02:00
Laurens Valk 47a3d664c2 pybricks.iodevices: Include all classes in index.
Some were omitted once EV3 in Pybricks 2.0 was dropped, but they will be included again to prepare for EV3 in Pybricks 4.0.

Enable for Powered UP where relevant, as with UARTDevice.
2026-05-29 14:22:15 +02:00
Laurens Valk e6cb436c47 pybricks.iodevices: Update I2CDevice docstrings. 2026-05-29 13:41:10 +02:00
Laurens Valk a8d74720b6 pybricks.iodevices: Update AnalogSensor docstrings. 2026-05-29 12:38:49 +02:00
Laurens Valk 54b4e39360 pybricks.iodevices: Update XboxController docstrings. 2026-05-29 12:32:43 +02:00
Laurens Valk 1f8f0f777a pybricks.iodevices: Update PUPDevice and LUMPDevice.
Also remove Ev3devSensor, which is no longer used.
2026-05-29 12:30:58 +02:00
Laurens Valk 45b9b89d11 pybricks.messaging: Add tests. 2026-05-29 11:48:15 +02:00
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 7900f03574 jedi: Add tests for methods on hub.ble. 2026-05-28 11:20:54 +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 356f6ffdba v3.6.1 2025-05-01 11:30:32 +02:00
Laurens Valk 4967b96ddd doc/main: Fix trailing whitespace.
For some reason this was not caught by CI.
2025-05-01 11:27:33 +02:00
Laurens Valk 116368e4c7 pybricks.hubs: List missing system.info method. 2025-05-01 11:25:56 +02:00
Laurens Valk 5b56249d8c doc/common/extensions: Drop unused imports. 2025-05-01 11:19:48 +02:00
Laurens Valk 04fb7e3e19 @pybricks/images/v1.4.0 2025-03-19 10:33:59 +01:00
Laurens Valk 5814a73bb1 v3.6.0 2025-03-11 13:08:17 +01:00
Laurens Valk ed3059b47b pybricks.common.IMU: Clarify notes on calibrated values. 2025-03-11 13:01:10 +01:00
119 changed files with 12288 additions and 1745 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
+1 -16
View File
@@ -7,24 +7,9 @@ jobs:
if: github.ref_type != 'tag'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- run: pipx install poetry
- run: poetry install
working-directory: ./jedi
- run: poetry run pytest -vv
working-directory: ./jedi
publish:
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'pybricks_jedi/')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- run: poetry install
working-directory: ./jedi
- run: poetry build
working-directory: ./jedi
- run: poetry publish
working-directory: ./jedi
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PYBRICKS_JEDI_TOKEN }}
+20 -9
View File
@@ -2,22 +2,33 @@ name: Release @pybricks/ide-docs
on:
push:
tags:
- '@pybricks/ide-docs/**'
tags:
- 'v4.*'
permissions:
id-token: write
contents: read
jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- name: Get version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
- name: Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
@@ -26,13 +37,13 @@ jobs:
poetry run python -m pip install --upgrade pip
poetry run python -m pip install --upgrade setuptools
poetry install --only=doc
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm version --no-git-tag-version "$NPM_VERSION"
working-directory: npm/ide-docs
- run: yarn build
working-directory: npm/ide-docs
- run: yarn publish
- run: npm publish --tag "$NPM_TAG"
working-directory: npm/ide-docs
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
+3 -3
View File
@@ -9,11 +9,11 @@ jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
working-directory: npm/images
+32 -12
View File
@@ -2,22 +2,42 @@ name: Release @pybricks/jedi
on:
push:
tags:
- '@pybricks/jedi/**'
tags:
- 'v4.*'
permissions:
id-token: write
contents: read
jobs:
publish_jedi:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/checkout@v6
- name: Get version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
node-version: '16.x'
python-version: '3.11'
- name: Install poetry
run: pipx install poetry
- name: Set pybricks-jedi version
run: poetry version "$VERSION"
working-directory: jedi
- name: Set pybricks version and update jedi dependency pin
run: |
poetry version "$VERSION"
sed -i "s/^pybricks = \".*\"/pybricks = \"$VERSION\"/" jedi/pyproject.toml
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
working-directory: npm/jedi
- run: yarn publish
working-directory: npm/jedi/build
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: python jedi/build.py "$NPM_VERSION"
- run: npm publish --tag "$NPM_TAG"
working-directory: jedi/npm-build
+3 -3
View File
@@ -1,7 +1,7 @@
on:
push:
tags:
- 'v3.*'
- 'v4.*'
name: Create release on GitHub and PyPI
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
@@ -38,7 +38,7 @@ jobs:
build_and_publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- run: pipx run poetry build
- run: pipx run poetry publish
env:
+1
View File
@@ -25,6 +25,7 @@
build/
build-*/
_build/
npm-build/
# Tests
######################
-1
View File
@@ -24,7 +24,6 @@ EV3
ev3brick
ev3dev
ev3devices
Ev3devSensor
fb
Franca
func
+2 -288
View File
@@ -1,291 +1,5 @@
# Changelog
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
See [pybricks-micropython/CHANGELOG.md][changelog] for the changes in each release.
## Unreleased
## 3.6.b5 - 2025-02-26
### Changed
- Update API for firmware 3.6.0b5. See upstream changelog for details.
## 3.5.0 - 2024-04-11
### Changed
- Bump version to 3.5.0 without additional changes.
## 3.5.0b2 - 2024-04-05
### Added
- Added `pybricks.pupdevices.Remote.disconnect` method.
- Added blocks for `up`, `ready` and `stationary` for IMUs.
- Added `last` and `chr` parameters to `read_input_byte` and add blocks.
- Added block for the `in` operation.
- Add double ternary block.
## 3.5.0b1 - 2024-03-11
### Added
- Added `XboxController.rumble` method.
- Added block icons for `hub.system.set_stop_button` and `hub.system.shutdown`.
- Added program stop block (`raise SystemExit`).
## 3.4.1 - 2024-03-11
### Fixed
- Fixed Read The Docs virtual environment workflow.
## 3.4.0 - 2024-03-11
### Changed
- Update list block screenshots to match implementation.
## 3.4.0b5 - 2024-03-05
### Changed
- Updates for v3.4.0b3 firmware (out of sync with docs).
- Changed `hub.button` to `hub.buttons` on single button hubs. Access via
`hub.button` will keep working in the firmware for backwards compatibility.
## 3.4.0b4 - 2024-02-14
### Added
- Added `pybricks.iodevices.XboxController` class.
### Changed
- Changed `buttons.pressed` return type to set.
## 3.4.0b3 - 2024-01-30
### Added
- Added `pybricks.robotics.Car` class.
### Changed
- Changed `pybricks.robotics.DriveBase` icon to two wheels instead of steering
wheel, which will be used for the new car class.
## 3.4.0b2 - 2023-11-28
### Changed
- Include first batch of block coding images.
## 3.3.0 - 2023-11-24
### Changed
- Bump beta version to release version with no further changes.
## 3.3.0c1 - 2023-11-20
### Added
- Enabled tilt and orientation config for `MoveHub()`.
- Documented `Motor.close()`
## Fixed
- Fixed missing awaitable for `Remote.light` and LWP3 writes.
## 3.3.0b9 - 2023-10-26
### Changed
- Changed the beta feature for using the hub's gyro. Gyro control can now be
toggled using `use_gyro` instead of using a separate `GyroDriveBase` class.
- Documentation updates to match firmware 3.3.0b5--3.3.0b9 updates.
### Added
- Added `set` to `ubuiltins` module.
- Basic multitasking docs.
- Awaitable keyword for awaitable methods and functions.
## 3.3.0b5 - 2023-05-16
### Added
- Documented new `hub.ble` methods.
## 3.3.0b4 - 2023-04-21
### Added
- Documented `integral_deadzone` in `Control.pid()`.
- Documented `Motor.model`. This can be used to view the estimated motor
state and change its settings.
- Added `rotation`, `orientation`, `ready`, `stationary` and `settings` methods
to `IMU` class.
- Added `GyroDriveBase` class to `pybricks.robotics`.
### Changed
- Change implementation status of `IMU.heading` and `IMU.reset_heading`. They
are now implemented, with some limitations as noted in a note box.
- Moved `Matrix` and `vector` from `pybricks.geometry` to `pybricks.tools`.
- Moved `Axis` from `pybricks.geometry` to `pybricks.parameters`.
### Removed
- Removed `pybricks.geometry` module.
## 3.2.0 - 2022-12-20
### Changed
- Changed module TOC headings to make it easier to find things.
## 3.2.0c1 - 2022-12-09
### Changed
- Updated "front" side of the Technic Hub to be consistent with
the Prime Hub.
## 3.2.0b6 - 2022-12-02
### Added
- Documented ``Stop.NONE`` and ``Stop.COAST_SMART``.
- Documented ``ujson`` module.
- Added `done` and `stalled` methods for `DriveBase`.
### Changed
- Changed `PrimeHub.display.image()` to `PrimeHub.display.icon()` and renamed
its kwarg from `image` to `icon`.
- Improved presentation and docstrings of the ``ubuiltins`` and other
MicroPython modules
- Moved the random numbers example for Move Hub to the Move Hub page.
- Moved `done()`, `stalled()`, `load()` from `Control` to `Motor` object.
## 3.2.0b5 - 2022-11-11
### Fixed
- Fixed Jedi code completion for `Color` and `Icon` classes in `pybricks.parameters`.
## 3.2.0b4 - 2022-10-21
### Added
- Code auto-completion for `EssentialHub`.
- Added `System.storage` method.
### Fixed
- Fixed some type hints in `parameters` submodule.
## 3.2.0b1-r3 - 2022-06-26
### Fixed
- Fixed more type hints and improved compatibility with jedi.
## 3.2.0b1-r2 - 2022-06-24
### Changed
- Moved remaining type hints from `.pyi` files to the python stub modules, and
fixed numerous errors in the type hints throughout.
## 3.2.0b1-r1 - 2022-06-09
### Added
- Added `__init__.py` to `pybricks` package.
## 3.2.0b1 - 2022-06-02
### Added
- Code auto-completion for `hub.charger`, `hub.imu` and `hub.system`.
- Moved typing from several `.pyi` files to the actual python modules.
### Fixed
- Fixed code completion for `DCMotor` and `Motor` classes in MS Python VS Code extension.
- Fixed missing `DCMotor` type in `ev3devices`.
- Fixed type hint for `Motor.reset_angle()` in `pupdevices`.
### Changed
- Setter for acceleration can now also be used to set acceleration and
deceleration to different values, using a two-valued tuple.
## 3.1.0 - 2021-12-16
### Added
- Added maximum voltage setter for `DCMotor` and `Motor`.
- Documented `DriveBase.curve()` method.
### Changed
- Removed `duty` setting from `Control.limits` method.
- Removed `integral_range` setting from `Control.pid` method.
### Fixed
- Fixed link to Color Light Matrix page.
- Fixed link to Inventor Hub page.
## 3.1.0rc1 - 2021-11-19
### Added
- Added `ColorLightMatrix` class.
- Added `LWP3Device` class.
**NOTE: version number after this point were from JavaScript package and do
not correspond to Pybricks firmware version numbers.**
## 1.6.0 - 2021-08-30
### Added
- MicroPython module documentation.
- Examples for hub system functions including stop button and shutdown.
### Changed
- Build IDE docs as main docs with minor changes, instead of a completely
separate build.
- Moved motor control documentation to the motor page.
## 1.5.0 - 2021-07-01
### Added
- Documentation for Powered Up Remote Control.
## 1.4.0 - 2021-06-23
### Added
- Enabled beta content that was hidden for the 3.0 release.
- Added notice about using the latest beta version.
## 1.3.3 - 2021-05-21
### Changed
- Match example snippet styling to IDE.
- Add more examples.
## 1.3.2 - 2021-04-26
### Changed
- Theme style fixes.
- Example code fixes
- Match doc version to firmware version.
## 1.3.1 - 2021-04-12
### Changed
- Upgrade sphinx and rtd-theme to fix style issues.
## 1.3.0 - 2021-04-12
### Removed
- Removed features which not be in the official 3.0 release. These features
are still in beta. They'll come back in future releases once tested.
## 1.2.0 - 2021-04-09
### Changed
- Moved installation guide to external site.
## 1.1.1 - 2021-02-14
### Added
- Added installation guide.
- Various documentation fixes.
## 1.1.0 - 2021-01-28
### Added
- Scrollbar styling.
## 1.0.0 - 2021-01-25
### Added
- Sphinx build output.
[changelog]: https://github.com/pybricks/pybricks-micropython/blob/master/CHANGELOG.md
+17
View File
@@ -163,6 +163,23 @@ Linting:
poetry run flake8 # check Python
poetry run doc8 # check Restructured Text
Building all release artifacts (docs, jedi, npm packages):
# Linux/macOS only
./build-all.sh
** version notes **
This repository is frequently updated to stay in sync with the firmware
implementation.
Major and minor versions are synchronized with `pybricks-micropython`, which
leads. Patch versions and prerelease version numbers may differ, as they may
be bumped for every small change or typo in the docs.
The version for this repository is also used for the `@pybricks/jedi` and
`@pybricks/ide-docs` npm packages.
[vscode]: https://code.visualstudio.com/
[git]: https://git-scm.com/
[python]: https://www.python.org/
Executable
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Build all release artifacts locally (equivalent to CI workflows, minus publish).
set -euo pipefail
REPO_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
# Activate the project venv so python/make/etc. all use it without poetry run
source "$REPO_ROOT/.venv/bin/activate"
# Read version from pyproject.toml
VERSION=$(grep '^version = ' "$REPO_ROOT/pyproject.toml" | head -1 | sed 's/version = "\(.*\)"/\1/')
# Convert Python pre-release format (e.g. 4.0.0a1, 4.0.0b1, 4.0.0rc1) to npm semver (e.g. 4.0.0-alpha.1, 4.0.0-beta.1, 4.0.0-rc.1)
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
echo "==> Building version $VERSION (npm: $NPM_VERSION)"
# lint
echo "==> Linting"
cd "$REPO_ROOT"
flake8
doc8
# pybricks-jedi tests
echo "==> Testing pybricks-jedi"
cd "$REPO_ROOT/jedi"
poetry run pytest -vv
# @pybricks/jedi npm package
echo "==> Building @pybricks/jedi"
cd "$REPO_ROOT/jedi"
python3 build.py "$NPM_VERSION"
# @pybricks/ide-docs npm package
echo "==> Building @pybricks/ide-docs"
cd "$REPO_ROOT"
make -C doc clean
cd "$REPO_ROOT/npm/ide-docs"
yarn build
echo ""
echo "Build complete."
echo " jedi npm package : jedi/npm-build/"
echo " ide-docs : npm/ide-docs/html/"
+26 -6
View File
@@ -254,12 +254,6 @@ latex_documents = [
exclude_patterns = [
"ev3devices.rst",
"hubs/ev3brick.rst",
"iodevices/analogsensor.rst",
"iodevices/dcmotor.rst",
"iodevices/ev3devsensor.rst",
"iodevices/i2cdevice.rst",
"iodevices/lumpdevice.rst",
"iodevices/uartdevice.rst",
"media.rst",
"messaging.rst",
"nxtdevices.rst",
@@ -370,9 +364,35 @@ def on_missing_reference(
return nodes.Text(f"{ret_type}: {ret_unit}")
def on_build_finished(app: Sphinx, exception):
if exception or app.builder.name != "html":
return
import json
from sphinx.ext.intersphinx import InventoryFile
inv_path = os.path.join(app.outdir, "objects.inv")
if not os.path.exists(inv_path):
return
with open(inv_path, "rb") as f:
inv = InventoryFile.load(f, "", lambda base, uri: base + uri)
index = {}
for type_key, entries in inv.items():
if not type_key.startswith("py:"):
continue
for name, (project, version, url, display) in entries.items():
index[name] = url
out_path = os.path.join(app.outdir, "namespace_index.json")
with open(out_path, "w") as f:
json.dump(index, f, indent=2, sort_keys=True)
def setup(app: Sphinx):
app.add_directive("availability", AvailabilityDirective)
app.connect("missing-reference", on_missing_reference)
app.connect("build-finished", on_build_finished)
# -- Python domain hacks ---------------------------------------------------
+1 -2
View File
@@ -1,5 +1,4 @@
import xml.etree.ElementTree as ET
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst import Directive
from docutils import nodes
from pathlib import Path
+17 -9
View File
@@ -18,14 +18,23 @@ FEATURES_MEDIUM = FEATURES_SMALL | {
}
# Large feature set.
FEATURES_LARGE = FEATURES_MEDIUM | set()
FEATURES_LARGE = FEATURES_MEDIUM | {
"ble-extra", # Extra features such as pairing or multiple connections.
}
# Features per hub.
HUB_FEATURES = {
"movehub": {"movehub"} | FEATURES_SMALL,
"cityhub": {"cityhub"} | FEATURES_MEDIUM,
"technichub": {"technichub", "gyro", "xbox-controller"} | FEATURES_MEDIUM,
"primehub": {"primehub", "inventorhub", "light-matrix", "gyro", "xbox-controller"}
"movehub": {"movehub", "pup"} | FEATURES_SMALL,
"cityhub": {"cityhub", "pup"} | FEATURES_MEDIUM,
"technichub": {"technichub", "gyro", "xbox-controller", "pup"} | FEATURES_MEDIUM,
"primehub": {
"primehub",
"inventorhub",
"light-matrix",
"gyro",
"xbox-controller",
"pup",
}
| FEATURES_LARGE,
"inventorhub": {
"primehub",
@@ -33,9 +42,10 @@ HUB_FEATURES = {
"light-matrix",
"gyro",
"xbox-controller",
"pup",
}
| FEATURES_LARGE,
"essentialhub": {"essentialhub", "gyro", "xbox-controller"} | FEATURES_LARGE,
"essentialhub": {"essentialhub", "gyro", "xbox-controller", "pup"} | FEATURES_LARGE,
}
@@ -94,9 +104,7 @@ class PybricksRequirementsStaticDirective(Directive):
</tbody>
</table>
</div>
""".format(
compat_row
)
""".format(compat_row)
# Return the node.
node = nodes.raw("", html, format="html")
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1,994 @@
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275.3828125 42" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="275.3828125" height="42" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText {
fill: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;rect:not(.blocklyDropdownRect),
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;rect:not(.blocklyDropdownRect) {
fill: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;g&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;g&gt;text {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText.blocklyBubbleText {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
.blocklyEditableText:not(.editing):hover&gt;rect,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
.blocklyEditableText:not(.editing):hover&gt;.blocklyPath {
stroke: #fff;
stroke-width: 2;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHtmlInput {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-weight: bold;
color: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDropdownText {
fill: #fff !important;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyWidgetDiv .goog-menuitem,
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem-content {
color: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHighlightedConnectionPath {
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
stroke: none;
}
.blocklySvg {
background-color: #fff;
outline: none;
overflow: hidden; /* IE overflows by default. */
position: absolute;
display: block;
}
.blocklyWidgetDiv {
display: none;
position: absolute;
z-index: 99999; /* big value for bootstrap3 compatibility */
}
.injectionDiv {
height: 100%;
position: relative;
overflow: hidden; /* So blocks in drag surface disappear at edges */
touch-action: none;
}
.blocklyNonSelectable {
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
}
.blocklyBlockCanvas.blocklyCanvasTransitioning,
.blocklyBubbleCanvas.blocklyCanvasTransitioning {
transition: transform .5s;
}
.blocklyTooltipDiv {
background-color: #ffffc7;
border: 1px solid #ddc;
box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
color: #000;
display: none;
font: 9pt sans-serif;
opacity: .9;
padding: 2px;
position: absolute;
z-index: 100000; /* big value for bootstrap3 compatibility */
}
.blocklyDropDownDiv {
position: absolute;
left: 0;
top: 0;
z-index: 1000;
display: none;
border: 1px solid;
border-color: #dadce0;
background-color: #fff;
border-radius: 2px;
padding: 4px;
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
}
.blocklyDropDownDiv.blocklyFocused {
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
}
.blocklyDropDownContent {
max-height: 300px; /* @todo: spec for maximum height. */
overflow: auto;
overflow-x: hidden;
position: relative;
}
.blocklyDropDownArrow {
position: absolute;
left: 0;
top: 0;
width: 16px;
height: 16px;
z-index: -1;
background-color: inherit;
border-color: inherit;
}
.blocklyDropDownButton {
display: inline-block;
float: left;
padding: 0;
margin: 4px;
border-radius: 4px;
outline: none;
border: 1px solid;
transition: box-shadow .1s;
cursor: pointer;
}
.blocklyArrowTop {
border-top: 1px solid;
border-left: 1px solid;
border-top-left-radius: 4px;
border-color: inherit;
}
.blocklyArrowBottom {
border-bottom: 1px solid;
border-right: 1px solid;
border-bottom-right-radius: 4px;
border-color: inherit;
}
.blocklyResizeSE {
cursor: se-resize;
fill: #aaa;
}
.blocklyResizeSW {
cursor: sw-resize;
fill: #aaa;
}
.blocklyResizeLine {
stroke: #515A5A;
stroke-width: 1;
}
.blocklyHighlightedConnectionPath {
fill: none;
stroke: #fc3;
stroke-width: 4px;
}
.blocklyPathLight {
fill: none;
stroke-linecap: round;
stroke-width: 1;
}
.blocklySelected&gt;.blocklyPathLight {
display: none;
}
.blocklyDraggable {
cursor: grab;
cursor: -webkit-grab;
}
.blocklyDragging {
cursor: grabbing;
cursor: -webkit-grabbing;
}
/* Changes cursor on mouse down. Not effective in Firefox because of
https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
.blocklyDraggable:active {
cursor: grabbing;
cursor: -webkit-grabbing;
}
.blocklyDragging.blocklyDraggingDelete {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyDragging&gt;.blocklyPath,
.blocklyDragging&gt;.blocklyPathLight {
fill-opacity: .8;
stroke-opacity: .8;
}
.blocklyDragging&gt;.blocklyPathDark {
display: none;
}
.blocklyDisabled&gt;.blocklyPath {
fill-opacity: .5;
stroke-opacity: .5;
}
.blocklyDisabled&gt;.blocklyPathLight,
.blocklyDisabled&gt;.blocklyPathDark {
display: none;
}
.blocklyInsertionMarker&gt;.blocklyPath,
.blocklyInsertionMarker&gt;.blocklyPathLight,
.blocklyInsertionMarker&gt;.blocklyPathDark {
fill-opacity: .2;
stroke: none;
}
.blocklyMultilineText {
font-family: monospace;
}
.blocklyNonEditableText&gt;text {
pointer-events: none;
}
.blocklyFlyout {
position: absolute;
z-index: 20;
}
.blocklyText text {
cursor: default;
}
/*
Don't allow users to select text. It gets annoying when trying to
drag a block and selected text moves instead.
*/
.blocklySvg text {
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
cursor: inherit;
}
.blocklyHidden {
display: none;
}
.blocklyFieldDropdown:not(.blocklyHidden) {
display: block;
}
.blocklyIconGroup {
cursor: default;
}
.blocklyIconGroup:not(:hover),
.blocklyIconGroupReadonly {
opacity: .6;
}
.blocklyIconShape {
fill: #00f;
stroke: #fff;
stroke-width: 1px;
}
.blocklyIconSymbol {
fill: #fff;
}
.blocklyMinimalBody {
margin: 0;
padding: 0;
}
.blocklyHtmlInput {
border: none;
border-radius: 4px;
height: 100%;
margin: 0;
outline: none;
padding: 0;
width: 100%;
text-align: center;
display: block;
box-sizing: border-box;
}
/* Remove the increase and decrease arrows on the field number editor */
input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}
.blocklyMainBackground {
stroke-width: 1;
stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
}
.blocklyMutatorBackground {
fill: #fff;
stroke: #ddd;
stroke-width: 1;
}
.blocklyFlyoutBackground {
fill: #ddd;
fill-opacity: .8;
}
.blocklyMainWorkspaceScrollbar {
z-index: 20;
}
.blocklyFlyoutScrollbar {
z-index: 30;
}
.blocklyScrollbarHorizontal,
.blocklyScrollbarVertical {
position: absolute;
outline: none;
}
.blocklyScrollbarBackground {
opacity: 0;
}
.blocklyScrollbarHandle {
fill: #ccc;
}
.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
.blocklyScrollbarHandle:hover {
fill: #bbb;
}
/* Darken flyout scrollbars due to being on a grey background. */
/* By contrast, workspace scrollbars are on a white background. */
.blocklyFlyout .blocklyScrollbarHandle {
fill: #bbb;
}
.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
.blocklyFlyout .blocklyScrollbarHandle:hover {
fill: #aaa;
}
.blocklyInvalidInput {
background: #faa;
}
.blocklyVerticalMarker {
stroke-width: 3px;
fill: rgba(255,255,255,.5);
pointer-events: none;
}
.blocklyComputeCanvas {
position: absolute;
width: 0;
height: 0;
}
.blocklyNoPointerEvents {
pointer-events: none;
}
.blocklyContextMenu {
border-radius: 4px;
max-height: 100%;
}
.blocklyDropdownMenu {
border-radius: 2px;
padding: 0 !important;
}
.blocklyDropdownMenu .blocklyMenuItem {
/* 28px on the left for icon or checkbox. */
padding-left: 28px;
}
/* BiDi override for the resting state. */
.blocklyDropdownMenu .blocklyMenuItemRtl {
/* Flip left/right padding for BiDi. */
padding-left: 5px;
padding-right: 28px;
}
.blocklyWidgetDiv .blocklyMenu {
background: #fff;
border: 1px solid transparent;
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
font: normal 13px Arial, sans-serif;
margin: 0;
outline: none;
padding: 4px 0;
position: absolute;
overflow-y: auto;
overflow-x: hidden;
max-height: 100%;
z-index: 20000; /* Arbitrary, but some apps depend on it... */
}
.blocklyWidgetDiv .blocklyMenu.blocklyFocused {
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
}
.blocklyDropDownDiv .blocklyMenu {
background: inherit; /* Compatibility with gapi, reset from goog-menu */
border: inherit; /* Compatibility with gapi, reset from goog-menu */
font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
outline: none;
position: relative; /* Compatibility with gapi, reset from goog-menu */
z-index: 20000; /* Arbitrary, but some apps depend on it... */
}
/* State: resting. */
.blocklyMenuItem {
border: none;
color: #000;
cursor: pointer;
list-style: none;
margin: 0;
/* 7em on the right for shortcut. */
min-width: 7em;
padding: 6px 15px;
white-space: nowrap;
}
/* State: disabled. */
.blocklyMenuItemDisabled {
color: #ccc;
cursor: inherit;
}
/* State: hover. */
.blocklyMenuItemHighlight {
background-color: rgba(0,0,0,.1);
}
/* State: selected/checked. */
.blocklyMenuItemCheckbox {
height: 16px;
position: absolute;
width: 16px;
}
.blocklyMenuItemSelected .blocklyMenuItemCheckbox {
background: url(https://blockly-demo.appspot.com/static/media/sprites.png) no-repeat -48px -16px;
float: left;
margin-left: -24px;
position: static; /* Scroll with the menu. */
}
.blocklyMenuItemRtl .blocklyMenuItemCheckbox {
float: right;
margin-right: -24px;
}
.blocklyZoom&gt;image, .blocklyZoom&gt;svg&gt;image {
opacity: .4;
}
.blocklyZoom&gt;image:hover, .blocklyZoom&gt;svg&gt;image:hover {
opacity: .6;
}
.blocklyZoom&gt;image:active, .blocklyZoom&gt;svg&gt;image:active {
opacity: .8;
}
.blocklyCommentForeignObject {
position: relative;
z-index: 0;
}
.blocklyCommentRect {
fill: #E7DE8E;
stroke: #bcA903;
stroke-width: 1px;
}
.blocklyCommentTarget {
fill: transparent;
stroke: #bcA903;
}
.blocklyCommentTargetFocused {
fill: none;
}
.blocklyCommentHandleTarget {
fill: none;
}
.blocklyCommentHandleTargetFocused {
fill: transparent;
}
.blocklyFocused&gt;.blocklyCommentRect {
fill: #B9B272;
stroke: #B9B272;
}
.blocklySelected&gt;.blocklyCommentTarget {
stroke: #fc3;
stroke-width: 3px;
}
.blocklyCommentDeleteIcon {
cursor: pointer;
fill: #000;
display: none;
}
.blocklySelected &gt; .blocklyCommentDeleteIcon {
display: block;
}
.blocklyDeleteIconShape {
fill: #000;
stroke: #000;
stroke-width: 1px;
}
.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {
stroke: #fc3;
}
.blocklyCommentTextarea {
background-color: #fef49c;
border: 0;
display: block;
margin: 0;
outline: 0;
padding: 3px;
resize: none;
text-overflow: hidden;
}
.blocklyAngleCircle {
stroke: #444;
stroke-width: 1;
fill: #ddd;
fill-opacity: 0.8;
}
.blocklyAngleMarks {
stroke: #444;
stroke-width: 1;
}
.blocklyAngleGauge {
fill: #f88;
fill-opacity: 0.8;
pointer-events: none;
}
.blocklyAngleLine {
stroke: #f00;
stroke-width: 2;
stroke-linecap: round;
pointer-events: none;
}
.blocklyColourTable {
border-collapse: collapse;
display: block;
outline: none;
padding: 1px;
}
.blocklyColourTable&gt;tr&gt;td {
border: 0.5px solid #888;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
height: 20px;
padding: 0;
width: 20px;
}
.blocklyColourTable&gt;tr&gt;td.blocklyColourHighlighted {
border-color: #eee;
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
position: relative;
}
.blocklyColourSelected, .blocklyColourSelected:hover {
border-color: #eee !important;
outline: 1px solid #333;
position: relative;
}
.blocklyHtmlTextAreaInput {
font-family: monospace;
resize: none;
overflow: hidden;
height: 100%;
text-align: left;
}
.blocklyHtmlTextAreaInputOverflowedY {
overflow-y: scroll;
}
.blocklyFlyoutButton {
fill: #888;
cursor: default;
}
.blocklyFlyoutButtonShadow {
fill: #666;
}
.blocklyFlyoutButton:hover {
fill: #aaa;
}
.blocklyFlyoutLabel {
cursor: default;
}
.blocklyFlyoutLabelBackground {
opacity: 0;
}
.blocklyTreeRow:not(.blocklyTreeSelected):hover {
background-color: rgba(255, 255, 255, .2);
}
.blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {
margin: 1px 5px 1px 0;
}
.blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {
margin: 1px 0 1px 5px;
}
.blocklyTreeRow {
height: 22px;
line-height: 22px;
margin-bottom: 3px;
padding-right: 8px;
white-space: nowrap;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
margin-left: 8px;
padding-right: 0;
}
.blocklyTreeIcon {
background-image: url(https://blockly-demo.appspot.com/static/media/sprites.png);
height: 16px;
vertical-align: middle;
visibility: hidden;
width: 16px;
}
.blocklyTreeIconClosed {
background-position: -32px -1px;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {
background-position: 0 -1px;
}
.blocklyTreeSelected&gt;.blocklyTreeIconClosed {
background-position: -32px -17px;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected&gt;.blocklyTreeIconClosed {
background-position: 0 -17px;
}
.blocklyTreeIconOpen {
background-position: -16px -1px;
}
.blocklyTreeSelected&gt;.blocklyTreeIconOpen {
background-position: -16px -17px;
}
.blocklyTreeLabel {
cursor: default;
font: 16px sans-serif;
padding: 0 3px;
vertical-align: middle;
}
.blocklyToolboxDelete .blocklyTreeLabel {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyTreeSelected .blocklyTreeLabel {
color: #fff;
}
.blocklyTreeSeparator {
border-bottom: solid #e5e5e5 1px;
height: 0;
margin: 5px 0;
}
.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {
border-right: solid #e5e5e5 1px;
border-bottom: none;
height: auto;
margin: 0 5px 0 5px;
padding: 5px 0;
width: 0;
}
.blocklyToolboxDelete {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyToolboxGrab {
cursor: url("https://blockly-demo.appspot.com/static/media/handclosed.cur"), auto;
cursor: grabbing;
cursor: -webkit-grabbing;
}
/* Category tree in Toolbox. */
.blocklyToolboxDiv {
background-color: #ddd;
overflow-x: visible;
overflow-y: auto;
padding: 4px 0 4px 0;
position: absolute;
z-index: 70; /* so blocks go under toolbox when dragging */
-webkit-tap-highlight-color: transparent; /* issue #1345 */
}
.blocklyToolboxContents {
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.blocklyToolboxContents:focus {
outline: none;
}
.blocklyColourTable {
border-collapse: collapse;
display: block;
outline: none;
padding: 1px;
}
.blocklyColourTable&gt;tr&gt;td {
border: 0.5px solid #888;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
height: 20px;
padding: 0;
width: 20px;
}
.blocklyColourTable&gt;tr&gt;td.blocklyColourHighlighted {
border-color: #eee;
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
position: relative;
}
.blocklyColourSelected, .blocklyColourSelected:hover {
border-color: #eee !important;
outline: 1px solid #333;
position: relative;
}
.fieldColourSliderContainer {
padding: 4px;
}
.fieldColourSliderContainer hr {
border: none;
border-top: 1px solid #bbb;
}
.fieldColourSliderLabel {
display: flex;
justify-content: space-between;
font: 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.fieldColourEyedropper {
appearance: none;
position: relative;
border: none;
border-radius: 4px;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
width: 100%;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
.fieldColourEyedropper:hover {
background: rgba(0,0,0,0.1)
}
.fieldColourEyedropper input {
opacity: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fieldColourEyedropper::before {
content: "Eyedropper";
}
.fieldColourEyedropper::after {
content: "";
margin-left: 8px;
width: 24px;
height: 24px;
background: currentColor;
pointer-events: none;
-webkit-mask-image: var(--customize-dial-symbol);
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-image: var(--customize-dial-symbol);
mask-repeat: no-repeat;
mask-position: center;
--customize-dial-symbol: url('data:image/svg+xml, &lt;svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"&gt; &lt;path stroke="black" strokewidth="1.414" fill="none" d="m 13 8 L 6 15 Q 3 18 2 21 Q 0 23 .5 23.5 Q 1 24 3 22 Q 6 21 9 18 L 16 11"/&gt; &lt;path fill="black" d="m 12 7 Q 11 6 12 5 Q 13 4 14 5 Q 15 6 16 5 Q 20 -1 22.5 1.5 Q 25 4 19 8 Q 18 9 19 10 Q 20 11 19 12 Q 18 13 17 12"/&gt; &lt;/svg&gt;');
}
.fieldColourSlider {
-webkit-appearance: none;
width: 150px;
height: 24px;
margin: 4px 8px 24px 8px;
padding: 0;
}
.fieldColourSlider:last-child {
margin-bottom: 4px;
}
.fieldColourSlider:focus {
outline: none;
}
/* Webkit */
.fieldColourSlider::-webkit-slider-runnable-track {
background: var(--slider-track-background);
border-radius: 8px;
height: 16px;
}
.fieldColourSlider::-webkit-slider-thumb {
-webkit-appearance: none;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
margin-top: -4px;
}
/* Firefox */
.fieldColourSlider::-moz-range-track {
background: var(--slider-track-background);
border-radius: 8px;
height: 16px;
}
.fieldColourSlider::-moz-range-thumb {
background: #fff;
border: none;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
}
.fieldColourSlider::-moz-focus-outer {
/* override the focus border style */
border: 0;
}
/* IE */
.fieldColourSlider::-ms-track {
background: var(--slider-track-background);
border-radius: 12px;
width: 100%;
height: 24px;
/* remove default tick marks */
color: transparent;
}
.fieldColourSlider::-ms-fill-lower {
background: transparent;
}
.fieldColourSlider::-ms-fill-upper {
background: transparent;
}
.fieldColourSlider::-ms-thumb {
background: #fff;
border: none;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
opacity: .2;
}
.blocklyMultiselect&gt;image:hover, .blocklyMultiselect&gt;svg&gt;image:hover {
opacity: .4;
}
.blocklyMultiselect&gt;image:active, .blocklyMultiselect&gt;svg&gt;image:active {
opacity: .6;
}
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 1)"><g data-id="yHRh+a$N=A!M1D(8v*f[" class="blocklyDraggable"><path class="blocklyPath" stroke="#4585a1" fill="#5cb1d6" d=" m 20,0 h 233.3828125 a 20 20 0 0,1 20,20 v 0 a 20 20 0 0,1 -20,20 V 40 h -233.3828125 a 20 20 0 0,1 -20,-20 v 0 a 20 20 0 0,1 20,-20 z&#10;"/><g data-id="q33[pxK@e!ZG[~ugQ_H_" transform="translate(56, 4)" style="display: block;"><path class="blocklyPath" stroke="#4585a1" fill="#4e96b6" d=" m 16,0 h 51.1171875 a 16 16 0 0,1 16,16 v 0 a 16 16 0 0,1 -16,16 V 32 h -51.1171875 a 16 16 0 0,1 -16,-16 v 0 a 16 16 0 0,1 16,-16 z&#10;"/><g class="blocklyEditableText" transform="translate(12,7)" style="cursor: default;"><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="0" y="9">radio</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(47.1171875,3)"/></g></g><g transform="translate(12,7)"><image height="25px" width="25px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMSAxNy43NyAxMC44ODUtMTAuODg1LTUuNTgxOS01LjU4MTl2MjIuMzkzbDUuNjc0NC01LjY3NDQtMTAuODU1LTEwLjg1NSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJtMjAuMjEzIDMuNWExMi43MjggMTIuNzI4IDAgMCAxIDMuNzI3OSA5IDEyLjcyOCAxMi43MjggMCAwIDEtMy43Mjc5IDkiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0ibTE3LjA1OSA3LjQwNzVhNy4yMDE4IDcuMjAxOCAwIDAgMSAyLjEwOTMgNS4wOTI0IDcuMjAxOCA3LjIwMTggMCAwIDEtMi4xMDkzIDUuMDkyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgogIDwvZz4KPC9zdmc+"/></g><g transform="translate(45,4.5)"><image height="30px" width="3px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0yLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(147.1171875,11)"><text class="blocklyText" dominant-baseline="central" x="0" y="9">observe</text></g><g class="blocklyEditableText" transform="translate(216.484375,5.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="44.8984375" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">0</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(24.8984375,8.6)"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,994 @@
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 371.5265625 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="371.5265625" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText {
fill: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;rect:not(.blocklyDropdownRect),
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;rect:not(.blocklyDropdownRect) {
fill: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText&gt;g&gt;text,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText&gt;g&gt;text {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText.blocklyBubbleText {
fill: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
.blocklyEditableText:not(.editing):hover&gt;rect,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
.blocklyEditableText:not(.editing):hover&gt;.blocklyPath {
stroke: #fff;
stroke-width: 2;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHtmlInput {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-weight: bold;
color: #575E75;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDropdownText {
fill: #fff !important;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyWidgetDiv .goog-menuitem,
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem-content {
color: #fff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHighlightedConnectionPath {
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
stroke: none;
}
.blocklySvg {
background-color: #fff;
outline: none;
overflow: hidden; /* IE overflows by default. */
position: absolute;
display: block;
}
.blocklyWidgetDiv {
display: none;
position: absolute;
z-index: 99999; /* big value for bootstrap3 compatibility */
}
.injectionDiv {
height: 100%;
position: relative;
overflow: hidden; /* So blocks in drag surface disappear at edges */
touch-action: none;
}
.blocklyNonSelectable {
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
}
.blocklyBlockCanvas.blocklyCanvasTransitioning,
.blocklyBubbleCanvas.blocklyCanvasTransitioning {
transition: transform .5s;
}
.blocklyTooltipDiv {
background-color: #ffffc7;
border: 1px solid #ddc;
box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
color: #000;
display: none;
font: 9pt sans-serif;
opacity: .9;
padding: 2px;
position: absolute;
z-index: 100000; /* big value for bootstrap3 compatibility */
}
.blocklyDropDownDiv {
position: absolute;
left: 0;
top: 0;
z-index: 1000;
display: none;
border: 1px solid;
border-color: #dadce0;
background-color: #fff;
border-radius: 2px;
padding: 4px;
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
}
.blocklyDropDownDiv.blocklyFocused {
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
}
.blocklyDropDownContent {
max-height: 300px; /* @todo: spec for maximum height. */
overflow: auto;
overflow-x: hidden;
position: relative;
}
.blocklyDropDownArrow {
position: absolute;
left: 0;
top: 0;
width: 16px;
height: 16px;
z-index: -1;
background-color: inherit;
border-color: inherit;
}
.blocklyDropDownButton {
display: inline-block;
float: left;
padding: 0;
margin: 4px;
border-radius: 4px;
outline: none;
border: 1px solid;
transition: box-shadow .1s;
cursor: pointer;
}
.blocklyArrowTop {
border-top: 1px solid;
border-left: 1px solid;
border-top-left-radius: 4px;
border-color: inherit;
}
.blocklyArrowBottom {
border-bottom: 1px solid;
border-right: 1px solid;
border-bottom-right-radius: 4px;
border-color: inherit;
}
.blocklyResizeSE {
cursor: se-resize;
fill: #aaa;
}
.blocklyResizeSW {
cursor: sw-resize;
fill: #aaa;
}
.blocklyResizeLine {
stroke: #515A5A;
stroke-width: 1;
}
.blocklyHighlightedConnectionPath {
fill: none;
stroke: #fc3;
stroke-width: 4px;
}
.blocklyPathLight {
fill: none;
stroke-linecap: round;
stroke-width: 1;
}
.blocklySelected&gt;.blocklyPathLight {
display: none;
}
.blocklyDraggable {
cursor: grab;
cursor: -webkit-grab;
}
.blocklyDragging {
cursor: grabbing;
cursor: -webkit-grabbing;
}
/* Changes cursor on mouse down. Not effective in Firefox because of
https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
.blocklyDraggable:active {
cursor: grabbing;
cursor: -webkit-grabbing;
}
.blocklyDragging.blocklyDraggingDelete {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyDragging&gt;.blocklyPath,
.blocklyDragging&gt;.blocklyPathLight {
fill-opacity: .8;
stroke-opacity: .8;
}
.blocklyDragging&gt;.blocklyPathDark {
display: none;
}
.blocklyDisabled&gt;.blocklyPath {
fill-opacity: .5;
stroke-opacity: .5;
}
.blocklyDisabled&gt;.blocklyPathLight,
.blocklyDisabled&gt;.blocklyPathDark {
display: none;
}
.blocklyInsertionMarker&gt;.blocklyPath,
.blocklyInsertionMarker&gt;.blocklyPathLight,
.blocklyInsertionMarker&gt;.blocklyPathDark {
fill-opacity: .2;
stroke: none;
}
.blocklyMultilineText {
font-family: monospace;
}
.blocklyNonEditableText&gt;text {
pointer-events: none;
}
.blocklyFlyout {
position: absolute;
z-index: 20;
}
.blocklyText text {
cursor: default;
}
/*
Don't allow users to select text. It gets annoying when trying to
drag a block and selected text moves instead.
*/
.blocklySvg text {
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
cursor: inherit;
}
.blocklyHidden {
display: none;
}
.blocklyFieldDropdown:not(.blocklyHidden) {
display: block;
}
.blocklyIconGroup {
cursor: default;
}
.blocklyIconGroup:not(:hover),
.blocklyIconGroupReadonly {
opacity: .6;
}
.blocklyIconShape {
fill: #00f;
stroke: #fff;
stroke-width: 1px;
}
.blocklyIconSymbol {
fill: #fff;
}
.blocklyMinimalBody {
margin: 0;
padding: 0;
}
.blocklyHtmlInput {
border: none;
border-radius: 4px;
height: 100%;
margin: 0;
outline: none;
padding: 0;
width: 100%;
text-align: center;
display: block;
box-sizing: border-box;
}
/* Remove the increase and decrease arrows on the field number editor */
input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}
.blocklyMainBackground {
stroke-width: 1;
stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
}
.blocklyMutatorBackground {
fill: #fff;
stroke: #ddd;
stroke-width: 1;
}
.blocklyFlyoutBackground {
fill: #ddd;
fill-opacity: .8;
}
.blocklyMainWorkspaceScrollbar {
z-index: 20;
}
.blocklyFlyoutScrollbar {
z-index: 30;
}
.blocklyScrollbarHorizontal,
.blocklyScrollbarVertical {
position: absolute;
outline: none;
}
.blocklyScrollbarBackground {
opacity: 0;
}
.blocklyScrollbarHandle {
fill: #ccc;
}
.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
.blocklyScrollbarHandle:hover {
fill: #bbb;
}
/* Darken flyout scrollbars due to being on a grey background. */
/* By contrast, workspace scrollbars are on a white background. */
.blocklyFlyout .blocklyScrollbarHandle {
fill: #bbb;
}
.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
.blocklyFlyout .blocklyScrollbarHandle:hover {
fill: #aaa;
}
.blocklyInvalidInput {
background: #faa;
}
.blocklyVerticalMarker {
stroke-width: 3px;
fill: rgba(255,255,255,.5);
pointer-events: none;
}
.blocklyComputeCanvas {
position: absolute;
width: 0;
height: 0;
}
.blocklyNoPointerEvents {
pointer-events: none;
}
.blocklyContextMenu {
border-radius: 4px;
max-height: 100%;
}
.blocklyDropdownMenu {
border-radius: 2px;
padding: 0 !important;
}
.blocklyDropdownMenu .blocklyMenuItem {
/* 28px on the left for icon or checkbox. */
padding-left: 28px;
}
/* BiDi override for the resting state. */
.blocklyDropdownMenu .blocklyMenuItemRtl {
/* Flip left/right padding for BiDi. */
padding-left: 5px;
padding-right: 28px;
}
.blocklyWidgetDiv .blocklyMenu {
background: #fff;
border: 1px solid transparent;
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
font: normal 13px Arial, sans-serif;
margin: 0;
outline: none;
padding: 4px 0;
position: absolute;
overflow-y: auto;
overflow-x: hidden;
max-height: 100%;
z-index: 20000; /* Arbitrary, but some apps depend on it... */
}
.blocklyWidgetDiv .blocklyMenu.blocklyFocused {
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
}
.blocklyDropDownDiv .blocklyMenu {
background: inherit; /* Compatibility with gapi, reset from goog-menu */
border: inherit; /* Compatibility with gapi, reset from goog-menu */
font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
outline: none;
position: relative; /* Compatibility with gapi, reset from goog-menu */
z-index: 20000; /* Arbitrary, but some apps depend on it... */
}
/* State: resting. */
.blocklyMenuItem {
border: none;
color: #000;
cursor: pointer;
list-style: none;
margin: 0;
/* 7em on the right for shortcut. */
min-width: 7em;
padding: 6px 15px;
white-space: nowrap;
}
/* State: disabled. */
.blocklyMenuItemDisabled {
color: #ccc;
cursor: inherit;
}
/* State: hover. */
.blocklyMenuItemHighlight {
background-color: rgba(0,0,0,.1);
}
/* State: selected/checked. */
.blocklyMenuItemCheckbox {
height: 16px;
position: absolute;
width: 16px;
}
.blocklyMenuItemSelected .blocklyMenuItemCheckbox {
background: url(https://blockly-demo.appspot.com/static/media/sprites.png) no-repeat -48px -16px;
float: left;
margin-left: -24px;
position: static; /* Scroll with the menu. */
}
.blocklyMenuItemRtl .blocklyMenuItemCheckbox {
float: right;
margin-right: -24px;
}
.blocklyZoom&gt;image, .blocklyZoom&gt;svg&gt;image {
opacity: .4;
}
.blocklyZoom&gt;image:hover, .blocklyZoom&gt;svg&gt;image:hover {
opacity: .6;
}
.blocklyZoom&gt;image:active, .blocklyZoom&gt;svg&gt;image:active {
opacity: .8;
}
.blocklyCommentForeignObject {
position: relative;
z-index: 0;
}
.blocklyCommentRect {
fill: #E7DE8E;
stroke: #bcA903;
stroke-width: 1px;
}
.blocklyCommentTarget {
fill: transparent;
stroke: #bcA903;
}
.blocklyCommentTargetFocused {
fill: none;
}
.blocklyCommentHandleTarget {
fill: none;
}
.blocklyCommentHandleTargetFocused {
fill: transparent;
}
.blocklyFocused&gt;.blocklyCommentRect {
fill: #B9B272;
stroke: #B9B272;
}
.blocklySelected&gt;.blocklyCommentTarget {
stroke: #fc3;
stroke-width: 3px;
}
.blocklyCommentDeleteIcon {
cursor: pointer;
fill: #000;
display: none;
}
.blocklySelected &gt; .blocklyCommentDeleteIcon {
display: block;
}
.blocklyDeleteIconShape {
fill: #000;
stroke: #000;
stroke-width: 1px;
}
.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {
stroke: #fc3;
}
.blocklyCommentTextarea {
background-color: #fef49c;
border: 0;
display: block;
margin: 0;
outline: 0;
padding: 3px;
resize: none;
text-overflow: hidden;
}
.blocklyAngleCircle {
stroke: #444;
stroke-width: 1;
fill: #ddd;
fill-opacity: 0.8;
}
.blocklyAngleMarks {
stroke: #444;
stroke-width: 1;
}
.blocklyAngleGauge {
fill: #f88;
fill-opacity: 0.8;
pointer-events: none;
}
.blocklyAngleLine {
stroke: #f00;
stroke-width: 2;
stroke-linecap: round;
pointer-events: none;
}
.blocklyColourTable {
border-collapse: collapse;
display: block;
outline: none;
padding: 1px;
}
.blocklyColourTable&gt;tr&gt;td {
border: 0.5px solid #888;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
height: 20px;
padding: 0;
width: 20px;
}
.blocklyColourTable&gt;tr&gt;td.blocklyColourHighlighted {
border-color: #eee;
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
position: relative;
}
.blocklyColourSelected, .blocklyColourSelected:hover {
border-color: #eee !important;
outline: 1px solid #333;
position: relative;
}
.blocklyHtmlTextAreaInput {
font-family: monospace;
resize: none;
overflow: hidden;
height: 100%;
text-align: left;
}
.blocklyHtmlTextAreaInputOverflowedY {
overflow-y: scroll;
}
.blocklyFlyoutButton {
fill: #888;
cursor: default;
}
.blocklyFlyoutButtonShadow {
fill: #666;
}
.blocklyFlyoutButton:hover {
fill: #aaa;
}
.blocklyFlyoutLabel {
cursor: default;
}
.blocklyFlyoutLabelBackground {
opacity: 0;
}
.blocklyTreeRow:not(.blocklyTreeSelected):hover {
background-color: rgba(255, 255, 255, .2);
}
.blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {
margin: 1px 5px 1px 0;
}
.blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {
margin: 1px 0 1px 5px;
}
.blocklyTreeRow {
height: 22px;
line-height: 22px;
margin-bottom: 3px;
padding-right: 8px;
white-space: nowrap;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
margin-left: 8px;
padding-right: 0;
}
.blocklyTreeIcon {
background-image: url(https://blockly-demo.appspot.com/static/media/sprites.png);
height: 16px;
vertical-align: middle;
visibility: hidden;
width: 16px;
}
.blocklyTreeIconClosed {
background-position: -32px -1px;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {
background-position: 0 -1px;
}
.blocklyTreeSelected&gt;.blocklyTreeIconClosed {
background-position: -32px -17px;
}
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected&gt;.blocklyTreeIconClosed {
background-position: 0 -17px;
}
.blocklyTreeIconOpen {
background-position: -16px -1px;
}
.blocklyTreeSelected&gt;.blocklyTreeIconOpen {
background-position: -16px -17px;
}
.blocklyTreeLabel {
cursor: default;
font: 16px sans-serif;
padding: 0 3px;
vertical-align: middle;
}
.blocklyToolboxDelete .blocklyTreeLabel {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyTreeSelected .blocklyTreeLabel {
color: #fff;
}
.blocklyTreeSeparator {
border-bottom: solid #e5e5e5 1px;
height: 0;
margin: 5px 0;
}
.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {
border-right: solid #e5e5e5 1px;
border-bottom: none;
height: auto;
margin: 0 5px 0 5px;
padding: 5px 0;
width: 0;
}
.blocklyToolboxDelete {
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
}
.blocklyToolboxGrab {
cursor: url("https://blockly-demo.appspot.com/static/media/handclosed.cur"), auto;
cursor: grabbing;
cursor: -webkit-grabbing;
}
/* Category tree in Toolbox. */
.blocklyToolboxDiv {
background-color: #ddd;
overflow-x: visible;
overflow-y: auto;
padding: 4px 0 4px 0;
position: absolute;
z-index: 70; /* so blocks go under toolbox when dragging */
-webkit-tap-highlight-color: transparent; /* issue #1345 */
}
.blocklyToolboxContents {
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.blocklyToolboxContents:focus {
outline: none;
}
.blocklyColourTable {
border-collapse: collapse;
display: block;
outline: none;
padding: 1px;
}
.blocklyColourTable&gt;tr&gt;td {
border: 0.5px solid #888;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
height: 20px;
padding: 0;
width: 20px;
}
.blocklyColourTable&gt;tr&gt;td.blocklyColourHighlighted {
border-color: #eee;
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
position: relative;
}
.blocklyColourSelected, .blocklyColourSelected:hover {
border-color: #eee !important;
outline: 1px solid #333;
position: relative;
}
.fieldColourSliderContainer {
padding: 4px;
}
.fieldColourSliderContainer hr {
border: none;
border-top: 1px solid #bbb;
}
.fieldColourSliderLabel {
display: flex;
justify-content: space-between;
font: 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
.fieldColourEyedropper {
appearance: none;
position: relative;
border: none;
border-radius: 4px;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
width: 100%;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
.fieldColourEyedropper:hover {
background: rgba(0,0,0,0.1)
}
.fieldColourEyedropper input {
opacity: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fieldColourEyedropper::before {
content: "Eyedropper";
}
.fieldColourEyedropper::after {
content: "";
margin-left: 8px;
width: 24px;
height: 24px;
background: currentColor;
pointer-events: none;
-webkit-mask-image: var(--customize-dial-symbol);
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-image: var(--customize-dial-symbol);
mask-repeat: no-repeat;
mask-position: center;
--customize-dial-symbol: url('data:image/svg+xml, &lt;svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"&gt; &lt;path stroke="black" strokewidth="1.414" fill="none" d="m 13 8 L 6 15 Q 3 18 2 21 Q 0 23 .5 23.5 Q 1 24 3 22 Q 6 21 9 18 L 16 11"/&gt; &lt;path fill="black" d="m 12 7 Q 11 6 12 5 Q 13 4 14 5 Q 15 6 16 5 Q 20 -1 22.5 1.5 Q 25 4 19 8 Q 18 9 19 10 Q 20 11 19 12 Q 18 13 17 12"/&gt; &lt;/svg&gt;');
}
.fieldColourSlider {
-webkit-appearance: none;
width: 150px;
height: 24px;
margin: 4px 8px 24px 8px;
padding: 0;
}
.fieldColourSlider:last-child {
margin-bottom: 4px;
}
.fieldColourSlider:focus {
outline: none;
}
/* Webkit */
.fieldColourSlider::-webkit-slider-runnable-track {
background: var(--slider-track-background);
border-radius: 8px;
height: 16px;
}
.fieldColourSlider::-webkit-slider-thumb {
-webkit-appearance: none;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
margin-top: -4px;
}
/* Firefox */
.fieldColourSlider::-moz-range-track {
background: var(--slider-track-background);
border-radius: 8px;
height: 16px;
}
.fieldColourSlider::-moz-range-thumb {
background: #fff;
border: none;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
}
.fieldColourSlider::-moz-focus-outer {
/* override the focus border style */
border: 0;
}
/* IE */
.fieldColourSlider::-ms-track {
background: var(--slider-track-background);
border-radius: 12px;
width: 100%;
height: 24px;
/* remove default tick marks */
color: transparent;
}
.fieldColourSlider::-ms-fill-lower {
background: transparent;
}
.fieldColourSlider::-ms-fill-upper {
background: transparent;
}
.fieldColourSlider::-ms-thumb {
background: #fff;
border: none;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
cursor: pointer;
width: 24px;
height: 24px;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
opacity: .2;
}
.blocklyMultiselect&gt;image:hover, .blocklyMultiselect&gt;svg&gt;image:hover {
opacity: .4;
}
.blocklyMultiselect&gt;image:active, .blocklyMultiselect&gt;svg&gt;image:active {
opacity: .6;
}
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="v{m!~$1f5l%h:MFI]d8M" class="blocklyDraggable"><path class="blocklyPath" stroke="#4585a1" fill="#5cb1d6" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 326.5265625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -326.5265625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cmVjdCB4PSI0LjUiIHk9IjEuNSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjIyIiByeD0iNC4wODU5IiByeT0iNC4wODU5IiBmaWxsPSJub25lIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxwYXRoIGQ9Im04LjgyNjIgNS43NTg5aDcuMzQ3NiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgo8Y2lyY2xlIGN4PSIxMi41IiBjeT0iMTcuNDY0IiByPSIyIiBmaWxsPSIjZmZmIiBzdG9wLWNvbG9yPSIjMDAwMDAwIi8+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="59.578125" class="blocklyFieldRect" stroke="#4585a1" style="display: block; fill: rgb(78, 150, 182);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">smart</text></g><g class="blocklyEditableText" transform="translate(122.378125,7.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="129.34375" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">line follower</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(109.34375,8.6)"/></g><g class="blocklyEditableText" transform="translate(259.721875,7.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="101.8046875" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">dark line</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(81.8046875,8.6)"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 29 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -1,5 +1,5 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 162.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="162.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="142.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
}
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern9387213926908944)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="AGU@JJxqaZ900CU1q4O~" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 117.13593750000001 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -117.13593750000001 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,6.9)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="30.2" width="77.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="15.1">city hub</text></g><g transform="translate(140.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="x8^AN=nIc/70bNA=C]ql" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 97.13593750000001 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -97.13593750000001 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="77.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">city hub</text></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

@@ -1,4 +1,4 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 203.05 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="203.05" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern8106945446883995)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="{Jrf7Nz~mk-.f{~B||f-" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 158.05 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -158.05 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMS42Mjg2IiB5PSIzLjc0NiIgd2lkdGg9IjIxLjgiIGhlaWdodD0iMTYuNzUyIiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgeD0iMTAuMzI0IiB5PSI5Ljk1ODciIHdpZHRoPSI0LjQwODgiIGhlaWdodD0iNC40MTE1IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIuMTY3Ii8+CjxyZWN0IHg9IjExLjE4MyIgeT0iMTYuMDc4IiB3aWR0aD0iMi42OTA3IiBoZWlnaHQ9IjQuNDExNSIgZmlsbD0iIzgzOWJmZiIvPgo8L2c+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="118.25" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">essential hub</text></g><g transform="translate(181.05,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="%NMD$cHdMIS^c1w|gyTX" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 158.05 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -158.05 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMS42Mjg2IiB5PSIzLjc0NiIgd2lkdGg9IjIxLjgiIGhlaWdodD0iMTYuNzUyIiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgeD0iMTAuMzI0IiB5PSI5Ljk1ODciIHdpZHRoPSI0LjQwODgiIGhlaWdodD0iNC40MTE1IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIuMTY3Ii8+CjxyZWN0IHg9IjExLjE4MyIgeT0iMTYuMDc4IiB3aWR0aD0iMi42OTA3IiBoZWlnaHQ9IjQuNDExNSIgZmlsbD0iIzgzOWJmZiIvPgo8L2c+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="118.25" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">essential hub</text></g><g transform="translate(181.05,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 26 KiB

@@ -1,4 +1,4 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 197.6828125 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="197.6828125" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern8106945446883995)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="Q5w{_w)*b:I1hX^{3=1Q" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 152.6828125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -152.6828125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="112.8828125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">inventor hub</text></g><g transform="translate(175.6828125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="]ZWmx={.=ydSt2,}36m?" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 152.6828125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -152.6828125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="112.8828125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">inventor hub</text></g><g transform="translate(175.6828125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 27 KiB

@@ -1,4 +1,4 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 176.3625 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="176.3625" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern8106945446883995)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="xK?mk5x/iFU?4h[XPhb@" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 131.3625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -131.3625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHBhdGggZD0ibTYuNDY4OCAwLjE0MDYydjE1LjU4M2gxLjV2My41MjM0aC0xLjV2NS45MDdoMTEuODAxdi01LjkwN2gtMS41di0zLjUyMzRoMS41di0xNS41ODN6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xMy4yNDgiIHk9Ii0xMi44MjkiIHdpZHRoPSIxLjc1OTEiIGhlaWdodD0iMi43OTk0IiBmaWxsPSIjODM5YmZmIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMTQuMTgiIHk9Ii05LjI0MTEiIHdpZHRoPSIzLjYyMzMiIGhlaWdodD0iMy42MjkyIiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="91.5625" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">move hub</text></g><g transform="translate(154.3625,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="m:~uM;VAgHYD~%We#NrJ" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 131.3625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -131.3625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHBhdGggZD0ibTYuNDY4OCAwLjE0MDYydjE1LjU4M2gxLjV2My41MjM0aC0xLjV2NS45MDdoMTEuODAxdi01LjkwN2gtMS41di0zLjUyMzRoMS41di0xNS41ODN6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xMy4yNDgiIHk9Ii0xMi44MjkiIHdpZHRoPSIxLjc1OTEiIGhlaWdodD0iMi43OTk0IiBmaWxsPSIjODM5YmZmIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMTQuMTgiIHk9Ii05LjI0MTEiIHdpZHRoPSIzLjYyMzMiIGhlaWdodD0iMy42MjkyIiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="91.5625" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">move hub</text></g><g transform="translate(154.3625,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

@@ -1,4 +1,4 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 178.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="178.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern8106945446883995)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="L)zR+;mugupgeNNgUL9#" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 133.1359375 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -133.1359375 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="93.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">prime hub</text></g><g transform="translate(156.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id="$so[Yep]~$*_qL%{w@6^" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 133.1359375 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -133.1359375 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="93.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">prime hub</text></g><g transform="translate(156.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

@@ -1,4 +1,4 @@
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190.58125 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="190.58125" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
@@ -48,7 +48,7 @@ color: #fff;
stroke: #ffffff;
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled &gt; .blocklyOutlinePath {
fill: url(#blocklyDisabledPattern8106945446883995)
fill: url(#blocklyDisabledPattern770586695409901)
}
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker&gt;.blocklyPath {
fill-opacity: 0.2;
@@ -949,15 +949,9 @@ input[type=number] {
}
.controlsIconStyle {
opacity: 0.2;
}
.controlsIconStyle:hover {
opacity: 0.4;
}
.controlsIconStyle:active {
opacity: 0.6;
}
.blocklyMultilineText {
fill: #fff !important;
}
.blocklyMultiselect&gt;image, .blocklyMultiselect&gt;svg&gt;image {
@@ -972,4 +966,29 @@ input[type=number] {
opacity: .6;
}
</style><g transform="translate(1, 5)"><g data-id="3CD}BAMY1jnM,4Xoo;QM" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 145.58125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -145.58125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMy40NDIiIHk9Ii04LjQiIHdpZHRoPSIyMS44IiBoZWlnaHQ9IjguMyIgcng9IjEuMjgwNiIgcnk9IjEuMjgwNiIgZmlsbD0iIzc3NyIgc3Ryb2tlPSIjMWIyOTMzIiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBzdHJva2Utd2lkdGg9Ii4yIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMjMuNDQyIiB5PSItMjQuOSIgd2lkdGg9IjIxLjgiIGhlaWdodD0iOC4zIiByeD0iMS4yODA2IiByeT0iMS4yODA2IiBmaWxsPSIjNzc3IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNjOWM5YzkiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="105.78125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">technic hub</text></g><g transform="translate(168.58125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
.controlsIconStyleLightTheme {
opacity: 0.2;
}
.controlsIconStyleLightTheme:hover {
opacity: 0.4;
}
.controlsIconStyleLightTheme:active {
opacity: 0.6;
}
.controlsIconStyleDarkTheme {
opacity: 0.4;
filter: invert(1);
}
.controlsIconStyleDarkTheme:hover {
opacity: 0.6;
filter: invert(1);
}
.controlsIconStyleDarkTheme:active {
opacity: 0.8;
filter: invert(1);
}
</style><g transform="translate(1, 5)"><g data-id=")(Y5*G-E2$SXHQ*S.:4g" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 145.58125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -145.58125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z&#10;"/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMy40NDIiIHk9Ii04LjQiIHdpZHRoPSIyMS44IiBoZWlnaHQ9IjguMyIgcng9IjEuMjgwNiIgcnk9IjEuMjgwNiIgZmlsbD0iIzc3NyIgc3Ryb2tlPSIjMWIyOTMzIiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBzdHJva2Utd2lkdGg9Ii4yIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMjMuNDQyIiB5PSItMjQuOSIgd2lkdGg9IjIxLjgiIGhlaWdodD0iOC4zIiByeD0iMS4yODA2IiByeT0iMS4yODA2IiBmaWxsPSIjNzc3IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNjOWM5YzkiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="105.78125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">technic hub</text></g><g transform="translate(168.58125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 27 KiB

-148
View File
@@ -1,148 +0,0 @@
.. pybricks-requirements::
Other blocks
=====================================================
Most blocks correspond directly to one of the documented Python commands. This
page lists the remaining blocks.
This page will be expanded with more details in the next release.
Math
------------------------
See also :mod:`umath` for other math operations.
.. blockimg:: pybricks_blockMathFormula
.. blockimg:: pybricks_blockMathOp_modulo
.. blockimg:: pybricks_blockMathArithmetic_add
.. blockimg:: pybricks_blockMathArithmetic_minus
.. blockimg:: pybricks_blockMathArithmetic_multiply
.. blockimg:: pybricks_blockMathArithmetic_divide
.. blockimg:: pybricks_blockMathArithmetic_power
Logic
--------------------------
.. blockimg:: pybricks_blockLogicCompareDouble
.. blockimg:: pybricks_blockLogicCompare_eq
.. blockimg:: pybricks_blockLogicCompare_gte
.. blockimg:: pybricks_blockLogicCompare_gt
.. blockimg:: pybricks_blockLogicCompare_lte
.. blockimg:: pybricks_blockLogicCompare_lt
.. blockimg:: pybricks_blockLogicCompare_neq
.. blockimg:: pybricks_blockLogicIsNone_is_none
.. blockimg:: pybricks_blockLogicIsNone_is_not_none
.. blockimg:: pybricks_blockLogicIsNone_not
.. blockimg:: pybricks_blockLogicOperation_and
.. blockimg:: pybricks_blockLogicOperation_or
.. blockimg:: pybricks_blockLogicTernary
.. blockimg:: pybricks_blockLogicTernaryDouble
.. blockimg:: pybricks_blockIsIn
Flow
--------------------------
.. blockimg:: pybricks_blockFlowBreakContinue_break
.. blockimg:: pybricks_blockFlowBreakContinue_continue
.. blockimg:: pybricks_blockFlowForEach_loop_for
.. blockimg:: pybricks_blockFlowForEach_loop_for_list
.. blockimg:: pybricks_blockFlowForEach_loop_for_range
.. blockimg:: pybricks_blockFlowRepeat
.. blockimg:: pybricks_blockFlowWhile_until
.. blockimg:: pybricks_blockFlowWhile_while
.. blockimg:: pybricks_blockIfElse_if_else
.. blockimg:: pybricks_blockIfElse_if_else_else
.. blockimg:: pybricks_blockIfElse_if_only
Device and system setup
--------------------------
.. blockimg:: pybricks_blockGlobalSetup
Waiting
------------------------
.. blockimg:: pybricks_blockWaitTime
.. blockimg:: pybricks_blockWaitUntil
.. blockimg:: pybricks_blockWaitForever
Variables
--------------------------
.. blockimg:: pybricks_variables_setup_any
.. blockimg:: pybricks_blockVariableGetValue
.. blockimg:: pybricks_blockVariableSetValue
Multitasking
--------------------------
.. blockimg:: pybricks_blockGlobalStart
.. blockimg:: pybricks_blockMultiTask
Your own tasks
--------------------------
.. blockimg:: pybricks_variables_setup_function_basic
.. blockimg:: pybricks_variables_setup_function_with_args
.. blockimg:: pybricks_blockTaskReturn
External tasks
--------------------------
.. blockimg:: pybricks_variables_setup_imported_function
.. blockimg:: pybricks_blockImportTaskCallStatement
.. blockimg:: pybricks_blockImportTaskCallValue
Comments
--------------------------
.. blockimg:: pybricks_blockComment
Stopping programs
--------------------------
.. blockimg:: pybricks_blockProgramStop
Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

+89
View File
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg2"
width="525"
height="525"
viewBox="0 0 525 525"
sodipodi:docname="icon_ev3hub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
inkscape:export-filename="../diagrams/icon_ev3hub.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath860">
<rect
style="fill:#6ab0de;fill-opacity:1;stroke:#6ab0de;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect862"
width="589.10107"
height="96.333336"
x="235.33333"
y="-236.00002" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1040">
<rect
style="fill:#1e1e1e;fill-opacity:1;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1042"
width="128.5101"
height="19.934668"
x="827.15656"
y="74.666672" />
</clipPath>
</defs>
<sodipodi:namedview
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1163"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.70931"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="525"
height="468.02328"
preserveAspectRatio="none"
xlink:href="../cad/output/ev3device-ev3.png"
id="image834"
x="0"
y="26.384924" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+89
View File
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg2"
width="525"
height="525"
viewBox="0 0 525 525"
sodipodi:docname="icon_nxthub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
inkscape:export-filename="../diagrams/icon_nxthub.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath860">
<rect
style="fill:#6ab0de;fill-opacity:1;stroke:#6ab0de;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect862"
width="589.10107"
height="96.333336"
x="235.33333"
y="-236.00002" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1040">
<rect
style="fill:#1e1e1e;fill-opacity:1;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1042"
width="128.5101"
height="19.934668"
x="827.15656"
y="74.666672" />
</clipPath>
</defs>
<sodipodi:namedview
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1163"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.70931"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="false" />
<image
width="525"
height="447.39801"
preserveAspectRatio="none"
xlink:href="../cad/output/nxtdevice-nxt.png"
id="image960"
x="0"
y="34.809708" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+4 -4
View File
@@ -64,13 +64,13 @@ Motors
.. rubric:: Control settings
.. automethod:: pybricks.ev3devices.Motor.control.limits
.. automethod:: pybricks.ev3devices::Motor.control.limits
.. automethod:: pybricks.ev3devices.Motor.control.pid
.. automethod:: pybricks.ev3devices::Motor.control.pid
.. automethod:: pybricks.ev3devices.Motor.control.target_tolerances
.. automethod:: pybricks.ev3devices::Motor.control.target_tolerances
.. automethod:: pybricks.ev3devices.Motor.control.stall_tolerances
.. automethod:: pybricks.ev3devices::Motor.control.stall_tolerances
.. attribute:: control.scale
+3 -34
View File
@@ -7,8 +7,6 @@ City Hub
.. blockimg:: pybricks_variables_set_city_hub_option0
.. blockimg:: pybricks_variables_set_city_hub_option3
.. autoclass:: pybricks.hubs.CityHub
:no-members:
@@ -26,20 +24,6 @@ City Hub
.. automethod:: pybricks.hubs::CityHub.light.animate
.. rubric:: Using connectionless Bluetooth messaging
.. blockimg:: pybricks_blockBleBroadcast_CityHub
.. automethod:: pybricks.hubs::CityHub.ble.broadcast
.. blockimg:: pybricks_blockBleObserve_CityHub
.. automethod:: pybricks.hubs::CityHub.ble.observe
.. automethod:: pybricks.hubs::CityHub.ble.signal_strength
.. automethod:: pybricks.hubs::CityHub.ble.version
.. rubric:: Using the battery
.. blockimg:: pybricks_blockBatteryMeasure_CityHub_battery.voltage
@@ -56,10 +40,12 @@ City Hub
.. automethod:: pybricks.hubs::CityHub.buttons.pressed
.. automethod:: pybricks.hubs::CityHub.system.info
.. blockimg:: pybricks_blockHubStopButton_CityHub
.. blockimg:: pybricks_blockHubStopButton_CityHub_none
.. automethod:: pybricks.hubs::CityHub.system.set_stop_button
.. automethod:: pybricks.hubs::CityHub.system.storage
@@ -102,23 +88,6 @@ Creating light animations
.. literalinclude::
../../../examples/pup/hub_common/build/light_animate_cityhub.py
Bluetooth examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_broadcast_cityhub.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_observe_cityhub.py
Button and system examples
----------------------------------
+6 -37
View File
@@ -8,7 +8,7 @@ Essential Hub
.. blockimg:: pybricks_variables_set_essential_hub_option0
.. blockimg:: pybricks_variables_set_essential_hub_option4
.. blockimg:: pybricks_variables_set_essential_hub_option1
.. autoclass:: pybricks.hubs.EssentialHub
:no-members:
@@ -36,7 +36,7 @@ Essential Hub
.. blockimg:: pybricks_blockHubStopButton_EssentialHub
.. blockimg:: pybricks_blockHubStopButton_EssentialHub_none
.. automethod:: pybricks.hubs::EssentialHub.system.set_stop_button
.. rubric:: Using the IMU
@@ -63,7 +63,7 @@ Essential Hub
.. blockimg:: pybricks_blockTilt_EssentialHub_imu.tilt.pitch
.. blockimg:: pybricks_blockTilt_EssentialHub_imu.tilt.roll
.. automethod:: pybricks.hubs::EssentialHub.imu.tilt
.. blockimg:: pybricks_blockImuAcceleration_EssentialHub
@@ -89,27 +89,13 @@ Essential Hub
.. automethod:: pybricks.hubs::EssentialHub.imu.orientation
.. blockimg:: pybricks_blockImuConfigure_EssentialHub_imu.settings_heading_correction
.. blockimg:: pybricks_blockImuConfigure_EssentialHub_imu.settings_angular_velocity_threshold
.. blockimg:: pybricks_blockImuConfigure_EssentialHub_imu.settings_acceleration_threshold
.. automethod:: pybricks.hubs::EssentialHub.imu.settings
.. rubric:: Using connectionless Bluetooth messaging
.. blockimg:: pybricks_blockBleBroadcast_EssentialHub
.. automethod:: pybricks.hubs::EssentialHub.ble.broadcast
.. blockimg:: pybricks_blockBleObserve_EssentialHub
.. automethod:: pybricks.hubs::EssentialHub.ble.observe
.. automethod:: pybricks.hubs::EssentialHub.ble.signal_strength
.. automethod:: pybricks.hubs::EssentialHub.ble.version
.. rubric:: Using the battery
.. blockimg:: pybricks_blockBatteryMeasure_EssentialHub_battery.voltage
@@ -204,23 +190,6 @@ Reading acceleration and angular velocity on one axis
.. literalinclude::
../../../examples/pup/hub_common/build/imu_read_scalar_essentialhub.py
Bluetooth examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_broadcast_essentialhub.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_observe_essentialhub.py
System examples
----------------------------------
+5 -34
View File
@@ -10,7 +10,7 @@ Move Hub
.. blockimg:: pybricks_variables_set_move_hub_option0
.. blockimg:: pybricks_variables_set_move_hub_option4
.. blockimg:: pybricks_variables_set_move_hub_option1
.. autoclass:: pybricks.hubs.MoveHub
:no-members:
@@ -38,7 +38,7 @@ Move Hub
.. blockimg:: pybricks_blockTilt_MoveHub_imu.tilt.pitch
.. blockimg:: pybricks_blockTilt_MoveHub_imu.tilt.roll
.. automethod:: pybricks.hubs::MoveHub.imu.tilt
.. blockimg:: pybricks_blockImuAcceleration_MoveHub
@@ -49,20 +49,6 @@ Move Hub
Changed acceleration units from m/s² to mm/s².
.. rubric:: Using connectionless Bluetooth messaging
.. blockimg:: pybricks_blockBleBroadcast_PrimeHub
.. automethod:: pybricks.hubs::PrimeHub.ble.broadcast
.. blockimg:: pybricks_blockBleObserve_PrimeHub
.. automethod:: pybricks.hubs::PrimeHub.ble.observe
.. automethod:: pybricks.hubs::MoveHub.ble.signal_strength
.. automethod:: pybricks.hubs::MoveHub.ble.version
.. rubric:: Using the battery
.. blockimg:: pybricks_blockBatteryMeasure_MoveHub_battery.voltage
@@ -79,10 +65,12 @@ Move Hub
.. automethod:: pybricks.hubs::MoveHub.buttons.pressed
.. automethod:: pybricks.hubs::MoveHub.system.info
.. blockimg:: pybricks_blockHubStopButton_MoveHub
.. blockimg:: pybricks_blockHubStopButton_MoveHub_none
.. automethod:: pybricks.hubs::MoveHub.system.set_stop_button
.. automethod:: pybricks.hubs::MoveHub.system.storage
@@ -127,23 +115,6 @@ Reading acceleration
.. literalinclude::
../../../examples/pup/hub_movehub/imu_read_acceleration.py
Bluetooth examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_broadcast_movehub.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_observe_movehub.py
Button and system examples
----------------------------------
+9 -38
View File
@@ -8,7 +8,9 @@ Prime Hub / Inventor Hub
.. blockimg:: pybricks_variables_set_inventor_hub_option0
.. blockimg:: pybricks_variables_set_inventor_hub_option4
.. blockimg:: pybricks_variables_set_inventor_hub_option1
.. currentmodule:: pybricks.hubs
.. class:: InventorHub
@@ -19,7 +21,7 @@ Prime Hub / Inventor Hub
.. blockimg:: pybricks_variables_set_prime_hub_option0
.. blockimg:: pybricks_variables_set_prime_hub_option4
.. blockimg:: pybricks_variables_set_prime_hub_option1
.. autoclass:: pybricks.hubs.PrimeHub
:no-members:
@@ -82,7 +84,7 @@ Prime Hub / Inventor Hub
.. blockimg:: pybricks_blockHubStopButton_PrimeHub
.. blockimg:: pybricks_blockHubStopButton_PrimeHub_none
.. automethod:: pybricks.hubs::PrimeHub.system.set_stop_button
.. rubric:: Using the IMU
@@ -109,7 +111,7 @@ Prime Hub / Inventor Hub
.. blockimg:: pybricks_blockTilt_PrimeHub_imu.tilt.pitch
.. blockimg:: pybricks_blockTilt_PrimeHub_imu.tilt.roll
.. automethod:: pybricks.hubs::PrimeHub.imu.tilt
.. blockimg:: pybricks_blockImuAcceleration_PrimeHub
@@ -135,11 +137,11 @@ Prime Hub / Inventor Hub
.. automethod:: pybricks.hubs::PrimeHub.imu.orientation
.. blockimg:: pybricks_blockImuConfigure_PrimeHub_imu.settings_heading_correction
.. blockimg:: pybricks_blockImuConfigure_PrimeHub_imu.settings_angular_velocity_threshold
.. blockimg:: pybricks_blockImuConfigure_PrimeHub_imu.settings_acceleration_threshold
.. automethod:: pybricks.hubs::PrimeHub.imu.settings
.. rubric:: Using the speaker
@@ -150,20 +152,6 @@ Prime Hub / Inventor Hub
.. automethod:: pybricks.hubs::PrimeHub.speaker.play_notes
.. rubric:: Using connectionless Bluetooth messaging
.. blockimg:: pybricks_blockBleBroadcast_PrimeHub
.. automethod:: pybricks.hubs::PrimeHub.ble.broadcast
.. blockimg:: pybricks_blockBleObserve_PrimeHub
.. automethod:: pybricks.hubs::PrimeHub.ble.observe
.. automethod:: pybricks.hubs::PrimeHub.ble.signal_strength
.. automethod:: pybricks.hubs::PrimeHub.ble.version
.. rubric:: Using the battery
.. blockimg:: pybricks_blockBatteryMeasure_PrimeHub_battery.voltage
@@ -329,23 +317,6 @@ Reading acceleration and angular velocity on one axis
.. literalinclude::
../../../examples/pup/hub_common/build/imu_read_scalar_primehub.py
Bluetooth examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_broadcast_primehub.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_observe_primehub.py
System examples
----------------------------------
+8 -37
View File
@@ -8,7 +8,7 @@ Technic Hub
.. blockimg:: pybricks_variables_set_technic_hub_option0
.. blockimg:: pybricks_variables_set_technic_hub_option4
.. blockimg:: pybricks_variables_set_technic_hub_option1
.. autoclass:: pybricks.hubs.TechnicHub
:no-members:
@@ -51,7 +51,7 @@ Technic Hub
.. blockimg:: pybricks_blockTilt_TechnicHub_imu.tilt.pitch
.. blockimg:: pybricks_blockTilt_TechnicHub_imu.tilt.roll
.. automethod:: pybricks.hubs::TechnicHub.imu.tilt
.. blockimg:: pybricks_blockImuAcceleration_TechnicHub
@@ -77,27 +77,13 @@ Technic Hub
.. automethod:: pybricks.hubs::TechnicHub.imu.orientation
.. blockimg:: pybricks_blockImuConfigure_TechnicHub_imu.settings_heading_correction
.. blockimg:: pybricks_blockImuConfigure_TechnicHub_imu.settings_angular_velocity_threshold
.. blockimg:: pybricks_blockImuConfigure_TechnicHub_imu.settings_acceleration_threshold
.. automethod:: pybricks.hubs::TechnicHub.imu.settings
.. rubric:: Using connectionless Bluetooth messaging
.. blockimg:: pybricks_blockBleBroadcast_TechnicHub
.. automethod:: pybricks.hubs::TechnicHub.ble.broadcast
.. blockimg:: pybricks_blockBleObserve_TechnicHub
.. automethod:: pybricks.hubs::TechnicHub.ble.observe
.. automethod:: pybricks.hubs::TechnicHub.ble.signal_strength
.. automethod:: pybricks.hubs::TechnicHub.ble.version
.. rubric:: Using the battery
.. blockimg:: pybricks_blockBatteryMeasure_TechnicHub_battery.voltage
@@ -114,10 +100,12 @@ Technic Hub
.. automethod:: pybricks.hubs::TechnicHub.buttons.pressed
.. automethod:: pybricks.hubs::TechnicHub.system.info
.. blockimg:: pybricks_blockHubStopButton_TechnicHub
.. blockimg:: pybricks_blockHubStopButton_TechnicHub_none
.. automethod:: pybricks.hubs::TechnicHub.system.set_stop_button
.. automethod:: pybricks.hubs::TechnicHub.system.storage
@@ -193,23 +181,6 @@ Reading acceleration and angular velocity on one axis
.. literalinclude::
../../../examples/pup/hub_common/build/imu_read_scalar_technichub.py
Bluetooth examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_broadcast_technichub.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/hub_common/build/ble_observe_technichub.py
Button and system examples
----------------------------------
+20 -16
View File
@@ -1,19 +1,24 @@
Pybricks Documentation
Pybricks Reference Manual
==================================================================
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
Run MicroPython scripts
directly on the hub, and get full control of your motors and sensors.
.. only:: ide
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You
can code using Windows, Mac, Linux, Chromebook, and Android.
This documentation details all available functions and classes in Pybricks.
For example, you can find the meaning of specific function parameters like
motor speed.
Click on any device below to see its documentation. Use the menu on the left
to find documentation for additional modules. You may need to click the ☰ icon
above to reveal this menu.
If you are new to Pybricks, we recommend starting with the `Pybricks learn`_
guide instead.
.. only:: main
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
Run MicroPython scripts
directly on the hub, and get full control of your motors and sensors.
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You
can code using Windows, Mac, Linux, Chromebook, and Android.
.. note:: You are viewing the stand-alone version of the documentation. To
learn more about Pybricks and to start coding, visit
the `Pybricks website`_
@@ -21,8 +26,13 @@ above to reveal this menu.
.. note:: Are you using LEGO MINDSTORMS EV3? Check out the
`EV3 documentation`_ instead.
Click on any device below to see its documentation. Use the menu on the left
to find documentation for additional modules. You may need to click the ☰ icon
above to reveal this menu.
.. _EV3 documentation: https://pybricks.com/ev3-micropython/
.. _Pybricks website: https://pybricks.com/
.. _Pybricks learn: https://pybricks.com/learn/
.. rubric:: Programmable hubs
@@ -60,15 +70,9 @@ above to reveal this menu.
parameters/index
tools/index
robotics
messaging/index
signaltypes
.. toctree::
:maxdepth: 1
:caption: Code with blocks
:hidden:
blocks/index
.. toctree::
:maxdepth: 1
:caption: MicroPython modules
+3 -5
View File
@@ -1,10 +1,8 @@
EV3 Analog Sensor
.. pybricks-requirements:: pybricks-iodevices ev3
Analog Sensor
^^^^^^^^^^^^^^^^^
.. note::
This class is only available on EV3.
.. figure:: ../../main/cad/output/iodevice-rj12brown.png
:width: 25 %
+12 -7
View File
@@ -1,20 +1,25 @@
EV3 DC Motor
DC Motor
^^^^^^^^^^^^^^^^^^
.. note::
This class is specifically for EV3 and NXT. This lets you drive motors that
are not automatically detected as motors. This includes RCX motors and Power
Function motors that are connected via the official converter cables. Note:
Applying motor power to custom electronics may damage the hub or the device.
This class is specifically for on EV3. For Powered Up DC Motors, just use
the :class:`DCMotor <pybricks.pupdevices.DCMotor>` class.
For Powered Up DC Motors, just use
the :class:`DCMotor <pybricks.pupdevices.DCMotor>` class instead, which will
automatically detect the motor and use the correct and safe settings.
.. figure:: ../../main/cad/output/iodevice-dcmotor.png
:width: 40 %
.. autoclass:: pybricks.iodevices.DCMotor
:noindex:
:no-members:
.. automethod:: pybricks.iodevices.DCMotor.dc
:noindex:
.. automethod:: pybricks.iodevices.DCMotor.brake
.. automethod:: pybricks.iodevices.DCMotor.stop
:noindex:
.. automethod:: pybricks.iodevices.DCMotor.settings
-60
View File
@@ -1,60 +0,0 @@
Ev3dev sensors
^^^^^^^^^^^^^^^^^^
.. note::
This class is only available on EV3.
.. figure:: ../../main/cad/output/iodevice-rj12pcbbox.png
:width: 30 %
EV3 MicroPython is built on top of ev3dev, which means that a sensor
may be supported even if it is not listed in this documentation. If so, you can
use it with the ``Ev3devSensor`` class. This is easier and faster than using
the custom device classes given above.
To check whether you can use the ``Ev3devSensor`` class:
* Plug the sensor into your EV3 Brick.
* Go to the main menu of the EV3 Brick.
* Select `Device Browser` and then `Sensors`.
* If your sensor shows up, you can use it.
Now select your sensor from the menu and choose `set mode`. This shows all
available modes for this sensor. You can use these mode names as the ``mode``
setting below.
To learn more about compatible devices and what each mode does,
visit the `ev3dev sensors`_ page.
.. autoclass:: pybricks.iodevices.Ev3devSensor
:no-members:
.. autoattribute:: pybricks.iodevices.Ev3devSensor.sensor_index
:annotation:
.. autoattribute:: pybricks.iodevices.Ev3devSensor.port_index
:annotation:
.. automethod:: pybricks.iodevices.Ev3devSensor.read
**Example: Reading values with the Ev3devSensor class**
In this example we use the LEGO MINDSTORMS EV3 Color Sensor with the raw
RGB mode. This gives uncalibrated red, green, and blue reflection values.
.. literalinclude::
../../../examples/ev3/ev3devsensor/main.py
**Example: Extending the Ev3devSensor class**
This example shows how to extend the ``Ev3devSensor`` class by accessing
additional features found in the Linux system folder for this device.
.. literalinclude::
../../../examples/ev3/ev3devsensor/class_example.py
.. _ev3dev sensors: http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/sensors.html
.. _Mode name: http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/sensor_data.html
.. _lego-sensor: http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/sensors.html#the-lego-sensor-subsytem
.. _lego-port: http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-stretch/ports.html#the-lego-port-subsystem
+2 -8
View File
@@ -1,14 +1,8 @@
Generic I2C Device
^^^^^^^^^^^^^^^^^^
.. note::
This class is **only supported on the EV3** at this time. It could be added
to Powered Up hubs in a future release. If you'd like to see this happen, be
sure to ask us on our `support page`_.
.. _support page: https://github.com/pybricks/support/issues/
EV3 and NXT support connecting generic I2C devices to the hub.
See :doc:`pinout here <uartdevice>`.
.. figure:: ../../main/cad/output/iodevice-rj12cyan.png
:width: 25 %
+86 -12
View File
@@ -1,25 +1,39 @@
.. pybricks-requirements:: pybricks-iodevices
:mod:`iodevices <pybricks.iodevices>` -- Custom devices
============================================================
.. module:: pybricks.iodevices
This module has classes for generic and custom input/output devices.
Wireless devices
----------------
.. toctree::
:maxdepth: 1
:hidden:
pupdevice
lwp3device
xboxcontroller
This module has classes for generic and custom input/output devices.
.. pybricks-requirements:: pybricks-iodevices
.. pybricks-classlink:: PUPDevice
.. pybricks-classlink:: XboxController
.. figure:: ../../main/cad/output/iodevice-pupdevice.png
:width: 50 %
:target: pupdevice.html
.. figure:: ../../main/diagrams_source/xboxcontroller.png
:width: 40 %
:target: xboxcontroller.html
LEGO protocol devices
---------------------
.. toctree::
:maxdepth: 1
:hidden:
lwp3device
lumpdevice
pupdevice
.. pybricks-requirements:: pybricks-iodevices
.. pybricks-classlink:: LWP3Device
@@ -27,8 +41,68 @@ This module has classes for generic and custom input/output devices.
:width: 80 %
:target: lwp3device.html
.. pybricks-classlink:: XboxController
.. pybricks-requirements:: ev3 pybricks-iodevices
.. figure:: ../../main/diagrams_source/xboxcontroller.png
.. pybricks-classlink:: LUMPDevice
.. figure:: ../../main/cad/output/iodevice-rj12green.png
:width: 20 %
:target: lumpdevice.html
.. pybricks-requirements:: pybricks-iodevices
.. pybricks-classlink:: PUPDevice
.. figure:: ../../main/cad/output/iodevice-pupdevice.png
:width: 50 %
:target: pupdevice.html
Generic protocols
-----------------
.. toctree::
:maxdepth: 1
:hidden:
uartdevice
i2cdevice
analogsensor
dcmotor
.. pybricks-requirements:: pybricks-iodevices
.. pybricks-classlink:: UARTDevice
.. |uart-wired| image:: ../../main/cad/output/iodevice-rj12grey.png
:width: 20 %
:target: uartdevice.html
.. |uart-wireless| image:: ../../main/cad/output/iodevice-pupdevice.png
:width: 50 %
:target: uartdevice.html
|uart-wired| |uart-wireless|
.. pybricks-requirements:: ev3 pybricks-iodevices
.. pybricks-classlink:: I2CDevice
.. figure:: ../../main/cad/output/iodevice-rj12cyan.png
:width: 20 %
:target: i2cdevice.html
.. pybricks-requirements:: ev3 pybricks-iodevices
.. pybricks-classlink:: AnalogSensor
.. figure:: ../../main/cad/output/iodevice-rj12brown.png
:width: 20 %
:target: analogsensor.html
.. pybricks-requirements:: ev3 pybricks-iodevices
.. pybricks-classlink:: DCMotor
.. figure:: ../../main/cad/output/iodevice-dcmotor.png
:width: 40 %
:target: xboxcontroller.html
:target: dcmotor.html
+3 -4
View File
@@ -1,11 +1,10 @@
.. pybricks-requirements:: pybricks-iodevices ev3
EV3 UART Device
^^^^^^^^^^^^^^^^^
.. note::
This class is only available on EV3.
.. figure:: ../../main/cad/output/iodevice-rj12green.png
:width: 25 %
.. autoclass:: pybricks.iodevices.LUMPDevice
:no-members:
-5
View File
@@ -3,11 +3,6 @@
LEGO Wireless Protocol v3 device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. warning::
This is an experimental class. It has not been well tested and may be
changed in future.
.. figure:: ../../main/cad/output/hub-lwp3.png
:width: 80 %
Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

+2
View File
@@ -15,6 +15,8 @@ Powered Up Device
.. automethod:: pybricks.iodevices.PUPDevice.write
.. automethod:: pybricks.iodevices.PUPDevice.reset
Examples
-------------------
+38 -7
View File
@@ -1,16 +1,47 @@
.. pybricks-requirements:: pybricks-iodevices
Generic UART Device
^^^^^^^^^^^^^^^^^^^
.. note::
Powered Up and EV3 support connecting generic UART devices to the hub. The pinout
is shown below. Note the orientation of the connector. For EV3, the internal
wire colors match those on the diagram below.
This class is **only supported on the EV3** at this time. It could be added
to Powered Up hubs in a future release. If you'd like to see this happen,
be sure to ask us on our `support page`_.
.. image:: pinout_numbered.jpg
:width: 50 %
.. _support page: https://github.com/pybricks/support/issues/
.. list-table::
:header-rows: 1
* - Pin
- Powered Up (UART)
- EV3 (UART sensor)
- EV3 (I2C sensor)
* - 1 (white)
- Motor Terminal 1
- Optional battery power
- Optional battery power
* - 2 (black)
- Motor Terminal 2
- N/A
- N/A
* - 3 (red)
- Ground
- Ground
- Ground
* - 4 (green)
- VCC (3.3 V)
- VCC (5 V)
- VCC (5 V)
* - 5 (yellow)
- Hub TX (Sensor RX) (3.3 V)
- Hub TX (Sensor RX) (3.3 V)
- SCL (master) (3.3 V)
* - 6 (blue)
- Hub RX (Sensor TX) (3.3 V)
- Hub RX (Sensor TX) (3.3 V)
- SDA (master) (3.3 V)
.. figure:: ../../main/cad/output/iodevice-rj12grey.png
:width: 25 %
.. autoclass:: pybricks.iodevices.UARTDevice
+14 -8
View File
@@ -11,6 +11,12 @@ Xbox Controller
.. autoclass:: pybricks.iodevices.XboxController
:no-members:
.. automethod:: pybricks.iodevices::XboxController.connect
.. automethod:: pybricks.iodevices::XboxController.disconnect
.. automethod:: pybricks.iodevices::XboxController.name
.. blockimg:: pybricks_blockButtonIsPressed_XboxController
.. automethod:: pybricks.iodevices::XboxController.buttons.pressed
@@ -30,19 +36,19 @@ Xbox Controller
.. blockimg:: pybricks_blockJoystickValue_lj_x
.. blockimg:: pybricks_blockJoystickValue_lj_y
.. automethod:: pybricks.iodevices::XboxController.joystick_left
.. blockimg:: pybricks_blockJoystickValue_rj_x
.. blockimg:: pybricks_blockJoystickValue_rj_y
.. automethod:: pybricks.iodevices::XboxController.joystick_right
.. blockimg:: pybricks_blockJoystickValue_lt
.. blockimg:: pybricks_blockJoystickValue_rt
.. automethod:: pybricks.iodevices::XboxController.triggers
.. blockimg:: pybricks_blockJoystickValue_dpad
@@ -56,15 +62,15 @@ Xbox Controller
.. blockimg:: pybricks_blockGamepadRumble_default
.. blockimg:: pybricks_blockGamepadRumble_default_with_list
.. blockimg:: pybricks_blockGamepadRumble_with_options
.. automethod:: pybricks.iodevices::XboxController.rumble
.. _xbox-controller-pairing:
Xbox Controller Pairing Instructions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
====================================
The first time you use a controller with a hub, you will need to pair
them: Turn the controller on and then press and hold the pairing
button on the back of the controller for a few seconds. When you release
@@ -74,7 +80,7 @@ When pairing and the connection is succesful, the Xbox button will stop
flashing and stay on for as long as the program is running.
Repeat Connections
==================
------------------
If you keep using the same controller with the same hub, you can simply
turn the controller on the next time and the hub will connect to it
@@ -86,7 +92,7 @@ connect to another hub, you will need to pair them again as described
above.
Compatible Controllers
============================
----------------------
All Xbox controllers released since 2016 are compatible. This includes the
controller from the One S (``1708`` from 2016), the Elite Series 2 (``1797``
+62
View File
@@ -0,0 +1,62 @@
:mod:`messaging <pybricks.messaging>` -- Send and receive messages
==================================================================
.. automodule:: pybricks.messaging
:no-members:
.. pybricks-requirements:: pup
.. blockimg:: pybricks_variables_set_ble_radio
.. autoclass:: pybricks.messaging.BLERadio
:no-members:
.. blockimg:: pybricks_blockBleBroadcast2
.. automethod:: pybricks.messaging.BLERadio.broadcast
.. blockimg:: pybricks_blockBleObserve2
.. automethod:: pybricks.messaging.BLERadio.observe
.. automethod:: pybricks.messaging.BLERadio.signal_strength
.. automethod:: pybricks.messaging.BLERadio.version
.. blockimg:: pybricks_variables_set_app_data_app_data_color_tracker
.. blockimg:: pybricks_variables_set_app_data_app_data_teachable_machine
.. blockimg:: pybricks_variables_set_app_data_app_data_object_detection
.. blockimg:: pybricks_variables_set_app_data_app_data_line_follower
.. blockimg:: pybricks_variables_set_app_data_app_data_custom
.. autoclass:: pybricks.messaging.AppData
:no-members:
.. automethod:: pybricks.messaging.AppData.get_bytes
.. blockimg:: pybricks_blockAppDataGetValues
.. automethod:: pybricks.messaging.AppData.write_bytes
.. automethod:: pybricks.messaging.AppData.configure
.. automethod:: pybricks.messaging.AppData.close
BLERadio examples
------------------
Broadcasting data to other hubs
*******************************
.. literalinclude::
../../../examples/pup/ble_radio/ble_broadcast.py
Observing data from other hubs
******************************
.. literalinclude::
../../../examples/pup/ble_radio/ble_observe.py
-1
View File
@@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order.
.. _OSError:
.. autoclass:: ubuiltins.OSError
:noindex:
.. autoclass:: ubuiltins.OverflowError
:no-members:
+9
View File
@@ -6,5 +6,14 @@ Axis
.. autoclass:: pybricks.parameters.Axis
:no-members:
.. autoattribute:: pybricks.parameters.Axis.X
:annotation: = vector(1, 0, 0)
.. autoattribute:: pybricks.parameters.Axis.Y
:annotation: = vector(0, 1, 0)
.. autoattribute:: pybricks.parameters.Axis.Z
:annotation: = vector(0, 0, 1)
On Move Hub, doing math with these vectors is not supported. The axes can still
be used to set up the hub orientation.
+2
View File
@@ -3,6 +3,8 @@
Button
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. currentmodule:: pybricks.parameters
.. class:: Button
.. rubric:: Remote and hub buttons
+2
View File
@@ -3,6 +3,8 @@
Direction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. currentmodule:: pybricks.parameters
.. class:: Direction
Rotational direction for positive speed or angle values.
+2
View File
@@ -3,6 +3,8 @@
Port
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. currentmodule:: pybricks.parameters
.. class:: Port
Input and output ports:
+2
View File
@@ -3,6 +3,8 @@
Side
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. currentmodule:: pybricks.parameters
.. class:: Side
Side of a hub or a sensor. These devices are
+2
View File
@@ -3,6 +3,8 @@
Stop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. currentmodule:: pybricks.parameters
.. class:: Stop
Action after the motor stops.
+1 -1
View File
@@ -42,7 +42,7 @@ Color Sensor
.. blockimg:: pybricks_blockLightOn_colorsensor_on
.. blockimg:: pybricks_blockLightOn_colorsensor_on_list
.. automethod:: pybricks.pupdevices::ColorSensor.lights.on
.. blockimg:: pybricks_blockLightOn_colorsensor_off
-4
View File
@@ -21,20 +21,16 @@ Motors without rotation sensors
.. blockimg:: pybricks_blockMotorDuty_DCMotor
.. automethod:: pybricks.pupdevices.DCMotor.dc
:noindex:
.. blockimg:: pybricks_blockMotorStop_DCMotor_coast
.. automethod:: pybricks.pupdevices.DCMotor.stop
:noindex:
.. blockimg:: pybricks_blockMotorStop_DCMotor_brake
.. automethod:: pybricks.pupdevices.DCMotor.brake
:noindex:
.. automethod:: pybricks.pupdevices.DCMotor.settings
:noindex:
Examples
-------------------
+23
View File
@@ -0,0 +1,23 @@
.. pybricks-requirements:: pybricks-iodevices ble-extra
Duplo Train
^^^^^^^^^^^
.. autoclass:: pybricks.pupdevices.DuploTrain
:no-members:
.. automethod:: pybricks.pupdevices::DuploTrain.connect
.. automethod:: pybricks.pupdevices::DuploTrain.disconnect
.. automethod:: pybricks.pupdevices::DuploTrain.name
.. automethod:: pybricks.pupdevices::DuploTrain.drive
.. automethod:: pybricks.pupdevices::DuploTrain.headlights
.. automethod:: pybricks.pupdevices::DuploTrain.sound
.. automethod:: pybricks.pupdevices::DuploTrain.speed
.. automethod:: pybricks.pupdevices::DuploTrain.color
+15
View File
@@ -22,6 +22,9 @@
colorlightmatrix
light
remote
technicmovehub
mariohub
duplotrain
.. pybricks-classlink:: DCMotor
@@ -94,3 +97,15 @@
.. figure:: ../../main/cad/output/pupdevice-remote.png
:width: 50 %
:target: remote.html
.. pybricks-requirements:: pybricks-iodevices ble-extra
.. pybricks-classlink:: TechnicMoveHub
.. pybricks-requirements:: pybricks-iodevices ble-extra
.. pybricks-classlink:: MarioHub
.. pybricks-requirements:: pybricks-iodevices ble-extra
.. pybricks-classlink:: DuploTrain
+17
View File
@@ -0,0 +1,17 @@
.. pybricks-requirements:: pybricks-iodevices ble-extra
Mario Hub
^^^^^^^^^
.. autoclass:: pybricks.pupdevices.MarioHub
:no-members:
.. automethod:: pybricks.pupdevices::MarioHub.connect
.. automethod:: pybricks.pupdevices::MarioHub.disconnect
.. automethod:: pybricks.pupdevices::MarioHub.color
.. automethod:: pybricks.pupdevices::MarioHub.hsv
.. automethod:: pybricks.pupdevices::MarioHub.detectable_colors
+8 -8
View File
@@ -105,24 +105,24 @@ Motors with rotation sensors
.. blockimg:: pybricks_blockMotorConfigure_motor_max_speed
.. blockimg:: pybricks_blockMotorConfigure_motor_acceleration
.. blockimg:: pybricks_blockMotorConfigure_motor_max_torque
.. automethod:: pybricks.pupdevices.Motor.control.limits
.. automethod:: pybricks.pupdevices::Motor.control.limits
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.pid
.. automethod:: pybricks.pupdevices::Motor.control.pid
.. pybricks-requirements:: pybricks-common-control
.. blockimg:: pybricks_blockMotorConfigure_motor_target_tolerances
.. automethod:: pybricks.pupdevices.Motor.control.target_tolerances
.. automethod:: pybricks.pupdevices::Motor.control.target_tolerances
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.stall_tolerances
.. automethod:: pybricks.pupdevices::Motor.control.stall_tolerances
.. pybricks-requirements:: pybricks-common-control
@@ -139,11 +139,11 @@ Motors with rotation sensors
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.model.state
.. automethod:: pybricks.pupdevices::Motor.model.state
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.model.settings
.. automethod:: pybricks.pupdevices::Motor.model.settings
Initialization examples
-----------------------
-4
View File
@@ -21,23 +21,19 @@ and ambient conditions.
.. blockimg:: pybricks_variables_set_pf_motor
.. autoclass:: pybricks.pupdevices.PFMotor
:noindex:
:no-members:
.. blockimg:: pybricks_blockMotorDuty_PFMotor
.. automethod:: pybricks.pupdevices.PFMotor.dc
:noindex:
.. blockimg:: pybricks_blockMotorStop_PFMotor_coast
.. automethod:: pybricks.pupdevices.PFMotor.stop
:noindex:
.. blockimg:: pybricks_blockMotorStop_PFMotor_brake
.. automethod:: pybricks.pupdevices.PFMotor.brake
:noindex:
Examples
-------------------
+2
View File
@@ -13,6 +13,8 @@ Remote Control
.. autoclass:: pybricks.pupdevices.Remote
:no-members:
.. automethod:: pybricks.pupdevices::Remote.connect
.. automethod:: pybricks.pupdevices::Remote.name
.. blockimg:: pybricks_blockLightOnColor_remote_on
+13
View File
@@ -0,0 +1,13 @@
.. pybricks-requirements:: pybricks-iodevices ble-extra
Technic Move Hub
^^^^^^^^^^^^^^^^
.. autoclass:: pybricks.pupdevices.TechnicMoveHub
:no-members:
.. automethod:: pybricks.pupdevices::TechnicMoveHub.connect
.. automethod:: pybricks.pupdevices::TechnicMoveHub.disconnect
.. automethod:: pybricks.pupdevices::TechnicMoveHub.drive
+1 -1
View File
@@ -14,7 +14,7 @@ Tilt Sensor
.. blockimg:: pybricks_blockTilt_TiltSensor_imu.tilt.pitch
.. blockimg:: pybricks_blockTilt_TiltSensor_imu.tilt.roll
.. automethod:: tilt
Examples
+1 -1
View File
@@ -25,7 +25,7 @@ Ultrasonic Sensor
.. blockimg:: pybricks_blockLightOn_ultrasonicsensor_on
.. blockimg:: pybricks_blockLightOn_ultrasonicsensor_on_list
.. automethod:: pybricks.pupdevices::UltrasonicSensor.lights.on
.. blockimg:: pybricks_blockLightOn_ultrasonicsensor_off
+16 -19
View File
@@ -19,33 +19,28 @@
This is measured using the internal rotation sensors. Because wheels may
slip while moving, the traveled distance and angle are only estimates.
.. blockimg:: pybricks_blockDriveBaseDrive_drivebase_drive_straight
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_straight
.. automethod:: pybricks.robotics.DriveBase.straight
.. blockimg:: pybricks_blockDriveBaseDrive_drivebase_drive_turn
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_turn_by
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_turn_to
.. automethod:: pybricks.robotics.DriveBase.turn
.. versionchanged:: 3.6
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_arc_deg
The ``curve()`` Python method will be replaced by the :meth:`.arc`
method. It can still make curves, but it uses different definitions
for drive and turn direction. Existing code with ``curve()`` continues
to work the same, but you should use :meth:`.arc` for new code.
If you use block code, you can pick a new block from the palette to
update your code. The old block will still work, but it displays a
warning icon to remind you to upgrade. The updated `curve` option uses
the direction definitions given below. The new `veer` option lets
you drive along a circle by a given distance, which is useful for
veering slightly in one direction.
.. blockimg:: pybricks_blockDriveBaseDrive2_drivebase_drive_arc_angle
.. blockimg:: pybricks_blockDriveBaseDrive2_drivebase_drive_arc_distance
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_arc_mm
.. automethod:: pybricks.robotics.DriveBase.arc
.. pybricks-requirements:: stm32-float
.. blockimg:: pybricks_blockDriveBaseMove_drivebase_move_coordinates
.. automethod:: pybricks.robotics.DriveBase.move_by
.. blockimg:: pybricks_blockDriveBaseConfigure_drivebase_straight_speed
.. blockimg:: pybricks_blockDriveBaseConfigure_drivebase_straight_acceleration
@@ -66,7 +61,7 @@
using :meth:`.drive` again. For example, you can drive until a
sensor is triggered and then stop or turn around.
.. blockimg:: pybricks_blockDriveBaseDrive_drivebase_drive_forever
.. blockimg:: pybricks_blockDriveBaseStart
.. automethod:: pybricks.robotics.DriveBase.drive
@@ -80,6 +75,8 @@
.. blockimg:: pybricks_blockDriveBaseStop_hold
.. automethod:: pybricks.robotics.DriveBase.hold
.. rubric:: Measuring
.. blockimg:: pybricks_blockDriveBaseMeasure_drivebase_get_distance
@@ -135,7 +132,7 @@
``then=Stop.COAST`` in your last
:meth:`straight <pybricks.robotics.DriveBase.straight>`,
:meth:`turn <pybricks.robotics.DriveBase.turn>`, or
:meth:`curve <pybricks.robotics.DriveBase.arc>` command.
:meth:`arc <pybricks.robotics.DriveBase.arc>` command.
.. _measuring:
+1 -1
View File
@@ -291,5 +291,5 @@ though the *hub* accelerates backward.
How to configure the ``top_side`` and ``front_side`` settings for three
different robot designs. The same technique can be applied to other hubs
and other creations, by noting which way the top and
front :class:`Side <Side>` of the hub are pointing. The example
front :class:`Side <pybricks.parameters.Side>` of the hub are pointing. The example
on the left is the default configuration.
+1 -1
View File
@@ -10,7 +10,7 @@ ev3 = EV3Brick()
device = I2CDevice(Port.S2, 0xD2 >> 1)
# Recommended for reading
(result,) = device.read(reg=0x0F, length=1)
result = device.read(reg=0x0F, length=1)
# Read 1 byte from no particular register:
device.read(reg=None, length=1)
@@ -1,11 +1,10 @@
# ThisHub = MoveHub CityHub TechnicHub PrimeHub EssentialHub
from pybricks.hubs import ThisHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Port
from pybricks.tools import wait
from pybricks.messaging import BLERadio
# Initialize the hub.
hub = ThisHub(broadcast_channel=1)
radio = BLERadio(broadcast_channel=1)
# Initialize the motors.
left_motor = Motor(Port.A)
@@ -18,7 +17,7 @@ while True:
# Set the broadcast data and start broadcasting if not already doing so.
data = (left_angle, right_angle)
hub.ble.broadcast(data)
radio.broadcast(data)
# Broadcasts are only sent every 100 milliseconds, so there is no reason
# to call the broadcast() method more often than that.
@@ -1,11 +1,10 @@
# ThisHub = MoveHub CityHub TechnicHub PrimeHub EssentialHub
from pybricks.hubs import ThisHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Color, Port
from pybricks.parameters import Port
from pybricks.tools import wait
from pybricks.messaging import BLERadio
# Initialize the hub.
hub = ThisHub(observe_channels=[1])
radio = BLERadio(observe_channels=[1])
# Initialize the motors.
left_motor = Motor(Port.A)
@@ -14,17 +13,12 @@ right_motor = Motor(Port.B)
while True:
# Receive broadcast from the other hub.
data = hub.ble.observe(1)
data = radio.observe(1)
if data is None:
# No data has been received in the last 1 second.
hub.light.on(Color.RED)
else:
if data is not None:
# Data was received and is less that one second old.
hub.light.on(Color.GREEN)
# *data* contains the same values in the same order
# that were passed to hub.ble.broadcast() on the
# It contains the same values in the same order
# that were passed to radio.broadcast() on the
# other hub.
left_angle, right_angle = data
+41 -23
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Builds the @pybricks/jedi npm package into npm-build/.
import email.parser
import json
@@ -8,16 +9,29 @@ import subprocess
import sys
import zipfile
BUILD_DIR = (pathlib.Path(__file__).parent / "build").resolve()
try:
import tomllib
except ImportError:
import tomli as tomllib # type: ignore[no-redef]
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} <version>", file=sys.stderr)
sys.exit(1)
VERSION = sys.argv[1]
ROOT_DIR = pathlib.Path(__file__).parent.resolve()
REPO_ROOT_DIR = (ROOT_DIR / "..").resolve()
BUILD_DIR = ROOT_DIR / "npm-build"
package_json = {
"name": "@pybricks/jedi",
"version": "1.17.0",
"version": VERSION,
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
"repository": {
"type": "git",
"url": "https://github.com/pybricks/pybricks-api",
"directory": "npm/jedi",
"url": "git+https://github.com/pybricks/pybricks-api.git",
"directory": "jedi",
},
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},
}
@@ -30,16 +44,28 @@ whl_map: dict[str, str] = {}
shutil.rmtree(BUILD_DIR, True)
BUILD_DIR.mkdir()
# download package and dependencies (*.whl files)
# build pybricks api wheel from local source so pip uses it instead of fetching from PyPI
subprocess.check_call(["poetry", "build", "--format=wheel"], cwd=REPO_ROOT_DIR)
# copy locally built pybricks wheel to build dir
for whl in (REPO_ROOT_DIR / "dist").glob("pybricks-*.whl"):
shutil.copy(whl, BUILD_DIR)
# build pybricks-jedi wheel from local source
subprocess.check_call(["poetry", "build", "--format=wheel"], cwd=ROOT_DIR)
# copy locally built wheel to build dir
for whl in (ROOT_DIR / "dist").glob("pybricks_jedi-*.whl"):
shutil.copy(whl, BUILD_DIR)
# download transitive dependencies using versions pinned in poetry.lock
transitive_packages = ["jedi", "parso", "docstring-parser", "typing-extensions"]
with open(ROOT_DIR / "poetry.lock", "rb") as f:
lock = tomllib.load(f)
lock_versions = {pkg["name"]: pkg["version"] for pkg in lock["package"]}
transitive = [f"{pkg}=={lock_versions[pkg]}" for pkg in transitive_packages]
subprocess.check_call(
[
sys.executable,
"-m",
"pip",
"download",
"--only-binary=any",
"pybricks-jedi==1.17.0",
],
[sys.executable, "-m", "pip", "download", "--only-binary=any"] + transitive,
cwd=BUILD_DIR,
)
@@ -79,13 +105,8 @@ for whl in BUILD_DIR.glob("*.whl"):
license_identifiers.add(license)
# TODO: The LICENSE workaround for the pybricks-jedi package can be
# dropped after the next release of that package
if whl.name.startswith("pybricks_jedi-"):
LICENSE = (
pathlib.Path(__file__).parent.parent.parent / "jedi" / "LICENSE"
).resolve()
with open(LICENSE) as lf:
with open(ROOT_DIR / "LICENSE") as lf:
license_text[whl.name] = lf.read()
else:
try:
@@ -126,7 +147,4 @@ with open(BUILD_DIR / "LICENSE", "w") as f:
# copy additional files
ROOT_DIR = (pathlib.Path(__file__).parent).resolve()
for file in "README.md", "CHANGELOG.md":
shutil.copy(ROOT_DIR / file, BUILD_DIR / file)
shutil.copy(ROOT_DIR / "README.md", BUILD_DIR / "README.md")
+28 -4
View File
@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
[[package]]
name = "black"
@@ -6,6 +6,7 @@ version = "22.12.0"
description = "The uncompromising code formatter."
optional = false
python-versions = ">=3.7"
groups = ["dev"]
files = [
{file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
{file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
@@ -40,6 +41,7 @@ version = "8.1.8"
description = "Composable command line interface toolkit"
optional = false
python-versions = ">=3.7"
groups = ["dev"]
files = [
{file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"},
{file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"},
@@ -54,6 +56,8 @@ version = "0.4.6"
description = "Cross-platform colored terminal text."
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
groups = ["dev"]
markers = "sys_platform == \"win32\" or platform_system == \"Windows\""
files = [
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
@@ -65,6 +69,7 @@ version = "0.14.1"
description = "Parse Python docstrings in reST, Google and Numpydoc format"
optional = false
python-versions = ">=3.6,<4.0"
groups = ["main"]
files = [
{file = "docstring_parser-0.14.1-py3-none-any.whl", hash = "sha256:14ac6ec1f1ba6905c4d8cb90fd0bc55394f5678183752c90e44812bf28d7a515"},
{file = "docstring_parser-0.14.1.tar.gz", hash = "sha256:2c77522e31b7c88b1ab457a1f3c9ae38947ad719732260ba77ee8a3deb58622a"},
@@ -76,6 +81,8 @@ version = "1.2.2"
description = "Backport of PEP 654 (exception groups)"
optional = false
python-versions = ">=3.7"
groups = ["dev"]
markers = "python_version == \"3.10\""
files = [
{file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"},
{file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"},
@@ -90,6 +97,7 @@ version = "4.0.1"
description = "the modular source code checker: pep8 pyflakes and co"
optional = false
python-versions = ">=3.6"
groups = ["dev"]
files = [
{file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"},
{file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"},
@@ -106,6 +114,7 @@ version = "2.0.0"
description = "brain-dead simple config-ini parsing"
optional = false
python-versions = ">=3.7"
groups = ["dev"]
files = [
{file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
{file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
@@ -117,6 +126,7 @@ version = "0.18.1"
description = "An autocompletion tool for Python that can be used for text editors."
optional = false
python-versions = ">=3.6"
groups = ["main"]
files = [
{file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"},
{file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"},
@@ -135,6 +145,7 @@ version = "0.6.1"
description = "McCabe checker, plugin for flake8"
optional = false
python-versions = "*"
groups = ["dev"]
files = [
{file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"},
{file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"},
@@ -146,6 +157,7 @@ version = "1.0.0"
description = "Type system extensions for programs checked with the mypy type checker."
optional = false
python-versions = ">=3.5"
groups = ["dev"]
files = [
{file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
{file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
@@ -157,6 +169,7 @@ version = "24.2"
description = "Core utilities for Python packages"
optional = false
python-versions = ">=3.8"
groups = ["dev"]
files = [
{file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
{file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
@@ -168,6 +181,7 @@ version = "0.8.4"
description = "A Python Parser"
optional = false
python-versions = ">=3.6"
groups = ["main"]
files = [
{file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"},
{file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"},
@@ -183,6 +197,7 @@ version = "0.12.1"
description = "Utility library for gitignore style pattern matching of file paths."
optional = false
python-versions = ">=3.8"
groups = ["dev"]
files = [
{file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
{file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
@@ -194,6 +209,7 @@ version = "4.3.6"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
optional = false
python-versions = ">=3.8"
groups = ["dev"]
files = [
{file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"},
{file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"},
@@ -210,6 +226,7 @@ version = "1.5.0"
description = "plugin and hook calling mechanisms for python"
optional = false
python-versions = ">=3.8"
groups = ["dev"]
files = [
{file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"},
{file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"},
@@ -221,10 +238,11 @@ testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pybricks"
version = "3.6.0b5"
version = "4.0.0b10"
description = "Documentation and user-API stubs for Pybricks MicroPython"
optional = false
python-versions = "^3.8"
groups = ["main", "dev"]
files = []
develop = true
@@ -238,6 +256,7 @@ version = "2.8.0"
description = "Python style guide checker"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
groups = ["dev"]
files = [
{file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"},
{file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"},
@@ -249,6 +268,7 @@ version = "2.4.0"
description = "passive checker of Python programs"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
groups = ["dev"]
files = [
{file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"},
{file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"},
@@ -260,6 +280,7 @@ version = "7.4.4"
description = "pytest: simple powerful testing with Python"
optional = false
python-versions = ">=3.7"
groups = ["dev"]
files = [
{file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
{file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
@@ -282,6 +303,8 @@ version = "2.2.1"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.8"
groups = ["dev"]
markers = "python_full_version < \"3.11.0a7\""
files = [
{file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
{file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
@@ -323,12 +346,13 @@ version = "4.2.0"
description = "Backported and Experimental Type Hints for Python 3.7+"
optional = false
python-versions = ">=3.7"
groups = ["main"]
files = [
{file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"},
{file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"},
]
[metadata]
lock-version = "2.0"
lock-version = "2.1"
python-versions = ">= 3.10, < 3.12"
content-hash = "0a796ac6867c41e8cf0ce289beca1cebb4066b622c2c538c11589413dcb579af"
content-hash = "6efcdeb3ce02cdd64b69d4d58466e0c7241681aa7f71432bf1a1d53764f305c0"
+5 -3
View File
@@ -1,18 +1,20 @@
[tool.poetry]
name = "pybricks_jedi"
version = "1.17.0"
# Version is set automatically at build time from the root pyproject.toml. Do not edit.
version = "0.0.0"
description = "Code completion for Pybricks."
authors = ["The Pybricks Authors <team@pybricks.com>"]
license = "MIT"
[tool.poetry.dependencies]
python = ">= 3.10, < 3.12"
pybricks = "3.6.0b5"
# Version is set automatically at build time from the root pyproject.toml. Do not edit.
pybricks = "*"
jedi = "0.18.1"
typing-extensions = "4.2.0"
docstring-parser = "0.14.1"
[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
pytest = "^7.1.2"
black = "^22.3.0"
flake8 = "^4.0.1"
+2
View File
@@ -15,6 +15,7 @@ PYBRICKS_CODE_PACKAGES = {
"pybricks",
"pybricks.hubs",
"pybricks.iodevices",
"pybricks.messaging",
"pybricks.parameters",
"pybricks.pupdevices",
"pybricks.robotics",
@@ -490,6 +491,7 @@ def initialize():
"pybricks.ev3dev.speaker",
"pybricks.hubs",
"pybricks.iodevices",
"pybricks.messaging",
"pybricks.parameters",
"pybricks.pupdevices",
"pybricks.robotics",
-2
View File
@@ -5,7 +5,6 @@
Tests for correct code completion of the CityHub class.
"""
import json
from pybricks_jedi import CompletionItem, complete
@@ -33,7 +32,6 @@ def test_hub_dot():
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"battery",
"ble",
"buttons",
"light",
"system",
@@ -5,7 +5,6 @@
Tests for correct code completion of the EssentialHub class.
"""
import json
from pybricks_jedi import CompletionItem, complete
@@ -33,7 +32,6 @@ def test_hub_dot():
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"battery",
"ble",
"buttons",
"charger",
"imu",
+5 -1
View File
@@ -61,6 +61,7 @@ def test_from_pybricks_import():
assert [c["insertText"] for c in completions] == [
"hubs",
"iodevices",
"messaging",
"parameters",
"pupdevices",
"robotics",
@@ -75,6 +76,7 @@ def test_from_pybricks_dot():
assert [c["insertText"] for c in completions] == [
"hubs",
"iodevices",
"messaging",
"parameters",
"pupdevices",
"robotics",
@@ -102,7 +104,6 @@ def test_from_pybricks_iodevices_import():
assert [c["insertText"] for c in completions] == [
"AnalogSensor",
"DCMotor",
"Ev3devSensor",
"I2CDevice",
"LUMPDevice",
"LWP3Device",
@@ -135,12 +136,15 @@ def test_from_pybricks_pupdevices_import():
"ColorLightMatrix",
"ColorSensor",
"DCMotor",
"DuploTrain",
"ForceSensor",
"InfraredSensor",
"Light",
"MarioHub",
"Motor",
"PFMotor",
"Remote",
"TechnicMoveHub",
"TiltSensor",
"UltrasonicSensor",
]
-1
View File
@@ -5,7 +5,6 @@
Tests for correct code completion of the InventorHub class.
"""
import json
from pybricks_jedi import complete, CompletionItem
+61
View File
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 The Pybricks Authors
"""
Tests for correct code completion of the messaging module.
"""
import json
import pytest
from pybricks_jedi import CompletionItem, complete
def test_from_pybricks_messaging_import():
code = "from pybricks.messaging import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"AppData",
"BLERadio",
"BluetoothMailboxClient",
"BluetoothMailboxServer",
"Connection",
"LogicMailbox",
"Mailbox",
"NumericMailbox",
"TextMailbox",
]
def test_ble_radio_dot():
code = "\n".join(
[
"from pybricks.messaging import BLERadio",
"ble = BLERadio()",
"ble.",
]
)
completions: list[CompletionItem] = json.loads(complete(code, 3, 5))
assert [c["insertText"] for c in completions] == [
"broadcast",
"observe",
"signal_strength",
"version",
]
def test_app_data_dot():
code = "\n".join(
[
"from pybricks.messaging import AppData",
"app = AppData([(0, 4)])",
"app.",
]
)
completions: list[CompletionItem] = json.loads(complete(code, 3, 5))
assert [c["insertText"] for c in completions] == [
"close",
"configure",
"get_bytes",
"write_bytes",
]
-2
View File
@@ -5,7 +5,6 @@
Tests for correct code completion of the MoveHub class.
"""
import json
from pybricks_jedi import CompletionItem, complete
@@ -33,7 +32,6 @@ def test_hub_dot():
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"battery",
"ble",
"buttons",
"imu",
"light",
-2
View File
@@ -5,7 +5,6 @@
Tests for correct code completion of the PrimeHub class.
"""
import json
from pybricks_jedi import CompletionItem, complete
@@ -33,7 +32,6 @@ def test_hub_dot():
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"battery",
"ble",
"buttons",
"charger",
"display",

Some files were not shown because too many files have changed in this diff Show More