Compare commits

..
Author SHA1 Message Date
David Lechner ef7fa7bcfc @pybricks/ide-docs v2.6.0 2022-12-09 15:11:03 -06:00
David Lechner edf0f56675 github: simplify release-to-pypi action
We can just let pipx install poetry for us and we don't need a special
Python install or to run `poetry install`.

Also update action versions while we are touching this.
2022-12-09 15:05:10 -06:00
David Lechner 00f1c95ab2 pyproject: v3.2.0c1
Update `pybricks` package version for release to PyPI.
2022-12-09 15:03:27 -06:00
dependabot[bot] 72d55bdbd8 build(deps): bump certifi from 2022.9.24 to 2022.12.7
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 09:21:17 -06:00
Laurens Valk 585b1b8ba3 pybricks.parameters.Side: Change Technic Hub orientation.
This makes it consistent with other hubs.

See: https://github.com/pybricks/support/issues/848

The IMU section was not included in V3.1 so it is not a breaking change,
but we add a versionchanged comment just in case.
2022-12-09 14:23:01 +01:00
Laurens Valk d9dfd0e370 doc/common/extensions: Separate checkmark from image.
This makes it easier to see when the images are small.

Fixes: https://github.com/pybricks/support/issues/838
2022-12-09 08:35:33 +01:00
David Lechner 8bfc2e10c8 doc: Use Pybricks blue.
This changes the navbar background color to use the official Pybricks
blue color.
2022-12-08 17:16:32 -06:00
Laurens Valk e2710157f0 doc/main/hubs: Use width to set scale.
Fixes https://github.com/pybricks/support/issues/844
2022-12-08 20:07:11 +01:00
Laurens Valk 96a3c04836 doc/main/index: Drop links from menu.
Table of contents can't be hidden based on tags, so we just remove them.

Instead, add a note in the body of the standalone version.

Fixes: https://github.com/pybricks/support/issues/839
2022-12-08 09:47:04 +01:00
Laurens Valk 72f5cb6827 micropython: Use separate keys for CTRL + C.
Since each :kbd: key is rendered as a button, it is more intuitive to
render them separately. (There is no CTRL-C button.)

Fixes https://github.com/pybricks/pybricks-api/issues/125
2022-12-08 09:32:08 +01:00
David Lechner e939c14fee docs/main/{prime,essential}hub: Remove beta note.
We are close to final release, so these are no longer considered beta.
2022-12-07 16:31:19 -06:00
David Lechner 3418c8320c doc/common/css/ide: improve styling of field list
The default style of using a grid with two columns wastes space when
displayed in a narrow pane, like in Pybricks Code. Using flex with
column direction makes it flow from top to bottom.

Fixes: https://github.com/pybricks/support/issues/832
2022-12-07 20:21:47 +01:00
Laurens Valk 4da4ce8f7c pybricks.robotics.DriveBase: Add clarifying comments.
Fixes https://github.com/pybricks/support/issues/698
2022-12-06 16:38:31 +01:00
Laurens Valk 6640fba104 npm/jedi: v1.5.0 2022-12-02 15:20:08 +01:00
Laurens Valk ecbfbcfccc jedi/pyproject: v1.5.0 2022-12-02 15:18:10 +01:00
Laurens Valk eff6eaa253 jedi: Add ustruct, json modules. 2022-12-02 15:17:55 +01:00
Laurens Valk f7984a4816 @pybricks/ide-docs v2.5.0 2022-12-02 14:37:50 +01:00
Laurens Valk eac3535d92 npm/jedi: v1.4.0
Update pybricks_jedi Python package to v1.4.0.
2022-12-02 14:36:21 +01:00
Laurens Valk 7fd508cc84 jedi/pyproject: v1.4.0 2022-12-02 14:34:47 +01:00
Laurens Valk 3a12de4766 jedi: update pybricks package to v3.2.0b6 2022-12-02 14:33:16 +01:00
Laurens Valk 5535da5b38 pyproject: v3.2.0b6
Update version for pybricks Python package release.
2022-12-02 14:29:33 +01:00
Laurens Valk ab4d4cc848 pybricks.pupdevices.Motor: Add versionchanged.
Document moving stalled, load, done.
2022-12-02 14:20:51 +01:00
Laurens Valk 82340c3eec jedi: Update tests for stalled, done. 2022-12-02 12:43:24 +01:00
Laurens Valk 14a4fc0d74 pybricks.robotics: Document behavior on shared resources.
Fixes https://github.com/pybricks/pybricks-api/issues/105.
2022-12-02 12:43:24 +01:00
Laurens Valk 99d5210313 pybricks.robotics.DriveBase: Add stalled, done. 2022-12-02 12:43:24 +01:00
Laurens Valk e6d2ce7f62 examples: Update use of done(). 2022-12-02 12:43:24 +01:00
Laurens Valk c3802d38c2 pybricks.ev3devices: Keep motor class in sync.
Let's make sure we keep EV3 pages building.
2022-12-02 12:43:24 +01:00
Laurens Valk ac23a9bb59 pybricks.common.Motor: Document compatibility.
Control methods are not available on Move Hub.

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

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

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

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

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

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

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

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

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

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

And floats are accepted.
2022-11-28 14:50:59 +01:00
Laurens Valk cd2e53f70b ubuiltins: Document max, min. 2022-11-28 14:41:29 +01:00
Laurens Valk e009ff2cbc ubuiltins: Document divmod. 2022-11-28 14:36:02 +01:00
Laurens Valk 4816b58914 ubuiltins: Document zip. 2022-11-28 14:23:55 +01:00
Laurens Valk 875a433182 ubuiltins: Document sorted. 2022-11-28 14:16:51 +01:00
Laurens Valk dc8d029e96 ubuiltins: Document reversed. 2022-11-28 14:05:48 +01:00
Laurens Valk af80c4770e ubuiltins: Document range. 2022-11-28 14:01:40 +01:00
Laurens Valk ddcdc6f745 ubuiltins: Document next. 2022-11-28 13:50:36 +01:00
Laurens Valk 81ac996deb ubuiltins: Fix next.
MICROPY_PY_BUILTINS_NEXT2 is not enabled.
2022-11-28 13:45:48 +01:00
Laurens Valk 84d1d7bf3b ubuiltins: Document iter, enumerate, map. 2022-11-28 12:36:32 +01:00
Laurens Valk 9578fc1035 ubuiltins: Document str. 2022-11-28 11:37:24 +01:00
Laurens Valk 25f427d8bf ubuiltins: Slice instances are not supported. 2022-11-28 11:24:51 +01:00
Laurens Valk 725b6d672c ubuiltins: Document list, tuple. 2022-11-28 11:17:18 +01:00
Laurens Valk 4bc53b17f4 ubuiltins: Document len(). 2022-11-28 11:11:15 +01:00
Laurens Valk 666f2a6b52 .vscode/settings: Set interpreter path.
This way vscode will pick up all the right tools and not complain about
linters not being installed.
2022-11-28 11:07:50 +01:00
Laurens Valk cbf6eb9578 ubuiltins: Document bytes, bytearray, type. 2022-11-28 10:53:53 +01:00
Laurens Valk 7dd3edaee4 jedi/tests: Make PrimeHub the same as InventorHub. 2022-11-22 14:26:25 +01:00
Laurens Valk ef57dbf4a1 pybricks.common.LightMatrix: Rename image() to icon().
Fixes https://github.com/pybricks/support/issues/409
2022-11-22 14:26:15 +01:00
David Lechner 3a60d40bac @pybricks/ide-docs v2.4.0 2022-11-11 11:39:47 -06:00
David Lechner cb0dee3e99 npm/jedi: v1.3.0
Update `pybricks_jedi` Python package to v1.3.0.
2022-11-11 11:36:31 -06:00
David Lechner 19673da32e jedi/pyproject: v1.3.0 2022-11-11 11:31:02 -06:00
David Lechner b8b5652cb6 jedi: update pybricks package to v3.2.0b5 2022-11-11 11:30:01 -06:00
David Lechner 7b4953bc5f pyproject: v3.2.0b5
Update version for `pybricks` Python package release.
2022-11-11 11:24:57 -06:00
David Lechner 62f6fc85a5 jedi: fix code completion for Color and Icon
The pybricks.parameters.Color and Icon types were not working with Jedi
for code completion since the constants were never assigned a value.
2022-11-10 12:23:24 -06:00
Laurens Valk d2b1b2183b pybricks.parameters.Icon: Document it.
Fixes https://github.com/pybricks/pybricks-api/issues/107
2022-11-10 16:38:44 +01:00
David Lechner a236609ebf npm/icons: v1.2.1 2022-11-08 15:06:55 -06:00
Laurens Valk 6c893c136e doc/main/diagrams: Fix City Hub position.
It was accidentally moved to a non-integer position. This causes the PNG to re-render. This increases the file size and makes it looks less crisp.
2022-11-08 19:55:48 +01:00
Laurens Valk f4212f232e doc/main/diagrams: Adjust Move Hub icon scale.
Fixes https://github.com/pybricks/support/issues/773
2022-11-08 19:52:51 +01:00
David Lechner 3a805b0ca9 npm/images: v1.2.0 2022-11-03 13:03:19 -05:00
Laurens Valk c52627cc8f doc/main/diagrams: Add hub icon variants.
This re-exports all hub images in a square format for use as icons while getting correct relative scaling.
2022-11-03 17:07:41 +01:00
David Lechner b84fed1de9 npm/images: add hub-inventor.png file to package 2022-10-28 12:38:07 -05:00
David Lechner d49bc548c7 npm/images: new @pybricks/images package v1.0.0 2022-10-28 12:21:27 -05:00
Barry-Williams 492d6cd2d4 pybricks.robotics.DriveBase: Add basic example. 2022-10-28 08:23:14 +02:00
Laurens Valk be3558167e doc/common/extensions: Fix compatibility labels.
Fixes https://github.com/pybricks/support/issues/754
2022-10-27 15:41:42 +02:00
David Lechner 4573fd2760 LICENSE: update copyright year 2022-10-21 13:14:13 -05:00
David Lechner 2a23c2e81d npm/jedi: v1.1.0
- Update pybricks_jedi Python package dependency.
- Bump JavaScript package version for release.
2022-10-21 13:08:14 -05:00
124 changed files with 2909 additions and 1488 deletions
+23
View File
@@ -0,0 +1,23 @@
name: Release @pybricks/images
on:
push:
tags:
- '@pybricks/images/**'
jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
working-directory: npm/images
- run: yarn publish
working-directory: npm/images/build
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
+4 -11
View File
@@ -6,17 +6,10 @@ on:
jobs:
build_and_publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.6
- run: poetry install
- run: poetry build
- run: poetry publish
- uses: actions/checkout@v3
- run: pipx run poetry build
- run: pipx run poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
+1 -1
View File
@@ -2,7 +2,7 @@
"files.exclude": {
"**/__pycache__": true,
},
"python.defaultInterpreterPath": ".venv/bin/python",
"python.autoComplete.extraPaths": ["jedi/src"],
"python.formatting.provider": "black",
"python.linting.pylintEnabled": false,
+26
View File
@@ -4,6 +4,32 @@
## Unreleased
## 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
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018-2021 The Pybricks Authors
Copyright (c) 2018-2022 The Pybricks Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+2 -2
View File
@@ -16,8 +16,8 @@ help:
.PHONY: help Makefile
diagrams:
@$(MAKE) -C "$(SOURCEDIR)"/diagram_source clean
@$(MAKE) -C "$(SOURCEDIR)"/diagram_source
@$(MAKE) -C "$(SOURCEDIR)"/diagrams_source clean
@$(MAKE) -C "$(SOURCEDIR)"/diagrams_source
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+8
View File
@@ -40,3 +40,11 @@
::-webkit-scrollbar-thumb:hover {
background: #182026;
}
html.writer-html5 .rst-content dl.citation,
html.writer-html5 .rst-content dl.field-list,
html.writer-html5 .rst-content dl.footnote {
display: flex;
flex-direction: column;
grid-template-columns: unset;
}
@@ -41,3 +41,7 @@ span.caption-number:after {
.figure > a.reference.external::after {
content: none !important;
}
.wy-side-nav-search > div.version {
color: hsla(0, 0%, 100%, 0.75);
}
+1
View File
@@ -169,6 +169,7 @@ html_context = {
html_theme_options = {
"style_external_links": True,
"logo_only": True,
"style_nav_header_background": "#0088ce", # Pybricks blue
}
# Add any paths that contain custom static files (such as style sheets) here,
+12 -12
View File
@@ -11,6 +11,7 @@ FEATURES_SMALL = set()
# Medium feature set.
FEATURES_MEDIUM = FEATURES_SMALL | {
"pybricks-geometry",
"pybricks-common-control",
"pybricks-iodevices",
"stm32-extra",
"stm32-float",
@@ -24,8 +25,8 @@ HUB_FEATURES = {
"movehub": {"movehub"} | FEATURES_SMALL,
"cityhub": {"cityhub"} | FEATURES_MEDIUM,
"technichub": {"technichub"} | FEATURES_MEDIUM,
"primehub": {"primehub", "inventorhub"} | FEATURES_LARGE,
"inventorhub": {"primehub", "inventorhub"} | FEATURES_LARGE,
"primehub": {"primehub", "inventorhub", "light-matrix"} | FEATURES_LARGE,
"inventorhub": {"primehub", "inventorhub", "light-matrix"} | FEATURES_LARGE,
"essentialhub": {"essentialhub"} | FEATURES_LARGE,
}
@@ -46,20 +47,19 @@ class PybricksRequirementsStaticDirective(Directive):
makedirs(destdir)
for hub in HUB_FEATURES:
for compat in ("true", "false"):
uri = "compat_{0}_{1}.png".format(hub, compat)
src_uri = path.join(env.app.builder.srcdir, "diagrams", uri)
build_uri = path.join(env.app.builder.outdir, "_images", uri)
copyfile(src_uri, build_uri)
uri = "compat_{0}.png".format(hub)
src_uri = path.join(env.app.builder.srcdir, "diagrams", uri)
build_uri = path.join(env.app.builder.outdir, "_images", uri)
copyfile(src_uri, build_uri)
# Get requirements from sphinx-directive.
requirements = set(self.arguments)
# Cell with image of a hub.
hub_cell = """
<th><div class="align-default">
<img alt="" src="{0}_images/compat_{1}_{2}_label.png">
</div></th>
<th background="{0}_images/compat_{1}.png" class="requirements-table-th requirements-table-th">
{2}
</th>
"""
# Determine how far up the tree we are to set correct image path.
@@ -71,7 +71,7 @@ class PybricksRequirementsStaticDirective(Directive):
compat_row = "".join(
[
hub_cell.format(
depth_path, hub, "true" if requirements <= features else "false"
depth_path, hub, "" if requirements <= features else ""
)
for hub, features in HUB_FEATURES.items()
]
@@ -80,7 +80,7 @@ class PybricksRequirementsStaticDirective(Directive):
# Generate full table.
html = """
<div class="wy-table-responsive">
<table class="docutils align-default">
<table class="docutils align-default requirements-table">
<tbody>
<tr>
{0}
+16
View File
@@ -42,3 +42,19 @@ SOFTWARE. */
margin-bottom: 0px;
}
.requirements-table {
width: 100%;
}
.requirements-table-th {
background-size:contain;
background-repeat: no-repeat;
text-align: right;
padding: 6px !important;
}
.requirements-table-th:after {
content: '';
display: block;
margin-top: 80%;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+1 -1
View File
@@ -24,7 +24,7 @@ cp LPub3D/assem/main_1_hubs_1_hub-prime-*35_-35_0_ABS.png output/hub-prime.png
cp LPub3D/assem/main_1_hubs_1_hub-prime-*45_45_0_ABS.png output/hub-prime-orientation.png
cp LPub3D/assem/main_1_hubs_1_hub-prime-*90_0_0_ABS.png output/hub-prime-display.png
cp LPub3D/assem/main_1_hubs_1_hub-technic-*35_-35_0_ABS.png output/hub-technic.png
cp LPub3D/assem/main_1_hubs_1_hub-technic-*45_-135_0_ABS.png output/hub-technic-orientation.png
cp LPub3D/assem/main_1_hubs_1_hub-technic-*45_45_0_ABS.png output/hub-technic-orientation.png
cp LPub3D/assem/main_1_iodevices-*.png output/iodevice-all.png
cp LPub3D/assem/main_1_iodevices_1_iodevice-dcmotor-*.png output/iodevice-dcmotor.png
cp LPub3D/assem/main_1_iodevices_1_iodevice-pupdevice-*.png output/iodevice-pupdevice.png
+2 -1
View File
@@ -163,7 +163,7 @@
1 71 0 0 0 1 0 0 0 1 0 0 0 1 22127.dat
0 ROTSTEP 35 -35 0 ABS
1 71 0 0 0 1 0 0 0 1 0 0 0 1 22127.dat
0 ROTSTEP 45 -135 0 ABS
0 ROTSTEP 45 45 0 ABS
0 NOFILE
0
0 FILE hub-prime.ldr
@@ -837,5 +837,6 @@
1 0 40 0 220 1 0 0 0 1 0 0 0 1 hub-city.ldr
1 0 450 0 -40 1 0 0 0 1 0 0 0 1 hub-move.ldr
0 ROTSTEP 40 -35 0 ABS
0
0
0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 64 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_cityhub_true.svg"
sodipodi:docname="compat_cityhub.svg"
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"
@@ -40,15 +40,15 @@
inkscape:pageshadow="2"
inkscape:zoom="3.3219805"
inkscape:cx="34.617903"
inkscape:cy="95.726028"
inkscape:cy="95.575516"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1163"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
@@ -75,10 +75,5 @@
y="265.09711"
width="23.382999"
height="26.799999" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_cityhub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.0825819"
inkscape:cx="78.505619"
inkscape:cy="101.70046"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-city.png"
id="image1470"
x="8.0035677"
y="265.09711"
width="23.382999"
height="26.799999" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_essentialhub_true.svg"
sodipodi:docname="compat_essentialhub.svg"
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"
@@ -38,9 +38,9 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="2.3960249"
inkscape:cx="-130.63303"
inkscape:cy="93.696856"
inkscape:zoom="3.4759103"
inkscape:cx="134.0656"
inkscape:cy="60.84737"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -75,10 +75,5 @@
y="267.43524"
width="25.393"
height="22.579" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_essentialhub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1.8719138"
inkscape:cx="1.0684253"
inkscape:cy="79.330578"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-essential.png"
id="image1470"
x="6.9396734"
y="267.43524"
width="25.393"
height="22.579" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_inventorhub_true.svg"
sodipodi:docname="compat_inventorhub.svg"
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"
@@ -38,9 +38,9 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="30.052038"
inkscape:cy="63.260803"
inkscape:zoom="2.6570037"
inkscape:cx="57.583661"
inkscape:cy="87.504583"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -75,10 +75,5 @@
y="262.86874"
width="34.237"
height="31.087999" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_inventorhub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.0079775"
inkscape:cx="56.183931"
inkscape:cy="42.387285"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-inventor.png"
id="image1481"
x="2.6458333"
y="262.86874"
width="34.237"
height="31.087999" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_movehub_true.svg"
sodipodi:docname="compat_movehub.svg"
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"
@@ -38,9 +38,9 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="-61.114229"
inkscape:cy="79.170705"
inkscape:zoom="1.4539184"
inkscape:cx="101.79388"
inkscape:cy="158.5371"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -75,10 +75,5 @@
y="261.79425"
width="38.50182"
height="34.867249" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_movehub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.1282845"
inkscape:cx="30.687746"
inkscape:cy="7.8317686"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0"
showguides="false" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-move.png"
id="image1492"
x="0.67666757"
y="261.79425"
width="38.50182"
height="34.867249" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_primehub_true.svg"
sodipodi:docname="compat_primehub.svg"
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"
@@ -38,9 +38,9 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="-15.152288"
inkscape:cy="104.67706"
inkscape:zoom="2.5665087"
inkscape:cx="-39.742706"
inkscape:cy="115.13696"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -75,10 +75,5 @@
y="263.1333"
width="34.237"
height="31.087999" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_primehub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.4544425"
inkscape:cx="52.975264"
inkscape:cy="68.173085"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-prime.png"
id="image1503"
x="2.6458333"
y="263.1333"
width="34.237"
height="31.087999" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -8,7 +8,7 @@
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_technichub_true.svg"
sodipodi:docname="compat_technichub.svg"
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"
@@ -38,9 +38,9 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="51.517779"
inkscape:cy="94.82807"
inkscape:zoom="1.8594069"
inkscape:cx="-63.461097"
inkscape:cy="62.116582"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -75,10 +75,5 @@
y="263.52396"
width="35.710999"
height="30.552" />
<path
style="fill:none;stroke:#84ba4c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.147057,265.82725 1.011052,2.9815 3.622948,-4.60003"
id="path854"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="150"
height="135"
viewBox="0 0 39.687499 35.718751"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="compat_technichub_false.svg"
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/">
<defs
id="defs881">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1545">
<rect
style="fill:#fe2020;fill-opacity:0.48022599;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
id="rect1547"
width="39.6875"
height="35.71875"
x="-25.390602"
y="312.93103" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#fcfcfc"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.0468564"
inkscape:cx="34.461749"
inkscape:cy="66.133737"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1856"
inkscape:window-height="1136"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata884">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-261.28123)">
<image
xlink:href="../cad/output/hub-technic.png"
id="image1514"
x="2.0608866"
y="263.52396"
width="35.710999"
height="30.552" />
<g
id="g862"
transform="matrix(0.84064533,0,0,0.84993509,-12.416361,243.07822)"
style="stroke-width:1.18304348">
<path
inkscape:connector-curvature="0"
id="path856"
d="m 51.33389,24.998882 5.622395,5.622396"
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#e2302f;stroke-width:1.18304348;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 56.956285,24.998882 51.33389,30.621278"
id="path858"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

+86
View File
@@ -0,0 +1,86 @@
<?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_cityhub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="349"
height="400"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-city.png"
id="image834"
x="90"
y="55" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,86 @@
<?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_essentialhub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="379"
height="338"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-essential.png"
id="image1283"
x="80"
y="80" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,86 @@
<?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_inventorhub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="513"
height="465"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-inventor.png"
id="image1430"
x="7"
y="21" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

+87
View File
@@ -0,0 +1,87 @@
<?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_movehub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="525"
height="475.44"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-move.png"
id="image1015"
x="0"
y="18"
style="stroke-width:1.19048" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,86 @@
<?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_primehub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="513"
height="465"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-prime.png"
id="image1329"
x="7"
y="21" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,87 @@
<?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_technichub.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
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="1"
inkscape:pageshadow="2"
inkscape:window-width="1856"
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="0.9950413"
inkscape:cx="301.49502"
inkscape:cy="344.20682"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="525"
height="447.47662"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-technic.png"
id="image985"
x="0"
y="35.996998"
style="stroke-width:1.01905" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -66,9 +66,9 @@
inkscape:window-height="1136"
id="namedview4"
showgrid="false"
inkscape:zoom="1.0710043"
inkscape:cx="253.96723"
inkscape:cy="270.30703"
inkscape:zoom="0.70516005"
inkscape:cx="286.45979"
inkscape:cy="338.22109"
inkscape:window-x="64"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -76,36 +76,37 @@
inkscape:snap-global="false"
inkscape:pagecheckerboard="0" />
<image
width="362.92642"
height="317.47708"
width="360.79803"
height="329.56876"
preserveAspectRatio="none"
xlink:href="../cad/output/hub-technic-orientation.png"
id="image1727"
x="92.506996"
y="67.242409" />
id="image861"
x="102.51701"
y="59.175568"
style="stroke-width:1.505" />
<rect
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect873"
width="94.047379"
height="42.092525"
x="369.40115"
y="235.02014" />
x="372.33868"
y="256.1105" />
<rect
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect875"
width="94.047379"
height="4"
x="369.40115"
y="235.02014" />
x="372.33868"
y="256.1105" />
<text
id="text879"
y="265.60547"
x="379.37143"
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
y="286.69583"
x="382.30896"
style="font-style:normal;font-weight:normal;font-size:24.1944px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.604861"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054"
y="265.60547"
x="379.37143"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.604861"
y="286.69583"
x="382.30896"
id="tspan877"
sodipodi:role="line">RIGHT</tspan></text>
<path
@@ -165,90 +166,90 @@
y="303.26227"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">BACK</tspan></text>
<rect
y="157.47092"
x="232.60791"
y="144.53636"
x="254.17665"
height="42.092525"
width="67.413025"
id="rect4648"
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="157.47092"
x="232.60791"
y="144.53636"
x="254.17665"
height="4"
width="67.413025"
id="rect4650"
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
x="243.7567"
y="188.05624"
style="font-style:normal;font-weight:normal;font-size:24.1944px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.604861"
x="265.32544"
y="175.12169"
id="text4654"><tspan
sodipodi:role="line"
id="tspan4652"
x="243.7567"
y="188.05624"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">TOP</tspan></text>
x="265.32544"
y="175.12169"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.604861">TOP</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path987"
d="m 218.40482,122.94083 c -16.91553,4.34545 -0.82755,-60.207095 -43.66667,-57.999995"
d="m 209.97456,140.94286 c -16.91553,4.34545 -0.82755,-60.207095 -43.66667,-57.999995"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<rect
y="42.940842"
x="100.96023"
y="60.942871"
x="92.529968"
height="42.092525"
width="80.376648"
id="rect932"
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="42.940842"
x="100.96023"
y="60.942871"
x="92.529968"
height="4"
width="80.376648"
id="rect934"
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
x="113.1997"
y="73.526169"
style="font-style:normal;font-weight:normal;font-size:24.1944px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.604861"
x="104.76944"
y="91.528198"
id="text938"><tspan
sodipodi:role="line"
id="tspan936"
x="113.1997"
y="73.526169"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">LEFT</tspan></text>
x="104.76944"
y="91.528198"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.604861">LEFT</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1114"
d="m 352.17398,396.21985 c -30.79693,19.2617 -138.39669,37.9659 -117.51303,-31.272"
d="m 364.20393,405.65488 c -30.79693,19.2617 -138.39669,37.9659 -117.51303,-31.272"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<rect
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.52250361;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.5225;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect1116"
width="117.09069"
height="42.092525"
x="340.08701"
y="371.42603" />
x="352.11694"
y="380.86105" />
<rect
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.52250361;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.5225;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect1118"
width="117.09069"
height="4"
x="340.08701"
y="371.42603" />
x="352.11694"
y="380.86105" />
<text
id="text1122"
y="402.01135"
x="349.49805"
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
y="411.44638"
x="361.52798"
style="font-style:normal;font-weight:normal;font-size:24.1944px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.604861"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054"
y="402.01135"
x="349.49805"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.604861"
y="411.44638"
x="361.52798"
id="tspan1120"
sodipodi:role="line">BOTTOM</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+18 -21
View File
@@ -26,6 +26,10 @@ Motors
.. automethod:: pybricks.ev3devices.Motor.reset_angle
.. automethod:: pybricks.ev3devices.Motor.load
.. automethod:: pybricks.ev3devices.Motor.stalled
.. rubric:: Stopping
.. automethod:: pybricks.ev3devices.Motor.stop
@@ -34,10 +38,14 @@ Motors
.. automethod:: pybricks.ev3devices.Motor.hold
.. rubric:: Action
.. rubric:: Running forever
.. automethod:: pybricks.ev3devices.Motor.run
.. automethod:: pybricks.ev3devices.Motor.dc
.. rubric:: Running by a fixed amount
.. automethod:: pybricks.ev3devices.Motor.run_time
.. automethod:: pybricks.ev3devices.Motor.run_angle
@@ -48,31 +56,14 @@ Motors
.. automethod:: pybricks.ev3devices.Motor.run_until_stalled
.. automethod:: pybricks.ev3devices.Motor.dc
.. rubric:: Motor status
.. attribute:: control.scale
Number of degrees that the motor turns to complete one degree at the
output of the gear train. This is the gear ratio determined from the
``gears`` argument when initializing the motor.
.. automethod:: pybricks.ev3devices.Motor.control.done
.. automethod:: pybricks.ev3devices.Motor.control.stalled
.. automethod:: pybricks.ev3devices.Motor.control.load
.. automethod:: pybricks.ev3devices.Motor.done
.. rubric:: Motor settings
You can only change these settings while the controller is stopped. For
example, you can change them at the start of your program. Alternatively,
first call :meth:`stop() <pybricks.ev3devices.Motor.stop>`, and then change
the settings.
.. automethod:: pybricks.ev3devices.Motor.settings
.. rubric:: Control settings
.. automethod:: pybricks.ev3devices.Motor.control.limits
.. automethod:: pybricks.ev3devices.Motor.control.pid
@@ -81,6 +72,12 @@ Motors
.. automethod:: pybricks.ev3devices.Motor.control.stall_tolerances
.. attribute:: control.scale
Number of degrees that the motor turns to complete one degree at the
output of the gear train. This is the gear ratio determined from the
``gears`` argument when initializing the motor.
Touch Sensor
^^^^^^^^^^^^
+5 -1
View File
@@ -4,7 +4,7 @@ City Hub
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../main/cad/output/hub-city.png
:height: 15 em
:width: 30%
.. autoclass:: pybricks.hubs.CityHub
:no-members:
@@ -35,6 +35,10 @@ City Hub
.. automethod:: pybricks.hubs::CityHub.system.storage
You can store up to 128 bytes of data on this hub. The data is cleared
when you update the Pybricks firmware or if you restore the original
firmware.
.. automethod:: pybricks.hubs::CityHub.system.shutdown
.. automethod:: pybricks.hubs::CityHub.system.reset_reason
+2 -8
View File
@@ -6,14 +6,6 @@ Essential Hub
.. figure:: ../../main/cad/output/hub-essential.png
:width: 30%
.. note:: Pybricks support for this hub is in beta.
Check the `installation instructions`_ to try it out.
The following functions may change before the final release.
.. _installation instructions: https://pybricks.com/install/
.. autoclass:: pybricks.hubs.EssentialHub
:no-members:
@@ -67,6 +59,8 @@ Essential Hub
.. automethod:: pybricks.hubs::EssentialHub.system.storage
You can store up to 512 bytes of data on this hub.
.. automethod:: pybricks.hubs::EssentialHub.system.shutdown
.. automethod:: pybricks.hubs::EssentialHub.system.reset_reason
+1 -1
View File
@@ -2,7 +2,7 @@ MINDSTORMS EV3 Brick
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../main/cad/output/ev3device-ev3.png
:height: 15 em
:width: 50%
.. autoclass:: pybricks.hubs.EV3Brick
:no-members:
+6 -6
View File
@@ -18,35 +18,35 @@
.. pybricks-classlink:: MoveHub
.. figure:: ../../main/cad/output/hub-move.png
:width: 30%
:width: 40%
:target: movehub.html
.. pybricks-classlink:: CityHub
.. figure:: ../../main/cad/output/hub-city.png
:width: 20%
:width: 25%
:target: cityhub.html
.. pybricks-classlink:: TechnicHub
.. figure:: ../../main/cad/output/hub-technic.png
:width: 25%
:width: 35%
:target: technichub.html
.. pybricks-classlink:: InventorHub PrimeHub
.. figure:: ../../main/cad/output/hub-inventor.png
:width: 25%
:width: 35%
:target: primehub.html
.. pybricks-classlink:: PrimeHub
.. figure:: ../../main/cad/output/hub-prime.png
:width: 25%
:width: 35%
:target: primehub.html
.. pybricks-classlink:: EssentialHub
.. figure:: ../../main/cad/output/hub-essential.png
:width: 20%
:width: 25%
:target: essentialhub.html
+18 -1
View File
@@ -6,7 +6,7 @@ Move Hub
.. _fig_movehub:
.. figure:: ../../main/diagrams/movehub.png
:height: 15 em
:width: 100%
.. autoclass:: pybricks.hubs.MoveHub
:no-members:
@@ -47,6 +47,10 @@ Move Hub
.. automethod:: pybricks.hubs::MoveHub.system.storage
You can store up to 128 bytes of data on this hub. The data is cleared
when you update the Pybricks firmware or if you restore the original
firmware.
.. automethod:: pybricks.hubs::MoveHub.system.shutdown
.. automethod:: pybricks.hubs::MoveHub.system.reset_reason
@@ -95,3 +99,16 @@ Turning the hub off
.. literalinclude::
../../../examples/pup/hub_common/build/system_shutdown_movehub.py
Making random numbers
**************************************************
The Move Hub does not include the :mod:`urandom` module. If you need random
numbers in your application, you can try a variation of the following example.
To make it work better, change the initial value of ``_rand`` to something
that is truly random in your application. You could use the IMU acceleration
or a sensor value, for example.
.. literalinclude::
../../../examples/pup/hub_movehub/randint_implementation.py
+7 -10
View File
@@ -4,12 +4,7 @@ Prime Hub / Inventor Hub
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../main/cad/output/hub-spike-inventor.png
:height: 15 em
.. note:: Pybricks support for these hubs is in beta.
Check the `installation instructions`_ to try it out.
The following functions may change before the final release.
:width: 80%
.. class:: InventorHub
@@ -45,7 +40,7 @@ Prime Hub / Inventor Hub
.. automethod:: pybricks.hubs::PrimeHub.display.pixel
.. automethod:: pybricks.hubs::PrimeHub.display.image
.. automethod:: pybricks.hubs::PrimeHub.display.icon
.. automethod:: pybricks.hubs::PrimeHub.display.animate
@@ -106,6 +101,8 @@ Prime Hub / Inventor Hub
.. automethod:: pybricks.hubs::PrimeHub.system.storage
You can store up to 512 bytes of data on this hub.
.. automethod:: pybricks.hubs::PrimeHub.system.shutdown
.. automethod:: pybricks.hubs::PrimeHub.system.reset_reason
@@ -177,13 +174,15 @@ Changing the display orientation
.. literalinclude::
../../../examples/pup/hub_primehub/display_orientation_imu.py
.. _make_icons:
Making your own images
**********************
.. literalinclude::
../../../examples/pup/hub_primehub/display_matrix.py
Combining images to make expressions
Combining icons to make expressions
************************************
.. literalinclude::
@@ -253,5 +252,3 @@ Turning the hub off
.. literalinclude::
../../../examples/pup/hub_common/build/system_shutdown_primehub.py
.. _installation instructions: https://pybricks.com/install/
+5 -1
View File
@@ -4,7 +4,7 @@ Technic Hub
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../main/cad/output/hub-technic.png
:height: 15 em
:width: 40%
.. autoclass:: pybricks.hubs.TechnicHub
:no-members:
@@ -49,6 +49,10 @@ Technic Hub
.. automethod:: pybricks.hubs::TechnicHub.system.storage
You can store up to 128 bytes of data on this hub. The data is cleared
when you update the Pybricks firmware or if you restore the original
firmware.
.. automethod:: pybricks.hubs::TechnicHub.system.shutdown
.. automethod:: pybricks.hubs::TechnicHub.system.reset_reason
+12 -16
View File
@@ -8,14 +8,22 @@ 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.
To run Pybricks MicroPython scripts, you must install the Pybricks firmware
on your hub. Check `pybricks.com/install`_ to learn how.
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.
.. only:: main
.. note:: You are viewing the stand-alone version of the documentation. To
learn more about Pybricks and to start coding, visit
the `Pybricks website`_
.. note:: Are you using LEGO MINDSTORMS EV3? Check out the
`EV3 documentation`_ instead.
.. _EV3 documentation: https://pybricks.com/ev3-micropython/
.. _Pybricks website: https://pybricks.com/
.. rubric:: Programmable hubs
.. figure:: ../main/cad/output/hub-all.png
@@ -36,25 +44,11 @@ on your hub. Check `pybricks.com/install`_ to learn how.
:width: 70 %
:target: pupdevices/dcmotor.html
.. _support page: https://github.com/pybricks/support/issues/
.. _EV3 documentation: https://pybricks.com/ev3-micropython/
.. _Pybricks website: https://pybricks.com/
.. _pybricks.com/install: https://pybricks.com/install/
.. _latest stable release: https://www.code.pybricks.com/
.. toctree::
:maxdepth: 1
:caption: Table of contents
:hidden:
.. toctree::
:maxdepth: 1
:caption: Pybricks
:hidden:
Home page <https://pybricks.com>
Installation <https://pybricks.com/install/>
.. toctree::
:maxdepth: 1
:caption: Pybricks modules
@@ -79,7 +73,9 @@ on your hub. Check `pybricks.com/install`_ to learn how.
micropython/micropython
micropython/uerrno
micropython/uio
micropython/ujson
micropython/umath
micropython/urandom
micropython/uselect
micropython/ustruct
micropython/usys
+9 -3
View File
@@ -1,3 +1,5 @@
.. pybricks-requirements:: stm32-extra
:mod:`micropython` -- MicroPython internals
===========================================
@@ -6,16 +8,20 @@
.. autofunction:: micropython.const
.. autofunction:: micropython.opt_level
.. autofunction:: micropython.heap_lock
.. autofunction:: micropython.heap_unlock
.. autofunction:: micropython.kbd_intr
.. autofunction:: micropython.mem_info
.. autofunction:: micropython.opt_level
.. autofunction:: micropython.qstr_info
.. autofunction:: micropython.stack_use
.. autofunction:: micropython.kbd_intr
Examples
---------------------
+2 -2
View File
@@ -1,6 +1,6 @@
.. pybricks-requirements:: stm32-extra
:mod:`uio` -- Input/output streams
==================================
.. note:: This module is not available on the BOOST Move Hub.
.. automodule:: uio
+15
View File
@@ -0,0 +1,15 @@
.. pybricks-requirements:: stm32-extra
:mod:`ujson` -- JSON encoding and decoding
===========================================
.. automodule:: ujson
:no-members:
.. autofunction:: ujson.dump
.. autofunction:: ujson.dumps
.. autofunction:: ujson.load
.. autofunction:: ujson.loads
+26
View File
@@ -1,4 +1,30 @@
.. pybricks-requirements:: stm32-extra
:mod:`urandom` -- Pseudo-random numbers
================================================
.. automodule:: urandom
:no-members:
.. rubric:: Basic random numbers
.. autofunction:: randint
.. autofunction:: random
.. rubric:: Random numbers from a range
.. autofunction:: getrandbits
.. autofunction:: randrange
.. autofunction:: uniform
.. rubric:: Random elements from a sequence
.. autofunction:: choice
.. rubric:: Updating the random seed
.. autofunction:: seed
+37
View File
@@ -1,4 +1,41 @@
.. pybricks-requirements:: stm32-extra
:mod:`uselect` -- Wait for events
=================================
.. automodule:: uselect
:no-members:
.. rubric:: Poll instance and class
.. autofunction:: poll
.. autoclass:: Poll
:no-members:
.. automethod:: register
.. automethod:: unregister
.. automethod:: modify
.. automethod:: poll
.. automethod:: ipoll
.. rubric:: Event mask flags
.. autodata:: POLLIN
.. autodata:: POLLOUT
.. autodata:: POLLERR
.. autodata:: POLLHUP
Examples
---------------
See the `projects website`_ for a demo that uses this module.
.. _projects website: https://pybricks.com/projects/tutorials/wireless/hub-to-device/pc-keyboard/
+56
View File
@@ -0,0 +1,56 @@
.. pybricks-requirements:: stm32-extra
:mod:`ustruct` -- Pack and unpack binary data
====================================================
.. automodule:: ustruct
The following byte orders are supported:
+-----------+------------------------+----------+-----------+
| Character | Byte order | Size | Alignment |
+===========+========================+==========+===========+
| @ | native | native | native |
+-----------+------------------------+----------+-----------+
| < | little-endian | standard | none |
+-----------+------------------------+----------+-----------+
| > | big-endian | standard | none |
+-----------+------------------------+----------+-----------+
| ! | network (= big-endian) | standard | none |
+-----------+------------------------+----------+-----------+
The following data types are supported:
+--------+--------------------+-------------+---------------+
| Format | C Type | Python type | Standard size |
+========+====================+=============+===============+
| b | signed char | integer | 1 |
+--------+--------------------+-------------+---------------+
| B | unsigned char | integer | 1 |
+--------+--------------------+-------------+---------------+
| h | short | integer | 2 |
+--------+--------------------+-------------+---------------+
| H | unsigned short | integer | 2 |
+--------+--------------------+-------------+---------------+
| i | int | integer | 4 |
+--------+--------------------+-------------+---------------+
| I | unsigned int | integer | 4 |
+--------+--------------------+-------------+---------------+
| l | long | integer (1) | 4 |
+--------+--------------------+-------------+---------------+
| L | unsigned long | integer (1) | 4 |
+--------+--------------------+-------------+---------------+
| q | long long | integer (1) | 8 |
+--------+--------------------+-------------+---------------+
| Q | unsigned long long | integer (1) | 8 |
+--------+--------------------+-------------+---------------+
| f | float | float | 4 |
+--------+--------------------+-------------+---------------+
| d | double | float | 8 |
+--------+--------------------+-------------+---------------+
| s | char[] | bytes | |
+--------+--------------------+-------------+---------------+
| P | void * | integer | |
+--------+--------------------+-------------+---------------+
- \(1\) Supports values up to +/-1073741823
+35
View File
@@ -5,6 +5,8 @@
This MicroPython module is a subset of the `sys module`_ in Python.
.. rubric:: Input and output streams
.. module:: usys
.. autodata:: usys.stdin
@@ -16,4 +18,37 @@ This MicroPython module is a subset of the `sys module`_ in Python.
.. autodata:: usys.stderr
:annotation:
.. rubric:: Version info
.. autodata:: implementation
:annotation:
.. autodata:: version
:annotation:
.. autodata:: version_info
:annotation:
Examples
---------------
Version information
*******************************
.. literalinclude::
../../../examples/micropython/usys/pybricks_version.py
.. literalinclude::
../../../examples/micropython/usys/micropython_version.py
Standard input and output
*******************************
The ``stdin`` stream can be used to capture input via the Pybricks Code
input/output window. See the `keyboard input`_ project to learn how this works.
This approach can be extended to exchange data with any `other device`_ as well.
.. _keyboard input: https://pybricks.com/projects/tutorials/wireless/hub-to-device/pc-keyboard/
.. _other device: https://pybricks.com/projects/tutorials/wireless/hub-to-device/
.. _sys module: https://docs.python.org/3.5/library/sys.html
+8
View File
@@ -0,0 +1,8 @@
.. pybricks-requirements:: light-matrix
Icon
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: pybricks.parameters.Icon
See the :ref:`make_icons` section for examples.
+3
View File
@@ -13,6 +13,7 @@
button
color
direction
icon
port
side
stop
@@ -23,6 +24,8 @@
.. pybricks-classlink:: Direction
.. pybricks-classlink:: Icon
.. pybricks-classlink:: Port
.. pybricks-classlink:: Side
+10 -6
View File
@@ -34,29 +34,33 @@ Side
**Prime Hub**
.. figure:: ../../main/diagrams/orientation_primehub.png
:height: 17 em
:width: 60%
**Inventor Hub**
.. figure:: ../../main/diagrams/orientation_inventorhub.png
:height: 17 em
:width: 60%
**Essential Hub**
.. figure:: ../../main/diagrams/orientation_essentialhub.png
:height: 17 em
:width: 60%
**Move Hub**
.. figure:: ../../main/diagrams/orientation_movehub.png
:height: 17 em
:width: 60%
**Technic Hub**
.. figure:: ../../main/diagrams/orientation_technichub.png
:height: 17 em
:width: 60%
.. versionchanged:: 3.2
Changed which side is the front.
**Tilt Sensor**
.. figure:: ../../main/diagrams/orientation_tiltsensor.png
:height: 17 em
:width: 50%
+8 -2
View File
@@ -10,14 +10,20 @@ Stop
.. autoattribute:: pybricks.parameters.Stop.COAST
:annotation:
.. autoattribute:: pybricks.parameters.Stop.COAST_SMART
:annotation:
.. autoattribute:: pybricks.parameters.Stop.BRAKE
:annotation:
.. autoattribute:: pybricks.parameters.Stop.HOLD
:annotation:
The following table shows how each stop type adds an extra level of
resistance to motion. In these examples, ``m`` is a
.. autoattribute:: pybricks.parameters.Stop.NONE
:annotation:
The following table shows how each of the basic stop types add an extra
level of resistance to motion. In these examples, ``m`` is a
:class:`Motor <pybricks.pupdevices.Motor>` and
and ``d`` is a :class:`DriveBase <pybricks.robotics.DriveBase>`. The
examples also show how running at zero speed compares to these stop types.
+36 -23
View File
@@ -24,6 +24,10 @@ Motors with rotation sensors
.. automethod:: pybricks.pupdevices.Motor.reset_angle
.. automethod:: pybricks.pupdevices.Motor.load
.. automethod:: pybricks.pupdevices.Motor.stalled
.. rubric:: Stopping
.. automethod:: pybricks.pupdevices.Motor.stop
@@ -32,10 +36,14 @@ Motors with rotation sensors
.. automethod:: pybricks.pupdevices.Motor.hold
.. rubric:: Action
.. rubric:: Running forever
.. automethod:: pybricks.pupdevices.Motor.run
.. automethod:: pybricks.pupdevices.Motor.dc
.. rubric:: Running by a fixed amount
.. automethod:: pybricks.pupdevices.Motor.run_time
.. automethod:: pybricks.pupdevices.Motor.run_angle
@@ -46,11 +54,33 @@ Motors with rotation sensors
.. automethod:: pybricks.pupdevices.Motor.run_until_stalled
.. automethod:: pybricks.pupdevices.Motor.dc
.. automethod:: pybricks.pupdevices.Motor.done
.. _settings:
.. rubric:: Motor status
.. rubric:: Motor settings
.. automethod:: pybricks.pupdevices.Motor.settings
.. rubric:: Control settings
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.limits
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.pid
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.target_tolerances
.. pybricks-requirements:: pybricks-common-control
.. automethod:: pybricks.pupdevices.Motor.control.stall_tolerances
.. pybricks-requirements:: pybricks-common-control
.. attribute:: control.scale
@@ -58,27 +88,10 @@ Motors with rotation sensors
output of the gear train. This is the gear ratio determined from the
``gears`` argument when initializing the motor.
.. automethod:: pybricks.pupdevices.Motor.control.done
.. versionchanged:: 3.2
.. automethod:: pybricks.pupdevices.Motor.control.stalled
.. automethod:: pybricks.pupdevices.Motor.control.load
.. rubric:: Motor settings
You can only change these settings while the controller is stopped. For
example, you can change them at the start of your program. Alternatively,
first call :meth:`stop() <pybricks.pupdevices.Motor.stop>`, and then change the settings.
.. automethod:: pybricks.pupdevices.Motor.settings
.. automethod:: pybricks.pupdevices.Motor.control.limits
.. automethod:: pybricks.pupdevices.Motor.control.pid
.. automethod:: pybricks.pupdevices.Motor.control.target_tolerances
.. automethod:: pybricks.pupdevices.Motor.control.stall_tolerances
The :meth:`done`, :meth:`stalled` and :meth:`load` methods have been
moved.
Initialization examples
-----------------------
+30 -10
View File
@@ -10,7 +10,7 @@
.. autoclass:: pybricks.robotics.DriveBase
:no-members:
.. rubric:: Driving for a given distance or by an angle
.. rubric:: Driving by a given distance or angle
Use the following commands to drive a given distance, or turn by a
given angle.
@@ -26,6 +26,8 @@
.. automethod:: pybricks.robotics.DriveBase.settings
.. automethod:: pybricks.robotics.DriveBase.done
.. rubric:: Drive forever
Use :meth:`.drive` to begin driving at a desired speed and steering.
@@ -48,6 +50,10 @@
.. automethod:: pybricks.robotics.DriveBase.reset
.. automethod:: pybricks.robotics.DriveBase.stalled
.. _measuring:
.. rubric:: Measuring and validating the robot dimensions
As a first estimate, you can measure the ``wheel_diameter`` and the
@@ -55,6 +61,11 @@
effectively touch the ground, you can estimate the ``axle_track`` as
the distance between the midpoint of the wheels.
If you don't have a ruler, you can use a LEGO beam to measure. The
center-to-center distance of the holes is 8 mm. For some tyres, the
diameter is printed on the side. For example, 62.4 x 20 means that the
diameter is 62.4mm and that the width is 20 mm.
In practice, most wheels compress slightly under the weight of your robot.
To verify, make your robot drive 1000 mm using ``my_robot.straight(1000)``
and measure how far it really traveled. Compensate as follows:
@@ -80,15 +91,11 @@
.. rubric:: Using the DriveBase motors individually
Suppose you make a :class:`.DriveBase` object using two ``Motor`` objects called
``left_motor`` and ``right_motor``. You **cannot** use these motors
individually while the DriveBase is **active**.
The DriveBase is active if it is driving, but also when it is actively
holding the wheels in place after a :meth:`.straight` or
:meth:`.turn` command.
To deactivate the :class:`.DriveBase`, call :meth:`.stop`.
After creating a :class:`.DriveBase` object, you can still use its two
motors individually. If you start one motor, the other motor will
automatically stop. Likewise, if a motor is already running and you make
the drive base move, the original maneuver is cancelled and the drive base
will take over.
.. rubric:: Advanced settings
@@ -104,3 +111,16 @@
.. autoattribute:: pybricks.robotics.DriveBase.heading_control
:annotation:
.. versionchanged:: 3.2
The :meth:`done` and :meth:`stalled` methods have been moved.
Examples
-------------------
Driving straight and turning in place
**********************************************
.. literalinclude::
../../examples/pup/robotics/drivebase_basics.py
-2
View File
@@ -260,5 +260,3 @@ Fahrenheit (°F) or Kelvin (K), you can use the following conversion formulas:
hue: deg
--------------
Hue of a color (0-359 degrees).
TODO: diagram
@@ -0,0 +1,10 @@
import usys
# ('micropython', (1, 19, 1), 'SPIKE Essential Hub with STM32F413RG', 6)
print(usys.implementation)
# '3.4.0; Pybricks MicroPython v3.2.0b5 on 2022-11-11'
print(usys.version)
# (3, 4, 0)
print(usys.version_info)
@@ -0,0 +1,4 @@
from pybricks import version
# ('essentialhub', '3.2.0b5', 'v3.2.0b5 on 2022-11-11')
print(version)
@@ -0,0 +1,19 @@
from pybricks.hubs import MoveHub
# Initialize the hub.
hub = MoveHub()
# Initialize "random" seed.
_rand = hub.battery.voltage() + hub.battery.current()
# Return a random integer N such that a <= N <= b.
def randint(a, b):
global _rand
_rand = 75 * _rand % 65537 # Lehmer
return _rand * (b - a + 1) // 65537 + a
# Generate a few example numbers.
for i in range(5):
print(randint(0, 1000))
+4 -4
View File
@@ -12,7 +12,7 @@ while not any(pressed):
wait(10)
# Display a circle.
hub.display.image(Icon.CIRCLE)
hub.display.icon(Icon.CIRCLE)
# Wait for all buttons to be released.
while any(hub.buttons.pressed()):
@@ -20,10 +20,10 @@ while any(hub.buttons.pressed()):
# Display an arrow to indicate which button was pressed.
if Button.LEFT in pressed:
hub.display.image(Icon.ARROW_LEFT_DOWN)
hub.display.icon(Icon.ARROW_LEFT_DOWN)
elif Button.RIGHT in pressed:
hub.display.image(Icon.ARROW_RIGHT_DOWN)
hub.display.icon(Icon.ARROW_RIGHT_DOWN)
elif Button.BLUETOOTH in pressed:
hub.display.image(Icon.ARROW_RIGHT_UP)
hub.display.icon(Icon.ARROW_RIGHT_UP)
wait(3000)
@@ -24,11 +24,9 @@ while True:
for i in range(3):
# Display eyes open plus the random brows.
hub.display.image(Icon.EYE_LEFT + Icon.EYE_RIGHT + brows)
hub.display.icon(Icon.EYE_LEFT + Icon.EYE_RIGHT + brows)
wait(2000)
# Display eyes blinked plus the random brows.
hub.display.image(
Icon.EYE_LEFT_BLINK * 0.7 + Icon.EYE_RIGHT_BLINK * 0.7 + brows
)
hub.display.icon(Icon.EYE_LEFT_BLINK * 0.7 + Icon.EYE_RIGHT_BLINK * 0.7 + brows)
wait(200)
+2 -2
View File
@@ -6,13 +6,13 @@ from pybricks.parameters import Icon
hub = PrimeHub()
# Display a big arrow pointing up.
hub.display.image(Icon.UP)
hub.display.icon(Icon.UP)
# Wait so we can see what is displayed.
wait(2000)
# Display a heart at half brightness.
hub.display.image(Icon.HEART / 2)
hub.display.icon(Icon.HEART / 2)
# Wait so we can see what is displayed.
wait(2000)
+2 -2
View File
@@ -17,7 +17,7 @@ SQUARE = Matrix(
)
# Display the square.
hub.display.image(SQUARE)
hub.display.icon(SQUARE)
wait(3000)
# Make an image using a Python list comprehension. In this image, the
@@ -26,5 +26,5 @@ wait(3000)
GRADIENT = Matrix([[(r + c) for c in range(5)] for r in range(5)]) * 12.5
# Display the generated gradient.
hub.display.image(GRADIENT)
hub.display.icon(GRADIENT)
wait(3000)
@@ -14,6 +14,6 @@ while True:
hub.display.orientation(up_side)
# Display something, like an arrow.
hub.display.image(Icon.UP)
hub.display.icon(Icon.UP)
wait(10)
@@ -12,7 +12,7 @@ gripper_motor.run_angle(200, 720, wait=False)
# While one or both of the motors are not done yet,
# do something else. In this example, just wait.
while not track_motor.control.done() or not gripper_motor.control.done():
while not track_motor.done() or not gripper_motor.done():
wait(10)
print("Both motors are done!")
+24
View File
@@ -0,0 +1,24 @@
from pybricks.pupdevices import Motor
from pybricks.parameters import Port, Direction
from pybricks.robotics import DriveBase
# Initialize both motors. In this example, the motor on the
# left must turn counterclockwise to make the robot go forward.
left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE)
right_motor = Motor(Port.B)
# Initialize the drive base. In this example, the wheel diameter is 56mm.
# The distance between the two wheel-ground contact points is 112mm.
drive_base = DriveBase(left_motor, right_motor, wheel_diameter=56, axle_track=112)
# Drive forward by 500mm (half a meter).
drive_base.straight(500)
# Turn around clockwise (180 degrees)
drive_base.turn(180)
# Drive forward again to drive back.
drive_base.straight(500)
# Turn around counterclockwise.
drive_base.turn(-180)
+18
View File
@@ -4,6 +4,24 @@
## Unreleased
## 1.5.0 - 2022-12-02
### Changed
- Added `ujson` and `ustruct` modules.
## 1.4.0 - 2022-12-02
### Changed
- Updated `pybricks` package to v3.2.0b6.
## 1.3.0 - 2022-11-11
### Changed
- Updated `pybricks` package to v3.2.0b5.
### Fixed
- Fixed code completion for `Color` and `Icon` classes in `pybricks.parameters`.
## 1.2.0 - 2022-10-21
### Added
+67 -79
View File
@@ -1,39 +1,31 @@
[[package]]
name = "atomicwrites"
version = "1.4.0"
description = "Atomic file writes."
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "attrs"
version = "21.4.0"
version = "22.1.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
python-versions = ">=3.5"
[package.extras]
dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"]
dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"]
tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"]
tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
[[package]]
name = "black"
version = "22.3.0"
version = "22.10.0"
description = "The uncompromising code formatter."
category = "dev"
optional = false
python-versions = ">=3.6.2"
python-versions = ">=3.7"
[package.dependencies]
click = ">=8.0.0"
mypy-extensions = ">=0.4.3"
pathspec = ">=0.9.0"
platformdirs = ">=2"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
[package.extras]
colorama = ["colorama (>=0.4.3)"]
@@ -54,11 +46,11 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "colorama"
version = "0.4.5"
version = "0.4.6"
description = "Cross-platform colored terminal text."
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
[[package]]
name = "docstring-parser"
@@ -68,6 +60,17 @@ category = "main"
optional = false
python-versions = ">=3.6,<4.0"
[[package]]
name = "exceptiongroup"
version = "1.0.4"
description = "Backport of PEP 654 (exception groups)"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.extras]
test = ["pytest (>=6)"]
[[package]]
name = "flake8"
version = "4.0.1"
@@ -145,23 +148,23 @@ testing = ["docopt", "pytest (<6.0.0)"]
[[package]]
name = "pathspec"
version = "0.9.0"
version = "0.10.2"
description = "Utility library for gitignore style pattern matching of file paths."
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
python-versions = ">=3.7"
[[package]]
name = "platformdirs"
version = "2.5.2"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
version = "2.5.4"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = ">=3.7"
[package.extras]
docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"]
test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"]
docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.4)"]
test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
[[package]]
name = "pluggy"
@@ -175,17 +178,9 @@ python-versions = ">=3.6"
dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "py"
version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pybricks"
version = "3.2.0b4"
version = "3.2.0b6"
description = "Documentation and user-API stubs for Pybricks MicroPython"
category = "main"
optional = false
@@ -225,21 +220,20 @@ diagrams = ["jinja2", "railroad-diagrams"]
[[package]]
name = "pytest"
version = "7.1.2"
version = "7.2.0"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.dependencies]
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
py = ">=1.8.2"
tomli = ">=1.0.0"
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
[package.extras]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
@@ -263,54 +257,52 @@ python-versions = ">=3.7"
[metadata]
lock-version = "1.1"
python-versions = ">= 3.10, < 3.11"
content-hash = "f3cd92de360fc68d8bc8ad0999eb5d0591e7f33dc5f20a32409b3787cac71965"
content-hash = "a0626d7e1cf972e4716f8122865c1d4b6355e1a5104b6f538da2c1cb44ba792c"
[metadata.files]
atomicwrites = [
{file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
{file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
]
attrs = [
{file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
{file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
{file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"},
{file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
]
black = [
{file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"},
{file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"},
{file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"},
{file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"},
{file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"},
{file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"},
{file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"},
{file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"},
{file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"},
{file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"},
{file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"},
{file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"},
{file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"},
{file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"},
{file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"},
{file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"},
{file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"},
{file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"},
{file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"},
{file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"},
{file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"},
{file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"},
{file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"},
{file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"},
{file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"},
{file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"},
{file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"},
{file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"},
{file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"},
{file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"},
{file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"},
{file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"},
{file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"},
{file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"},
{file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"},
{file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"},
{file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"},
{file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"},
{file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"},
{file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"},
{file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"},
{file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"},
{file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"},
{file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"},
]
click = [
{file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
{file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
]
colorama = [
{file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
{file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
]
docstring-parser = [
{file = "docstring_parser-0.14.1-py3-none-any.whl", hash = "sha256:14ac6ec1f1ba6905c4d8cb90fd0bc55394f5678183752c90e44812bf28d7a515"},
{file = "docstring_parser-0.14.1.tar.gz", hash = "sha256:2c77522e31b7c88b1ab457a1f3c9ae38947ad719732260ba77ee8a3deb58622a"},
]
exceptiongroup = [
{file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
{file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
]
flake8 = [
{file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"},
{file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"},
@@ -340,21 +332,17 @@ parso = [
{file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"},
]
pathspec = [
{file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"},
{file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"},
{file = "pathspec-0.10.2-py3-none-any.whl", hash = "sha256:88c2606f2c1e818b978540f73ecc908e13999c6c3a383daf3705652ae79807a5"},
{file = "pathspec-0.10.2.tar.gz", hash = "sha256:8f6bf73e5758fd365ef5d58ce09ac7c27d2833a8d7da51712eac6e27e35141b0"},
]
platformdirs = [
{file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"},
{file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"},
{file = "platformdirs-2.5.4-py3-none-any.whl", hash = "sha256:af0276409f9a02373d540bf8480021a048711d572745aef4b7842dad245eba10"},
{file = "platformdirs-2.5.4.tar.gz", hash = "sha256:1006647646d80f16130f052404c6b901e80ee4ed6bef6792e1f238a8969106f7"},
]
pluggy = [
{file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
{file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
]
py = [
{file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
{file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
]
pybricks = []
pycodestyle = [
{file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"},
@@ -369,8 +357,8 @@ pyparsing = [
{file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"},
]
pytest = [
{file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"},
{file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"},
{file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
{file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
]
tomli = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+2 -2
View File
@@ -1,13 +1,13 @@
[tool.poetry]
name = "pybricks_jedi"
version = "1.2.0"
version = "1.5.0"
description = "Code completion for Pybricks."
authors = ["The Pybricks Authors"]
license = "MIT"
[tool.poetry.dependencies]
python = ">= 3.10, < 3.11"
pybricks = "3.2.0b4"
pybricks = "3.2.0b6"
jedi = "0.18.1"
typing-extensions = "4.2.0"
docstring-parser = "0.14.1"
+2
View File
@@ -21,9 +21,11 @@ PYBRICKS_CODE_PACKAGES = {
"pybricks.tools",
"uerrno",
"uio",
"ujson",
"umath",
"urandom",
"uselect",
"ustruct",
"usys",
}
+33 -1
View File
@@ -18,9 +18,11 @@ def test_from():
"pybricks",
"uerrno",
"uio",
"ujson",
"umath",
"urandom",
"uselect",
"ustruct",
"usys",
]
@@ -149,6 +151,8 @@ def test_from_micropython_import():
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"const",
"heap_lock",
"heap_unlock",
"kbd_intr",
"mem_info",
"opt_level",
@@ -184,6 +188,19 @@ def test_from_uio_import():
]
def test_from_ujson_import():
code = "from ujson import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"decode", # FIXME: Shouldn't be here
"dump",
"dumps",
"encode", # FIXME: Shouldn't be here
"load",
"loads",
]
def test_from_umath_import():
code = "from umath import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
@@ -236,8 +253,8 @@ def test_from_uselect_import():
code = "from uselect import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"poll",
"Poll",
"poll",
"POLLERR",
"POLLHUP",
"POLLIN",
@@ -245,11 +262,26 @@ def test_from_uselect_import():
]
def test_from_ustruct_import():
code = "from ustruct import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"calcsize",
"pack",
"pack_into",
"unpack",
"unpack_from",
]
def test_from_usys_import():
code = "from usys import "
completions: list[CompletionItem] = json.loads(complete(code, 1, len(code) + 1))
assert [c["insertText"] for c in completions] == [
"implementation",
"stderr",
"stdin",
"stdout",
"version",
"version_info",
]
+12 -109
View File
@@ -27,113 +27,16 @@ def _create_snippet(line: str) -> str:
return "\n".join((IMPORT, CREATE_INSTANCE, line))
def test_hub_dot():
line = "hub."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"battery",
"buttons",
"charger",
"display",
"imu",
"light",
"speaker",
"system",
]
# Everything else is the same as the Prime Hub.
def test_hub_dot_battery_dot():
line = "hub.battery."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"current",
"voltage",
]
def test_hub_dot_buttons_dot():
line = "hub.buttons."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"pressed",
]
def test_hub_dot_charger_dot():
line = "hub.charger."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"connected",
"current",
"status",
]
def test_hub_dot_display_dot():
line = "hub.display."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"animate",
"char",
"image",
"number",
"off",
"orientation",
"pixel",
"text",
]
def test_hub_dot_imu_dot():
line = "hub.imu."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"acceleration",
"angular_velocity",
"heading",
"reset_heading",
"tilt",
"up",
]
def test_hub_dot_light_dot():
line = "hub.light."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"animate",
"blink",
"off",
"on",
]
def test_hub_dot_speaker_dot():
line = "hub.speaker."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"beep",
"play_notes",
"volume",
]
def test_hub_dot_system_dot():
line = "hub.system."
code = _create_snippet(line)
completions: list[CompletionItem] = json.loads(complete(code, 3, len(line) + 1))
assert [c["insertText"] for c in completions] == [
"name",
"reset_reason",
"set_stop_button",
"shutdown",
"storage",
]
from test_complete_prime_hub import ( # noqa F401
test_hub_dot,
test_hub_dot_battery_dot,
test_hub_dot_buttons_dot,
test_hub_dot_charger_dot,
test_hub_dot_display_dot,
test_hub_dot_imu_dot,
test_hub_dot_light_dot,
test_hub_dot_speaker_dot,
test_hub_dot_system_dot,
)
+139
View File
@@ -0,0 +1,139 @@
import json
import pytest
from pybricks_jedi import CompletionItem, complete
def _create_snippet(class_name: str) -> str:
"""
Creates a code snippet::
from pybricks.parameters import {class_name}
{class_name}.
Args:
line: The value substituted for ``{class_name}``
"""
return "\n".join(
(f"from pybricks.parameters import {class_name}", f"{class_name}.")
)
ENUMS = [
pytest.param(
"Button",
[
"BEACON",
"BLUETOOTH",
"CENTER",
"DOWN",
"LEFT",
"LEFT_DOWN",
"LEFT_MINUS",
"LEFT_PLUS",
"LEFT_UP",
"RIGHT",
"RIGHT_DOWN",
"RIGHT_MINUS",
"RIGHT_PLUS",
"RIGHT_UP",
"UP",
],
),
pytest.param(
"Color",
[
"BLACK",
"BLUE",
"BROWN",
"CYAN",
"GRAY",
"GREEN",
"MAGENTA",
"NONE",
"ORANGE",
"RED",
"VIOLET",
"WHITE",
"YELLOW",
],
),
pytest.param("Direction", ["CLOCKWISE", "COUNTERCLOCKWISE"]),
pytest.param(
"Icon",
[
"ARROW_DOWN",
"ARROW_LEFT",
"ARROW_LEFT_DOWN",
"ARROW_LEFT_UP",
"ARROW_RIGHT",
"ARROW_RIGHT_DOWN",
"ARROW_RIGHT_UP",
"ARROW_UP",
"CIRCLE",
"CLOCKWISE",
"COUNTERCLOCKWISE",
"DOWN",
"EMPTY",
"EYE_LEFT",
"EYE_LEFT_BLINK",
"EYE_LEFT_BROW",
"EYE_LEFT_BROW_UP",
"EYE_RIGHT",
"EYE_RIGHT_BLINK",
"EYE_RIGHT_BROW",
"EYE_RIGHT_BROW_UP",
"FALSE",
"FULL",
"HAPPY",
"HEART",
"LEFT",
"PAUSE",
"RIGHT",
"SAD",
"SQUARE",
"TRIANGLE_DOWN",
"TRIANGLE_LEFT",
"TRIANGLE_RIGHT",
"TRIANGLE_UP",
"TRUE",
"UP",
],
),
pytest.param("Port", ["A", "B", "C", "D", "E", "F", "S1", "S2", "S3", "S4"]),
pytest.param("Side", ["BACK", "BOTTOM", "FRONT", "LEFT", "RIGHT", "TOP"]),
pytest.param("Stop", ["BRAKE", "COAST", "COAST_SMART", "HOLD", "NONE"]),
]
@pytest.mark.parametrize("class_name,members", ENUMS)
def test_get_parameter_class_member_completion(class_name: str, members: list[str]):
code = _create_snippet(class_name)
completions: list[CompletionItem] = json.loads(
complete(code, 2, len(class_name) + 2)
)
assert [c["insertText"] for c in completions] == members
def test_get_parameter_color_completion():
code = "\n".join(["from pybricks.parameters import Color", "Color.RED."])
completions: list[CompletionItem] = json.loads(complete(code, 2, 11))
assert [c["insertText"] for c in completions] == [
"BLACK",
"BLUE",
"BROWN",
"CYAN",
"GRAY",
"GREEN",
"h",
"MAGENTA",
"NONE",
"ORANGE",
"RED",
"s",
"v",
"VIOLET",
"WHITE",
"YELLOW",
]
+1 -1
View File
@@ -80,7 +80,7 @@ def test_hub_dot_display_dot():
assert [c["insertText"] for c in completions] == [
"animate",
"char",
"image",
"icon",
"number",
"off",
"orientation",

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