Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf59ef4478 | ||
|
|
6b1f7d8eaa | ||
|
|
df27ebc27e | ||
|
|
b471cae0bc | ||
|
|
eb7f441c9e | ||
|
|
dca8518575 |
@@ -1,2 +0,0 @@
|
||||
|
||||
github: [pybricks]
|
||||
@@ -1,36 +0,0 @@
|
||||
name: pybricks_jedi
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
if: github.ref_type != 'tag'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- run: pipx install poetry
|
||||
- run: poetry install
|
||||
working-directory: ./jedi
|
||||
- run: poetry run pytest -vv
|
||||
working-directory: ./jedi
|
||||
|
||||
publish:
|
||||
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'pybricks_jedi/')
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- run: pipx install poetry
|
||||
- run: poetry install
|
||||
working-directory: ./jedi
|
||||
- run: poetry build
|
||||
working-directory: ./jedi
|
||||
- run: poetry publish
|
||||
working-directory: ./jedi
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PYBRICKS_JEDI_TOKEN }}
|
||||
@@ -1,38 +0,0 @@
|
||||
name: Release @pybricks/ide-docs
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@pybricks/ide-docs/**'
|
||||
|
||||
jobs:
|
||||
publish_ide_docs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Ubuntu packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry run python -m pip install --upgrade pip
|
||||
poetry run python -m pip install --upgrade setuptools
|
||||
poetry install
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: yarn build
|
||||
working-directory: npm/ide-docs
|
||||
- run: yarn publish
|
||||
working-directory: npm/ide-docs
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Release @pybricks/jedi
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@pybricks/jedi/**'
|
||||
|
||||
jobs:
|
||||
publish_ide_docs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# 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/jedi
|
||||
- run: yarn publish
|
||||
working-directory: npm/jedi/build
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
||||
@@ -1,26 +1,14 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Build Python package and docs
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- "*"
|
||||
pull_request:
|
||||
paths:
|
||||
- doc/**
|
||||
- src/**
|
||||
- poetry.lock
|
||||
- poetry.toml
|
||||
- pyproject.toml
|
||||
- setup.cfg
|
||||
name: Python package
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8, 3.9]
|
||||
@@ -44,12 +32,6 @@ jobs:
|
||||
- name: Build package
|
||||
run: poetry build
|
||||
- name: Lint docs
|
||||
run: poetry run doc8
|
||||
- name: Build html docs for Read the Docs
|
||||
run: poetry run doc8 --extension .inc
|
||||
- name: Build html docs
|
||||
run: poetry run make -C doc html
|
||||
- name: Install IDE docs dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
|
||||
- name: Build html docs for Pybricks Code IDE
|
||||
run: poetry run make -C doc html TAG=ide
|
||||
@@ -1,22 +0,0 @@
|
||||
name: Release to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: ubuntu-20.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
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
|
||||
@@ -26,9 +26,8 @@ build/
|
||||
build-*/
|
||||
_build/
|
||||
|
||||
# Tests
|
||||
# Test failure outputs
|
||||
######################
|
||||
.pytest_cache/
|
||||
tests/*.exp
|
||||
tests/*.out
|
||||
|
||||
@@ -58,4 +57,3 @@ genrst/
|
||||
# Virtual environment
|
||||
######################
|
||||
.venv/
|
||||
.python-version
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[submodule "pybricks-projects"]
|
||||
path = pybricks-projects
|
||||
url = https://github.com/pybricks/pybricks-projects
|
||||
[submodule "media/ev3dev-media"]
|
||||
path = media/ev3dev-media
|
||||
url = https://github.com/ev3dev/ev3dev-media.git
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# .readthedocs.yaml
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
#
|
||||
# Settings in the readthedocs online dashboard will be ignored.
|
||||
|
||||
# Required
|
||||
version: 2
|
||||
|
||||
# Build documentation in the doc/main directory with Sphinx
|
||||
sphinx:
|
||||
configuration: doc/main/conf.py
|
||||
|
||||
# Build your docs in additional formats such as PDF
|
||||
formats:
|
||||
- pdf
|
||||
|
||||
# Set the version of Python and requirements required to build the docs
|
||||
python:
|
||||
version: 3.8
|
||||
install:
|
||||
- requirements: rtd-requirements.txt
|
||||
@@ -1,26 +1,12 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/__pycache__": true,
|
||||
},
|
||||
|
||||
"python.autoComplete.extraPaths": ["jedi/src"],
|
||||
"python.pythonPath": "${workspaceFolder}/.venv",
|
||||
"python.formatting.provider": "black",
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.pycodestyleEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"[python]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "ms-python.python"
|
||||
},
|
||||
"python.languageServer": "Pylance",
|
||||
"python.testing.pytestArgs": [
|
||||
"jedi/tests"
|
||||
],
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.pytestEnabled": true,
|
||||
"files.associations": {"*.inc": "restructuredtext"},
|
||||
"restructuredtext.confPath": "${workspaceFolder}/doc/main",
|
||||
"restructuredtext.confPath": "${workspaceFolder}/doc/api",
|
||||
"spellright.language": [
|
||||
"en_US"
|
||||
],
|
||||
@@ -48,12 +34,5 @@
|
||||
"plaintext",
|
||||
"python",
|
||||
"restructuredtext",
|
||||
],
|
||||
"rewrap.wrappingColumn": 78,
|
||||
"python.analysis.extraPaths": [
|
||||
"jedi/src"
|
||||
],
|
||||
"yaml.schemas": {
|
||||
"https://json.schemastore.org/github-workflow.json": "file:///home/david/work/pybricks/pybricks-api/.github/workflows/build.yml"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ builtins
|
||||
cdot
|
||||
Celcius
|
||||
cityhub
|
||||
technichub
|
||||
cplushub
|
||||
de
|
||||
dev
|
||||
en
|
||||
@@ -78,4 +78,3 @@ thermistor
|
||||
toctree
|
||||
TODO
|
||||
UART
|
||||
utf-8
|
||||
|
||||
@@ -2,131 +2,11 @@
|
||||
|
||||
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
|
||||
|
||||
## Unreleased
|
||||
## 2.0.0.post2
|
||||
|
||||
### Added
|
||||
- Code auto-completion for `EssentialHub`.
|
||||
|
||||
### Fixed
|
||||
- Fixed some type hints in `parameters` submodule.
|
||||
|
||||
## 3.2.0b1-r3 - 2022-06-26
|
||||
|
||||
### Fixed
|
||||
- Fixed more type hints and improved compatibility with jedi.
|
||||
|
||||
## 3.2.0b1-r2 - 2022-06-24
|
||||
|
||||
### Changed
|
||||
- Moved remaining type hints from `.pyi` files to the python stub modules, and
|
||||
fixed numerous errors in the type hints throughout.
|
||||
|
||||
## 3.2.0b1-r1 - 2022-06-09
|
||||
|
||||
## Added
|
||||
- Added `__init__.py` to `pybricks` package.
|
||||
|
||||
## 3.2.0b1 - 2022-06-02
|
||||
|
||||
### Added
|
||||
- Code auto-completion for `hub.charger`, `hub.imu` and `hub.system`.
|
||||
- Moved typing from several `.pyi` files to the actual python modules.
|
||||
- Added this changelog.
|
||||
|
||||
### Fixed
|
||||
- Fixed code completion for `DCMotor` and `Motor` classes in MS Python VS Code extension.
|
||||
- Fixed missing `DCMotor` type in `ev3devices`.
|
||||
- Fixed type hint for `Motor.reset_angle()` in `pupdevices`.
|
||||
|
||||
### Changed
|
||||
- Setter for acceleration can now also be used to set acceleration and
|
||||
deceleration to different values, using a two-valued tuple.
|
||||
|
||||
## 3.1.0 - 2021-12-16
|
||||
|
||||
### Added
|
||||
- Added maximum voltage setter for `DCMotor` and `Motor`.
|
||||
- Documented `DriveBase.curve()` method.
|
||||
|
||||
### Changed
|
||||
- Removed `duty` setting from `Control.limits` method.
|
||||
- Removed `integral_range` setting from `Control.pid` method.
|
||||
|
||||
### Fixed
|
||||
- Fixed link to Color Light Matrix page.
|
||||
- Fixed link to Inventor Hub page.
|
||||
|
||||
## 3.1.0rc1 - 2021-11-19
|
||||
|
||||
### Added
|
||||
- Added `ColorLightMatrix` class.
|
||||
- Added `LWP3Device` class.
|
||||
|
||||
**NOTE: version number after this point were from JavaScript package and do
|
||||
not correspond to Pybricks firmware version numbers.**
|
||||
|
||||
## 1.6.0 - 2021-08-30
|
||||
|
||||
### Added
|
||||
- MicroPython module documentation.
|
||||
- Examples for hub system functions including stop button and shutdown.
|
||||
|
||||
### Changed
|
||||
- Build IDE docs as main docs with minor changes, instead of a completely
|
||||
separate build.
|
||||
- Moved motor control documentation to the motor page.
|
||||
|
||||
## 1.5.0 - 2021-07-01
|
||||
|
||||
### Added
|
||||
- Documentation for Powered Up Remote Control.
|
||||
|
||||
## 1.4.0 - 2021-06-23
|
||||
|
||||
### Added
|
||||
- Enabled beta content that was hidden for the 3.0 release.
|
||||
- Added notice about using the latest beta version.
|
||||
|
||||
## 1.3.3 - 2021-05-21
|
||||
|
||||
### Changed
|
||||
- Match example snippet styling to IDE.
|
||||
- Add more examples.
|
||||
|
||||
## 1.3.2 - 2021-04-26
|
||||
|
||||
## Changed
|
||||
- Theme style fixes.
|
||||
- Example code fixes
|
||||
- Match doc version to firmware version.
|
||||
|
||||
## 1.3.1 - 2021-04-12
|
||||
|
||||
### Changed
|
||||
- Upgrade sphinx and rtd-theme to fix style issues.
|
||||
|
||||
## 1.3.0 - 2021-04-12
|
||||
|
||||
### Removed
|
||||
- Removed features which not be in the official 3.0 release. These features
|
||||
are still in beta. They'll come back in future releases once tested.
|
||||
|
||||
## 1.2.0 - 2021-04-09
|
||||
|
||||
### Changed
|
||||
- Moved installation guide to external site.
|
||||
|
||||
## 1.1.1 - 2021-02-14
|
||||
|
||||
### Added
|
||||
- Added installation guide.
|
||||
- Various documentation fixes.
|
||||
|
||||
## 1.1.0 - 2021-01-28
|
||||
|
||||
### Added
|
||||
- Scrollbar styling.
|
||||
|
||||
## 1.0.0 - 2021-01-25
|
||||
|
||||
### Added
|
||||
- Sphinx build output.
|
||||
|
||||
@@ -20,103 +20,23 @@ will actually be implemented.
|
||||
|
||||
- Commit messages have a one-line subject, a blank line and a multiline body:
|
||||
|
||||
prefix: Subject of the change.
|
||||
prefix: subject
|
||||
|
||||
body...
|
||||
|
||||
- Use a prefix to categorize the change:
|
||||
- Use the import path as the prefix whenever possible. Examples:
|
||||
- pybricks.tools: Add StopWatch class.
|
||||
- pybricks.tools: Reorganize RST files.
|
||||
- pybricks.tools.StopWatch: Fix return type.
|
||||
- pybricks.tools.wait: Add example of waiting.
|
||||
- pybricks.pupdevices: Fix all sensor class ports.
|
||||
- umath.sin: Fix spelling of Hypotenuse.
|
||||
- If an import path makes no sense, just use the file path without
|
||||
extensions:
|
||||
- .vscode/settings: Fix file associations.
|
||||
- The subject briefly describes _what_ was changed. Use a short full sentence
|
||||
as in the examples above.
|
||||
- Use a prefix to categorize the change. Usually this is the path the the file
|
||||
being changed.
|
||||
- If it is a documentation change, it can be shortened to `doc/<file>` (omit
|
||||
`api` from the path).
|
||||
- If it is an API change (in the `pybricks` folder), write `api/<file>`
|
||||
instead of `pybricks/<file>`.
|
||||
- The subject briefly describes _what_ was changed, e.g. `fix typo`.
|
||||
- The body describes _why_ the change was made, e.g. `The word "sensor" was
|
||||
spelled incorrectly`.
|
||||
- See the [commit history][commits] for more examples.
|
||||
|
||||
[commits]: https://github.com/pybricks/pybricks-api/commits/master
|
||||
|
||||
**General docstring principles:**
|
||||
|
||||
The stubs libraries in this repository have two different purposes:
|
||||
1. Auto-generating documentation with Sphinx. For this purpose, the
|
||||
documentation should be concise and clear.
|
||||
2. Provide autocomplete and intellisense in code editors. For this purpose,
|
||||
the code needs to be 100% correct. This way, computers can parse your code
|
||||
correctly and tell you when something is wrong.
|
||||
|
||||
Since these objectives don't always align, we address these separately in the
|
||||
stubs library:
|
||||
|
||||
1. The first line(s) of the docstring contain the function or method signature
|
||||
as it should be displayed in the human-readable documentation.
|
||||
2. The real function signature can be as complex as it needs to be to make it
|
||||
correct for intellisense. Overloads can be uses if needed.
|
||||
|
||||
In the rare case where the docstring signature is the same as the typed
|
||||
version, we'll still include it for consistency.
|
||||
|
||||
**Docstring details:**
|
||||
|
||||
Make sure to look at existing function signatures and docstrings for
|
||||
inspiration when documenting new functionality. As an example, consider:
|
||||
|
||||
```python
|
||||
def run_until_stalled(
|
||||
self,
|
||||
speed: Number,
|
||||
then: Stop = Stop.COAST,
|
||||
duty_limit: Optional[Number] = None,
|
||||
) -> int:
|
||||
"""
|
||||
run_until_stalled(speed, then=Stop.COAST, duty_limit=None) -> int: deg
|
||||
|
||||
Runs the motor at a constant speed until it stalls.
|
||||
|
||||
Arguments:
|
||||
speed (Number, deg/s): Speed of the motor.
|
||||
then (Stop): What to do after coming to a standstill.
|
||||
duty_limit (Number, %): Duty cycle limit during this
|
||||
command. This is useful to avoid applying the full motor
|
||||
torque to a geared or lever mechanism. If it is ``None``, the
|
||||
duty limit won't be changed during this command.
|
||||
|
||||
Returns:
|
||||
Angle at which the motor becomes stalled.
|
||||
"""
|
||||
```
|
||||
The real method signature at the top contains the full detail, including the
|
||||
type of each argument and return value.
|
||||
|
||||
The docstring starts with the signature. Use more than one signature if needed
|
||||
to represent overloaded methods. The signatures are written in the way they
|
||||
should be displayed in the docs:
|
||||
- Argument types are omitted because they are also shown with the argument
|
||||
description below.
|
||||
- Default values should be given (``then=Stop.COAST``).
|
||||
- The return type should be given (``-> int``). When applicable, include
|
||||
the unit of the return value, so it becomes ``-> int: deg``
|
||||
|
||||
Then follows a concise description of what this method, function, or class
|
||||
does.
|
||||
|
||||
Then follows a list of arguments:
|
||||
- For each argument, include the expected type and unit if applicable, e.g.
|
||||
``(int)`` or ``(Number, deg/s)``.
|
||||
- Use ``Number`` when ``int`` and ``float`` are both allowed.
|
||||
- If the description is long, use the indentation shown above.
|
||||
- Make it readable. Instead
|
||||
of ``Union[float, SupportsFloat, complex, SupportsComplex]``,
|
||||
just say _float or complex_.
|
||||
|
||||
Then follows a description of the return value. The type is omitted here since
|
||||
it is already include in the docstring signature.
|
||||
|
||||
**Development environment:**
|
||||
|
||||
@@ -126,8 +46,8 @@ Prerequisites:
|
||||
- [Python 3][python]
|
||||
- [Poetry][poetry]
|
||||
|
||||
Information on installing prerequisites can be found on the
|
||||
[pybricks-micropython contributor's guide][contributing].
|
||||
Information on installing prerequisites can be found on the [pybricks-micropython
|
||||
wiki][wiki].
|
||||
|
||||
Initial setup:
|
||||
|
||||
@@ -139,24 +59,15 @@ Build docs:
|
||||
|
||||
# Linux
|
||||
poetry run make -C doc html
|
||||
xdg-open doc/main/build/html/index.html
|
||||
xdg-open doc/api/build/html/index.html
|
||||
|
||||
# macOS
|
||||
poetry run make -C doc html
|
||||
open doc/main/build/html/index.html
|
||||
open doc/api/build/html/index.html
|
||||
|
||||
# Windows (PowerShell)
|
||||
poetry run doc\make.bat html
|
||||
Invoke-Item doc\main\build\html\index.html
|
||||
|
||||
Building IDE docs variant:
|
||||
|
||||
# Linux/macOS
|
||||
poetry run make -C doc html TAG=ide
|
||||
|
||||
# Windows (PowerShell)
|
||||
$env:TAG="ide"
|
||||
poetry run doc\make.bat html
|
||||
Invoke-Item doc\api\build\html\index.html
|
||||
|
||||
Linting:
|
||||
|
||||
@@ -167,4 +78,4 @@ Linting:
|
||||
[git]: https://git-scm.com/
|
||||
[python]: https://www.python.org/
|
||||
[poetry]: https://python-poetry.org/
|
||||
[contributing]: https://github.com/pybricks/pybricks-micropython/blob/master/CONTRIBUTING.md
|
||||
[wiki]: https://github.com/pybricks-micropython/wiki
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018-2021 The Pybricks Authors
|
||||
Copyright (c) 2018-2020 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
|
||||
|
||||
@@ -5,13 +5,12 @@
|
||||
SPHINXOPTS = -W
|
||||
SPHINXBUILD = sphinx-build
|
||||
SPHINXPROJ = Pybricks
|
||||
SOURCEDIR = main
|
||||
SOURCEDIR = api
|
||||
BUILDDIR = "$(SOURCEDIR)"/build
|
||||
TAG = main
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(TAG) $(O)
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
@@ -22,4 +21,4 @@ diagrams:
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -t $(TAG) $(O)
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Pybricks documentation build configuration file
|
||||
#
|
||||
import os
|
||||
|
||||
# General information about the project.
|
||||
project = 'pybricks-micropython'
|
||||
copyright = '2018-2020 The Pybricks Authors'
|
||||
author = ''
|
||||
|
||||
_TITLE = 'Pybricks Modules and Examples'
|
||||
_DISCLAIMER = 'LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are\
|
||||
trademarks and/or copyrights of the LEGO Group of companies \
|
||||
which does not sponsor, authorize or endorse this site.'
|
||||
|
||||
html_logo = '../common/images/pybricks-logo-rtd.png'
|
||||
latex_logo = '../common/images/pybricks-logo-large.png'
|
||||
|
||||
exec(open(os.path.abspath("../common/conf.py")).read())
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,11 @@
|
||||
0 Name: pupmotors
|
||||
0 Author: Pybricks {laurens@pybricks.com}
|
||||
0 !LICENSE MIT
|
||||
1 15 -420 -56 -250 1 0 0 0 1 0 0 0 1 26910.dat
|
||||
1 15 10 -80 140 1 0 0 0 1 0 0 0 1 28738.dat
|
||||
1 71 -270 -40 630 1 0 0 0 1 0 0 0 1 22127.dat
|
||||
1 15 200 -96 600 -1 0 0 0 1 0 0 0 -1 28739.dat
|
||||
1 15 470 -16 -90 1 0 0 0 1 0 0 0 1 45601p02.dat
|
||||
1 15 -800 -40 360 1 0 0 0 1 0 0 0 1 95646c01.dat
|
||||
1 15 -1160 32 -310 1 0 0 0 1 0 0 0 1 53788c01.dat
|
||||
1 71 -1340 -40 430 1 0 0 0 1 0 0 0 1 87576c01.dat
|
||||
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 259 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,8 @@
|
||||
0 Name: pupmotors
|
||||
0 Author: Pybricks {laurens@pybricks.com}
|
||||
0 !LICENSE MIT
|
||||
1 15 430 -96 190 0 0 1 1 0 0 0 1 0 54675c01.dat
|
||||
1 15 410 -72 30 0 0 1 1 0 0 0 1 0 54696c01.dat
|
||||
1 71 230 -144 0 1 0 0 0 1 0 0 0 1 22169c01.dat
|
||||
1 71 40 -216 0 1 0 0 0 1 0 0 0 1 22172c01.dat
|
||||
1 15 -140 -320 80 1 0 0 0 1 0 0 0 1 26913c01.dat
|
||||
|
After Width: | Height: | Size: 576 KiB |
@@ -11,8 +11,8 @@
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="2000"
|
||||
height="1126"
|
||||
viewBox="0 0 529.16666 297.92083"
|
||||
height="610"
|
||||
viewBox="0 0 529.16666 161.39583"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
@@ -57,9 +57,9 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="930.75599"
|
||||
inkscape:cy="703.45816"
|
||||
inkscape:zoom="0.49497475"
|
||||
inkscape:cx="899.69341"
|
||||
inkscape:cy="449.26412"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
@@ -87,18 +87,18 @@
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,0.92084997)">
|
||||
transform="translate(0,-135.60415)">
|
||||
<image
|
||||
sodipodi:absref="pupmotors.png"
|
||||
xlink:href="pupmotors.png"
|
||||
y="-0.92085403"
|
||||
x="0"
|
||||
id="image876"
|
||||
y="135.60416"
|
||||
x="-2.220446e-16"
|
||||
id="image853"
|
||||
preserveAspectRatio="none"
|
||||
height="297.92084"
|
||||
height="161.39583"
|
||||
width="529.16669" />
|
||||
<g
|
||||
transform="matrix(1.9732825,0,0,1.9732825,94.897251,-184.86922)"
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-10.059646,-179.85595)"
|
||||
id="g2717">
|
||||
<g
|
||||
transform="matrix(1,-0.27773651,0,1,59.387949,102.27922)"
|
||||
@@ -123,7 +123,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g2727"
|
||||
transform="matrix(1.7059944,0,0,1.7059944,-93.696445,-190.67567)">
|
||||
transform="matrix(1.7059944,0,0,1.7059944,79.305221,-182.52003)">
|
||||
<g
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:#fffbfb;stroke-width:0.13229167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g2721"
|
||||
@@ -147,7 +147,7 @@
|
||||
sodipodi:nodetypes="ccccsc" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(1.7059944,0,0,1.7059944,105.45138,-208.37975)"
|
||||
transform="matrix(1.7059944,0,0,1.7059944,125.04034,-119.77598)"
|
||||
id="g2747">
|
||||
<g
|
||||
transform="matrix(1,-0.27773651,0,1,61.231459,102.02783)"
|
||||
@@ -173,7 +173,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g2757"
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-99.624267,-179.081)">
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-108.71143,-177.21012)">
|
||||
<g
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:#fffbfb;stroke-width:0.13229167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g2751"
|
||||
@@ -196,7 +196,7 @@
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-253.27985,-174.39985)"
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-212.65488,-179.47797)"
|
||||
id="g2767">
|
||||
<g
|
||||
transform="matrix(1,-0.27773651,0,1,59.387949,102.27922)"
|
||||
@@ -219,85 +219,5 @@
|
||||
id="path2765"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g874"
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-208.72093,-333.33743)">
|
||||
<g
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:#fffbfb;stroke-width:0.13229167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g868"
|
||||
transform="matrix(1,-0.27773651,0,1,59.387949,102.27922)">
|
||||
<path
|
||||
id="path866"
|
||||
style="fill:#2980b9;fill-opacity:1;fill-rule:evenodd;stroke:#fffbfb;stroke-width:0.13229167;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 107.60315,149.3339 -4.4195,12.01847 -4.419489,-12.01847 c 2.609269,1.92005 6.179199,1.90899 8.838989,0 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path870"
|
||||
d="m 148.90956,215.29575 c -8.02867,2.89572 -14.60635,11.81219 -14.60635,19.93021 l 1.74541,-0.62952 c 0,-7.05178 5.7198,-14.86961 12.86094,-17.44522 7.14113,-2.57561 12.86094,1.11628 12.86094,8.16806 l 1.74541,-0.62952 c 0,-8.11802 -6.57768,-12.28973 -14.60635,-9.39401 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2980b9;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path872"
|
||||
d="m 161.70224,224.65346 1.85836,-0.53454 0.43431,0.40926 -0.98973,1.42822 c 0,0 -2.13398,-0.30486 -2.13398,-0.32574 0,-0.0209 0.83104,-0.9772 0.83104,-0.9772 z"
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(1.9732825,0,0,1.9732825,-103.63433,-335.34319)"
|
||||
id="g884">
|
||||
<g
|
||||
transform="matrix(1,-0.27773651,0,1,59.387949,102.27922)"
|
||||
id="g878"
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:#fffbfb;stroke-width:0.13229167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 107.60315,149.3339 -4.4195,12.01847 -4.419489,-12.01847 c 2.609269,1.92005 6.179199,1.90899 8.838989,0 z"
|
||||
style="fill:#2980b9;fill-opacity:1;fill-rule:evenodd;stroke:#fffbfb;stroke-width:0.13229167;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path876" />
|
||||
</g>
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2980b9;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 148.90956,215.29575 c -8.02867,2.89572 -14.60635,11.81219 -14.60635,19.93021 l 1.74541,-0.62952 c 0,-7.05178 5.7198,-14.86961 12.86094,-17.44522 7.14113,-2.57561 12.86094,1.11628 12.86094,8.16806 l 1.74541,-0.62952 c 0,-8.11802 -6.57768,-12.28973 -14.60635,-9.39401 z"
|
||||
id="path880"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 161.70224,224.65346 1.85836,-0.53454 0.43431,0.40926 -0.98973,1.42822 c 0,0 -2.13398,-0.30486 -2.13398,-0.32574 0,-0.0209 0.83104,-0.9772 0.83104,-0.9772 z"
|
||||
id="path882"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<ellipse
|
||||
style="fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.68220371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:75.59054565;stroke-opacity:1"
|
||||
id="path886"
|
||||
cx="158.78319"
|
||||
cy="17.35313"
|
||||
rx="1.295833"
|
||||
ry="1.1623898"
|
||||
transform="matrix(0.89702138,0.44198716,0,1,0,0)" />
|
||||
<g
|
||||
id="g899"
|
||||
transform="matrix(1.9732825,0,0,1.9732825,15.03334,-338.81769)">
|
||||
<g
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:#fffbfb;stroke-width:0.13229167;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g893"
|
||||
transform="matrix(1,-0.27773651,0,1,59.387949,102.27922)">
|
||||
<path
|
||||
id="path891"
|
||||
style="fill:#2980b9;fill-opacity:1;fill-rule:evenodd;stroke:#fffbfb;stroke-width:0.13229167;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 107.60315,149.3339 -4.4195,12.01847 -4.419489,-12.01847 c 2.609269,1.92005 6.179199,1.90899 8.838989,0 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path895"
|
||||
d="m 148.90956,215.29575 c -8.02867,2.89572 -14.60635,11.81219 -14.60635,19.93021 l 1.74541,-0.62952 c 0,-7.05178 5.7198,-14.86961 12.86094,-17.44522 7.14113,-2.57561 12.86094,1.11628 12.86094,8.16806 l 1.74541,-0.62952 c 0,-8.11802 -6.57768,-12.28973 -14.60635,-9.39401 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2980b9;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path897"
|
||||
d="m 161.70224,224.65346 1.85836,-0.53454 0.43431,0.40926 -0.98973,1.42822 c 0,0 -2.13398,-0.30486 -2.13398,-0.32574 0,-0.0209 0.83104,-0.9772 0.83104,-0.9772 z"
|
||||
style="fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,12 @@
|
||||
0 Name: pupmotors
|
||||
0 Author: Pybricks {laurens@pybricks.com}
|
||||
0 !LICENSE MIT
|
||||
1 15 600 -280 240 -1 0 0 0 -1 0 0 0 1 37316c01.dat
|
||||
1 15 60 -272 160 -1 0 0 0 -1 0 0 0 1 37312c01.dat
|
||||
1 15 -400 -280 240 -1 0 0 0 -1 0 0 0 1 37308c01.dat
|
||||
1 0 -400 -310 -374 -1 0 0 0 -1 0 0 0 1 u9218c01.dat
|
||||
1 15 -400 -320 -410 0 0 1 0 1 0 -1 0 0 20841.dat
|
||||
1 15 630 -320 -420 1 0 0 0 1 0 0 0 1 26912.dat
|
||||
1 0 630 -310 -384 -1 0 0 0 -1 0 0 0 1 u9218c01.dat
|
||||
1 15 60 -320 -430 0 0 1 0 1 0 -1 0 0 20844.dat
|
||||
1 0 60 -310 -394 -1 0 0 0 -1 0 0 0 1 u9218c01.dat
|
||||
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@@ -76,7 +76,7 @@
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="false" />
|
||||
<image
|
||||
sodipodi:absref="terminal.png"
|
||||
sodipodi:absref="/home/laurens/pybricks/git/pybricks-api/doc/api/diagram_source/terminal.png"
|
||||
xlink:href="terminal.png"
|
||||
width="967.99994"
|
||||
height="402"
|
||||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -1,4 +1,4 @@
|
||||
:mod:`ev3devices <pybricks.ev3devices>` -- EV3 devices
|
||||
:mod:`ev3devices <pybricks.ev3devices>` -- EV3 Devices
|
||||
======================================================
|
||||
|
||||
.. automodule:: pybricks.ev3devices
|
||||
@@ -9,13 +9,12 @@ Motors
|
||||
|
||||
.. _fig_ev3motors:
|
||||
|
||||
.. figure:: ../main/images/ev3motors_label.png
|
||||
.. figure:: ../api/images/ev3motors_label.png
|
||||
:width: 100 %
|
||||
|
||||
EV3-compatible motors. The arrows indicate the default positive direction.
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.Motor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Measuring
|
||||
@@ -44,47 +43,22 @@ Motors
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_target
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.track_target
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_until_stalled
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.dc
|
||||
|
||||
.. rubric:: Motor status
|
||||
.. rubric:: Advanced motion control
|
||||
|
||||
.. attribute:: control.scale
|
||||
.. automethod:: pybricks.ev3devices.Motor.track_target
|
||||
|
||||
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.
|
||||
.. autoattribute:: pybricks.ev3devices.Motor.control
|
||||
:annotation:
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.done
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.stalled
|
||||
|
||||
.. automethod:: pybricks.ev3devices.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.ev3devices.Motor.stop>`, and then change
|
||||
the settings.
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.settings
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.limits
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.pid
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.target_tolerances
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.stall_tolerances
|
||||
|
||||
Touch Sensor
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/images/sensor_ev3_touch.png
|
||||
.. figure:: ../api/images/sensor_ev3_touch.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.TouchSensor
|
||||
@@ -92,7 +66,7 @@ Touch Sensor
|
||||
Color Sensor
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/images/sensor_ev3_color.png
|
||||
.. figure:: ../api/images/sensor_ev3_color.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.ColorSensor
|
||||
@@ -100,11 +74,7 @@ Color Sensor
|
||||
Infrared Sensor and Beacon
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Each method of this class puts the sensor in a different *mode*. Switching
|
||||
modes takes about one second on this sensor. To make sure that your program
|
||||
runs quickly, use only of these methods in your program.
|
||||
|
||||
.. figure:: ../main/images/sensor_ev3_ir.png
|
||||
.. figure:: ../api/images/sensor_ev3_ir.png
|
||||
:width: 60 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.InfraredSensor
|
||||
@@ -112,7 +82,7 @@ runs quickly, use only of these methods in your program.
|
||||
Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/images/sensor_ev3_ultrasonic.png
|
||||
.. figure:: ../api/images/sensor_ev3_ultrasonic.png
|
||||
:width: 22 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.UltrasonicSensor
|
||||
@@ -120,7 +90,7 @@ Ultrasonic Sensor
|
||||
Gyroscopic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/images/sensor_ev3_gyro.png
|
||||
.. figure:: ../api/images/sensor_ev3_gyro.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.GyroSensor
|
||||
@@ -0,0 +1,32 @@
|
||||
Working with vectors
|
||||
====================
|
||||
|
||||
Scalars and Vectors
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. _scalar:
|
||||
|
||||
scalar
|
||||
--------------
|
||||
|
||||
TODO
|
||||
|
||||
.. _vector:
|
||||
|
||||
vector
|
||||
--------------
|
||||
|
||||
TODO
|
||||
|
||||
Robot reference frame
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. _robotframe:
|
||||
|
||||
Robot reference frame
|
||||
----------------------
|
||||
|
||||
TODO (explanation, diagram, etc)::
|
||||
* X: To the right
|
||||
* Y: forward
|
||||
* Z: upward
|
||||
@@ -0,0 +1,18 @@
|
||||
:mod:`hubs <pybricks.hubs>` -- Programmable Hubs
|
||||
================================================
|
||||
|
||||
.. module:: pybricks.hubs
|
||||
|
||||
.. _fig_hubs:
|
||||
|
||||
Select your programmable hub using the buttons below.
|
||||
|
||||
.. content-tabs::
|
||||
|
||||
.. tab-container:: ev3brick
|
||||
:title: EV3 Brick
|
||||
|
||||
.. figure:: ../api/images/ev3brick.png
|
||||
:height: 15 em
|
||||
|
||||
.. include:: hubs_ev3brick.inc
|
||||
@@ -0,0 +1,230 @@
|
||||
.. autoclass:: pybricks.hubs.EV3Brick
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Using the buttons
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.buttons.pressed
|
||||
|
||||
.. rubric:: Using the brick status light
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.light.on
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Turn the light on and change the color.**
|
||||
|
||||
.. literalinclude::
|
||||
../../pybricks-projects/snippets/ev3/light_color/main.py
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.light.off
|
||||
|
||||
.. rubric:: Using the speaker
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.beep
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_notes
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide musical note format**
|
||||
|
||||
Each note is a string with the following format:
|
||||
|
||||
- The first character is the name of the note, ``A`` to ``G``
|
||||
or ``R`` for a rest.
|
||||
- Note names can also include an accidental ``#`` (sharp) or
|
||||
``b`` (flat). ``B#``/``Cb`` and ``E#``/``Fb`` are not
|
||||
allowed.
|
||||
- The note name is followed by the octave number ``2``
|
||||
to ``8``. For example ``C4`` is middle C. The octave changes
|
||||
to the next number at the note C, for example, ``B3`` is the
|
||||
note below middle C (``C4``).
|
||||
- The octave is followed by ``/`` and a number that indicates
|
||||
the size of the note. For example ``/4`` is a quarter note,
|
||||
``/8`` is an eighth note and so on.
|
||||
- This can optionally followed by a ``.`` to make a dotted
|
||||
note. Dotted notes are 1-1/2 times as long as notes without a
|
||||
dot.
|
||||
- The note can optionally end with a ``_`` which is a tie or a
|
||||
slur. This causes there to be no pause between this note and
|
||||
the next note.
|
||||
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_file
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.say
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_speech_options
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide available languages and voices**
|
||||
|
||||
You can choose the following languages:
|
||||
|
||||
- ``'af'``: Afrikaans
|
||||
- ``'an'``: Aragonese
|
||||
- ``'bg'``: Bulgarian
|
||||
- ``'bs'``: Bosnian
|
||||
- ``'ca'``: Catalan
|
||||
- ``'cs'``: Czech
|
||||
- ``'cy'``: Welsh
|
||||
- ``'da'``: Danish
|
||||
- ``'de'``: German
|
||||
- ``'el'``: Greek
|
||||
- ``'en'``: English (default)
|
||||
- ``'en-gb'``: English (United Kingdom)
|
||||
- ``'en-sc'``: English (Scotland)
|
||||
- ``'en-uk-north'``: English (United Kingdom, Northern)
|
||||
- ``'en-uk-rp'``:
|
||||
English (United Kingdom, Received Pronunciation)
|
||||
- ``'en-uk-wmids'``: English (United Kingdom, West Midlands)
|
||||
- ``'en-us'``: English (United States)
|
||||
- ``'en-wi'``: English (West Indies)
|
||||
- ``'eo'``: Esperanto
|
||||
- ``'es'``: Spanish
|
||||
- ``'es-la'``: Spanish (Latin America)
|
||||
- ``'et'``: Estonian
|
||||
- ``'fa'``: Persian
|
||||
- ``'fa-pin'``: Persian
|
||||
- ``'fi'``: Finnish
|
||||
- ``'fr-be'``: French (Belgium)
|
||||
- ``'fr-fr'``: French (France)
|
||||
- ``'ga'``: Irish
|
||||
- ``'grc'``: Greek
|
||||
- ``'hi'``: Hindi
|
||||
- ``'hr'``: Croatian
|
||||
- ``'hu'``: Hungarian
|
||||
- ``'hy'``: Armenian
|
||||
- ``'hy-west'``: Armenian (Western)
|
||||
- ``'id'``: Indonesian
|
||||
- ``'is'``: Icelandic
|
||||
- ``'it'``: Italian
|
||||
- ``'jbo'``: Lojban
|
||||
- ``'ka'``: Georgian
|
||||
- ``'kn'``: Kannada
|
||||
- ``'ku'``: Kurdish
|
||||
- ``'la'``: Latin
|
||||
- ``'lfn'``: Lingua Franca Nova
|
||||
- ``'lt'``: Lithuanian
|
||||
- ``'lv'``: Latvian
|
||||
- ``'mk'``: Macedonian
|
||||
- ``'ml'``: Malayalam
|
||||
- ``'ms'``: Malay
|
||||
- ``'ne'``: Nepali
|
||||
- ``'nl'``: Dutch
|
||||
- ``'no'``: Norwegian
|
||||
- ``'pa'``: Punjabi
|
||||
- ``'pl'``: Polish
|
||||
- ``'pt-br'``: Portuguese (Brazil)
|
||||
- ``'pt-pt'``: Portuguese (Portugal)
|
||||
- ``'ro'``: Romanian
|
||||
- ``'ru'``: Russian
|
||||
- ``'sk'``: Slovak
|
||||
- ``'sq'``: Albanian
|
||||
- ``'sr'``: Serbian
|
||||
- ``'sv'``: Swedish
|
||||
- ``'sw'``: Swahili
|
||||
- ``'ta'``: Tamil
|
||||
- ``'tr'``: Turkish
|
||||
- ``'vi'``: Vietnamese
|
||||
- ``'vi-hue'``: Vietnamese (Hue)
|
||||
- ``'vi-sgn'``: Vietnamese (Saigon)
|
||||
- ``'zh'``: Mandarin Chinese
|
||||
- ``'zh-yue'``: Cantonese Chinese
|
||||
|
||||
You can choose the following voices:
|
||||
|
||||
- ``'f1'``: female variant 1
|
||||
- ``'f2'``: female variant 2
|
||||
- ``'f3'``: female variant 3
|
||||
- ``'f4'``: female variant 4
|
||||
- ``'f5'``: female variant 5
|
||||
- ``'m1'``: male variant 1
|
||||
- ``'m2'``: male variant 2
|
||||
- ``'m3'``: male variant 3
|
||||
- ``'m4'``: male variant 4
|
||||
- ``'m5'``: male variant 5
|
||||
- ``'m6'``: male variant 6
|
||||
- ``'m7'``: male variant 7
|
||||
- ``'croak'``: croak
|
||||
- ``'whisper'``: whisper
|
||||
- ``'whisperf'``: female whisper
|
||||
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_volume
|
||||
|
||||
|
||||
.. rubric:: Using the screen
|
||||
|
||||
.. |this image| replace:: the screen
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.clear
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_text
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.print
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Say hello... in several ways.**
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\begin{CJK}{UTF8}{gbsn}
|
||||
|
||||
.. literalinclude::
|
||||
../../pybricks-projects/snippets/ev3/screen_print/main.py
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\end{CJK}
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.set_font
|
||||
|
||||
**Example:** See example in :meth:`print`.
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.load_image
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Show an image on the screen.**
|
||||
|
||||
.. literalinclude::
|
||||
../../pybricks-projects/snippets/ev3/screen_image/main.py
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_image
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_pixel
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_line
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Draw some shapes on the screen.**
|
||||
|
||||
.. literalinclude::
|
||||
../../pybricks-projects/snippets/ev3/screen_draw/main.py
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_box
|
||||
|
||||
**Example:** See example in :meth:`draw_line`.
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_circle
|
||||
|
||||
**Example:** See example in :meth:`draw_line`.
|
||||
|
||||
.. autoattribute:: pybricks.hubs::EV3Brick.screen.width
|
||||
|
||||
.. autoattribute:: pybricks.hubs::EV3Brick.screen.height
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.save
|
||||
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.battery.voltage
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.battery.current
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |