Commit Graph
687 Commits
Author SHA1 Message Date
Laurens Valk 05ecf8bcb6 doc/hubs: show IMU on Prime and Technic Hub 2021-01-05 16:31:35 +01:00
Laurens Valk 1f991302e5 doc/common: fix unit of acceleration 2021-01-05 16:31:35 +01:00
Laurens Valk f3f0532f74 doc/hubs: move note about identical classes
Otherwise, it was shown after the newly added __init__ docstring, which was confusing.
2021-01-05 16:31:35 +01:00
Laurens Valk 3a9e5728c6 api/hubs: add axis initializers for IMU 2021-01-05 16:31:35 +01:00
Laurens Valk 2a97b62603 doc/hubs: add note about hub instance attributes 2021-01-05 16:31:35 +01:00
Laurens Valk 64146f5afa doc/geometry: axis and orientation conventions 2021-01-05 16:31:21 +01:00
Laurens Valk e52130b627 api/hubs/inventorhub: enable IMU
The minimal change to start reviewing and improving IMU api and docs.
2021-01-04 17:25:16 +01:00
Laurens Valk a2583944d9 api/geometry: move Axis from parameters
This location makes more sense. Also drop Axis.ANY = None, which is more confusing than helpful. Instead, use relevant docstring to explain what None will do.
2021-01-04 17:25:15 +01:00
Laurens Valk 4c6c149d4a doc/start_pup: update link to CI builds 2021-01-04 15:28:03 +01:00
Laurens Valk 9835ee9dbe doc/hubs/primehub: update button graphic
The graphic showed Button.BT but it is now Button.BLUETOOTH
2020-12-30 12:42:47 +01:00
Laurens Valk 755d0520a6 api/parameters/Button: pass buttons on init
This matches the implementation.
2020-12-30 12:39:06 +01:00
Laurens Valk 08c55218fa api/parameters/Button: add bluetooth button 2020-12-30 12:36:37 +01:00
Laurens Valk 352bff564c api/parameters/Button: add remote buttons
Also clean up how it is displayed by reading the attributes from the API instead of copying them.
2020-12-30 12:27:12 +01:00
Laurens Valk 313a51219a api/pupdevices/Remote: add address
After connecting (automatically), this address can be printed so next time you can connect directly without scanning.

