Compare commits

...
Author SHA1 Message Date
David Lechner 73d794dfb8 @pybricks/ide-docs v2.1.0 2021-12-16 15:39:57 -06:00
David Lechner dd77c548d2 v3.1.0 2021-12-16 15:35:09 -06:00
David Lechner 022afabd30 pybricks.robotics: add type hint for curve()
This method was added in 30803fc.
2021-12-16 15:33:00 -06:00
David Lechner ce17123325 pybricks._common: remove type hint for integral_range()
This was removed in e061617.

Also fix import of Axis while we are touching this file.
2021-12-16 15:29:44 -06:00
Laurens Valk f2346df4e5 pybricks.iodevices: Hide LWP3Device
This is not part of the upcoming release.

Hiding is nicer than adding not-ready disclaimers throughout, especially since this information is very easy to access via our beta channel.
2021-12-01 15:39:05 +01:00
Laurens Valk 94c659ba6d pybricks.geometry: Hide module and IMU examples.
This is not part of the upcoming release.

Hiding is nicer than adding not-ready disclaimers throughout, especially since this information is very easy to access via our beta channel.
2021-12-01 15:39:04 +01:00
Laurens Valk 9c0298bad0 doc/main/index: Drop beta note.
This is a normal release.
2021-12-01 15:39:04 +01:00
Laurens Valk 602b21fe9d doc/main/hubs: Hide Prime Hub.
This is not part of the upcoming release.

Hiding is nicer than adding not-ready disclaimers throughout, especially
since this information is very easy to access via our beta channel.
2021-12-01 15:39:04 +01:00
13 changed files with 29 additions and 110 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
## Unreleased
## 3.1.0 - 2021-12-16
### Added
- Added maximum voltage setter for `DCMotor` and `Motor`.
+3
View File
@@ -265,11 +265,14 @@ latex_documents = [
exclude_patterns = [
'ev3devices.rst',
'hubs/ev3brick.rst',
'hubs/primehub.rst',
'geometry.rst',
'iodevices/analogsensor.rst',
'iodevices/dcmotor.rst',
'iodevices/ev3devsensor.rst',
'iodevices/i2cdevice.rst',
'iodevices/lumpdevice.rst',
'iodevices/lwp3device.rst',
'iodevices/uartdevice.rst',
'media.rst',
'messaging.rst',
-14
View File
@@ -12,7 +12,6 @@
movehub
cityhub
technichub
primehub
.. pybricks-classlink:: MoveHub
@@ -31,16 +30,3 @@
.. figure:: ../../main/images/technichub.png
:height: 10 em
:target: technichub.html
.. pybricks-classlink:: PrimeHub
.. figure:: ../../main/images/primehub.png
:height: 10 em
:target: primehub.html
.. pybricks-classlink:: InventorHub PrimeHub
.. figure:: ../../main/images/inventorhub.png
:height: 10 em
:target: primehub.html
+3 -50
View File
@@ -6,8 +6,9 @@ Technic Hub
.. figure:: ../../main/images/technichub.png
:height: 15 em
.. autoclass:: pybricks.hubs.TechnicHub
:no-members:
.. class:: TechnicHub
LEGO® Technic Hub.
.. rubric:: Using the hub status light
@@ -19,20 +20,6 @@ Technic Hub
.. automethod:: pybricks.hubs::TechnicHub.light.animate
.. rubric:: Using the IMU
.. automethod:: pybricks.hubs::TechnicHub.imu.up
.. automethod:: pybricks.hubs::TechnicHub.imu.tilt
.. automethod:: pybricks.hubs::TechnicHub.imu.acceleration
.. automethod:: pybricks.hubs::TechnicHub.imu.angular_velocity
.. automethod:: pybricks.hubs::TechnicHub.imu.heading
.. automethod:: pybricks.hubs::TechnicHub.imu.reset_heading
.. rubric:: Using the battery
.. automethod:: pybricks.hubs::TechnicHub.battery.voltage
@@ -78,40 +65,6 @@ Creating light animations
.. literalinclude::
../../../examples/pup/hub_technichub/light_animate.py
IMU examples
---------------
Testing which way is up
********************************
.. literalinclude::
../../../examples/pup/hub_technichub/imu_up.py
Reading the tilt value
********************************
.. literalinclude::
../../../examples/pup/hub_technichub/imu_tilt.py
Using a custom hub orientation
**************************************************
.. literalinclude::
../../../examples/pup/hub_technichub/imu_tilt_blast.py
Reading acceleration and angular velocity vectors
**************************************************
.. literalinclude::
../../../examples/pup/hub_technichub/imu_read_vector.py
Reading acceleration and angular velocity on one axis
*****************************************************
.. literalinclude::
../../../examples/pup/hub_technichub/imu_read_scalar.py
Button and system examples
----------------------------------
+1 -12
View File
@@ -49,16 +49,6 @@ Pybricks Documentation
.. only:: ide
.. note::
**You are using a new beta version of Pybricks!**
This is great for trying the very latest features, but some things
might not work.
If in doubt, use the `latest stable release`_. Please report any
issues via our `support page`_. Thanks!
To begin, install the Pybricks firmware on your hub. Check
`pybricks.com/install`_ to learn how.
@@ -67,7 +57,7 @@ Pybricks Documentation
.. rubric:: Programmable hubs
.. figure:: ../main/images/hubsoverview.png
.. figure:: ../main/images/powereduphubs.png
:width: 100 %
:target: hubs/index.html
@@ -110,7 +100,6 @@ Pybricks Documentation
parameters/index
tools/index
robotics
geometry
signaltypes
.. toctree::
-7
View File
@@ -10,7 +10,6 @@
:hidden:
pupdevice
lwp3device
This module has classes for generic input/output devices.
@@ -19,9 +18,3 @@ This module has classes for generic input/output devices.
.. figure:: ../../main/images/sensor_pup.png
:width: 70 %
:target: pupdevice.html
.. pybricks-classlink:: LWP3Device
.. figure:: ../../main/images/powereduphubs.png
:width: 70 %
:target: lwp3device.html
-15
View File
@@ -26,21 +26,6 @@ Side
.. autoattribute:: pybricks.parameters.Side.RIGHT
:annotation:
Screens or light matrices have only four sides. For those,
``TOP`` is treated the same as ``FRONT``, and ``BOTTOM`` is treated the
same as ``BACK``. The diagrams below define the sides for relevant devices.
**Prime Hub**
.. figure:: ../../main/images/orientation_primehub_label.png
:height: 17 em
**Inventor Hub**
.. figure:: ../../main/images/orientation_inventorhub_label.png
:height: 17 em
**Move Hub**
.. figure:: ../../main/images/orientation_movehub_label.png
+5
View File
@@ -2,6 +2,11 @@
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
## 2.1.0 - 2021-12-16
### Changed
- Updated docs to v3.1.0.
## 2.0.1 - 2021-11-19
### Fixed
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@pybricks/ide-docs",
"version": "2.0.1",
"version": "2.1.0",
"description": "Special build of Pybricks API docs for embedding in an IDE.",
"repository": {
"type": "git",
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybricks"
version = "3.1.0rc1"
version = "3.1.0"
description = "Documentation and user-API stubs for Pybricks MicroPython"
authors = ["The Pybricks Authors <dev@pybricks.com>"]
maintainers = ["Laurens Valk <laurens@pybricks.com>", "David Lechner <david@pybricks.com>" ]
+4 -5
View File
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 The Pybricks Authors
# Copyright (c) 2020-2021 The Pybricks Authors
from pybricks.geometry import Matrix, vector
from typing import Collection, Iterable, List, Optional, Tuple, Union, overload
from typing import Collection, Iterable, Optional, Tuple, Union, overload
from .parameters import Button, Color, Direction, Side, Stop, Port, Axis
from .geometry import Axis, Matrix, vector
from .parameters import Button, Color, Direction, Side, Stop, Port
from .media.ev3dev import SoundFile
class DCMotor:
@@ -32,7 +32,6 @@ class Control:
kp: Optional[int] = None,
ki: Optional[int] = None,
kd: Optional[int] = None,
integral_range: Optional[int] = None,
integral_rate: Optional[int] = None,
) -> None: ...
@overload
+4 -3
View File
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2018-2020 The Pybricks Authors
# Copyright (c) 2018-2021 The Pybricks Authors
"""Robotics module for the Pybricks API."""
@@ -100,8 +100,9 @@ class DriveBase:
"""Resets the estimated driven distance and angle to 0."""
pass
def settings(self, straight_speed, straight_acceleration, turn_rate,
turn_acceleration):
def settings(
self, straight_speed, straight_acceleration, turn_rate, turn_acceleration
):
"""Configures the speed and acceleration used
by :meth:`.straight`, :meth:`.turn`, and :meth:`.curve`.
+6 -1
View File
@@ -1,8 +1,10 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 The Pybricks Authors
# Copyright (c) 2020-2021 The Pybricks Authors
from typing import Optional, Tuple, overload, Union
from ._common import Control, Motor
from .parameters import Stop
class DriveBase:
distance_control: Control
@@ -32,3 +34,6 @@ class DriveBase:
) -> None: ...
def straight(self, distance: int) -> None: ...
def turn(self, angle: int) -> None: ...
def curve(
self, radius: int, angle: int, then: Stop = Stop.HOLD, wait: bool = True
) -> None: ...