This is useful if you have more than one remote.
2020-12-29 20:16:34 +01:00
Laurens Valk c2d2884794 api/pupdevices/Remote: publish draft api 2020-12-29 19:51:48 +01:00
Laurens Valk 32a47bcee0 doc/nxtdevices: do not collapse example
In the long run, this page needs to be split up just like pupdevices. At this time, the nxtdevices page has only one example, so we simply remove the toggle header.
2020-12-29 14:53:13 +01:00
Laurens Valk b5890437de doc/pupdevices/PFMotor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:48:09 +01:00
Laurens Valk b0af924cfc doc/pupdevices/UltrasonicSensor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:47:06 +01:00
Laurens Valk 915d445561 doc/pupdevices/TiltSensor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:44:50 +01:00
Laurens Valk 070264647f doc/pupdevices/Light: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:43:08 +01:00
Laurens Valk ab1f58c2cc doc/pupdevices/InfraredSensor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:42:11 +01:00
Laurens Valk d6bc72c3c1 doc/pupdevices/ForceSensor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:41:06 +01:00
Laurens Valk 4e2aec6c35 doc/pupdevices/motor: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:35:07 +01:00
Laurens Valk 2375a1abcb doc/pupdevices/colorsensor: split examples
Now that each sensor is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:10:41 +01:00
Laurens Valk ab4da63029 doc/hubs: move examples to dedicated sections
Now that each hub is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 13:58:17 +01:00
Laurens Valk ab384b464b doc/pupdevices/colordistancesensor: split examples
Now that each sensor is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 12:08:29 +01:00
Laurens Valk d2de1089d6 doc/hubs/index: clean up thumbnail page 2020-12-29 11:50:55 +01:00
Laurens Valk b76b6cf835 doc/pupdevices: one page per sensor
This page was getting very long, so split it up for easier navigation (#33).
2020-12-29 11:47:27 +01:00
Laurens Valk a92eae867b typing/pupdevices: remove stray docstring 2020-12-29 09:32:11 +01:00
Laurens Valk 0a86e0a719 typing/common: fix Keypad return type
Follows 8a1716d5e2
2020-12-29 09:31:00 +01:00
Laurens Valk 7800ab05b2 typing/common: fix nonexistent scalar type 2020-12-29 09:29:47 +01:00
David Lechner 032d3786bf github: update target python versions 2020-12-28 18:47:11 -06:00
David Lechner db65f8d646 api: add type hints for v3
This updates the type hints for the current v3 API.
2020-12-28 18:47:11 -06:00
David Lechner 3a66b8e053 api: add type hints for v2
This adds PEP 561 style type hints for Pybricks v2 (just EV3).
2020-12-28 18:47:04 -06:00
Laurens Valk 8a1716d5e2 api/common/Keypad: change return type to tuple
This follows an implementation change that was made for performance reasons (https://github.com/pybricks/pybricks-micropython/commit/95741ac2f8f118396a517a38f4d0f7fb92136f82).
2020-12-23 11:45:37 +01:00
Laurens Valk abe4c1bc9a doc/common/Keypad: fix name
Keypad is one word, so the class is not spelled KeyPad.
2020-12-23 11:43:48 +01:00
Laurens Valk 84b882f8b8 api/hubs/InventorHub: add speaker instance 2020-12-18 13:35:19 +01:00
Laurens Valk c3fc818037 doc/common/Speaker: move note information back
We were hiding this under a toggle menu to reduce the page size of the hubs module. Now that each hub is on its own page, this is no longer necessary.

In turn, this makes it easier to document the same method for other hubs.
2020-12-18 13:32:18 +01:00
Laurens Valk 57ff8312f3 api/iodevices/PUPDevice: add info() method 2020-12-18 13:20:17 +01:00
Laurens Valk 68511bd3eb doc/iodevices: note on I2C/UART on Powered Up 2020-12-14 10:34:41 +01:00
Laurens Valk ba4fe80b50 doc/iodevices: add PUPDevice class 2020-12-14 10:27:23 +01:00
Laurens Valk b7d728a86e doc/iodevices: move LUMPDevice to EV3 only section
Also update graphic used for this device class.
2020-12-14 10:16:02 +01:00
Laurens Valk 1e751d6afc api/iodevices/LUMPDevice: drop write method
EV3 UART devices do not support writing.
2020-12-14 10:08:09 +01:00
Laurens Valk aaf98308f7 api/iodevices/PUPDevice: copy from LUMPDevice
Powered Up devices have many differences compared to EV3 UART devices, so it is better to split them to dedicated classes.

The biggest difference is that PUPDevice class will allow writing to sensors and toggling battery power to the device.
2020-12-14 10:07:13 +01:00
Laurens Valk 3e322165f5 doc/hubs: include light matrix display examples 2020-11-11 18:57:04 +01:00
Laurens Valk 1c201b5f8c examples/pup: generate light matrix examples 2020-11-11 18:56:38 +01:00
Laurens Valk abe1be18b2 examples/pup: add common light matrix display 2020-11-11 17:09:44 +01:00
Laurens Valk 983562f7b8 doc/hubs/inventorhub: document light, display, buttons 2020-11-06 15:59:02 +01:00
Laurens Valk 1c9d0dd86f api/hubs/PrimeHub: enable buttons 2020-11-06 15:55:48 +01:00
Laurens Valk 22a057d6e3 doc/common/LightGrid: existing pixels do not re-orient
This is currently a limitation of the implementation, and may be changed later on.
2020-11-06 15:22:00 +01:00