Laurens Valk
55c83cb026
api/common: add torque limit setter
...
Also document units of torque
2021-02-10 15:48:56 +01:00
Laurens Valk
8ed45aecfb
doc/nxtdevices: drop method link
...
For some reason, these are not working after upgrading to Sphinx 3.X, even though the same reference to conversion works just fine elsewhere.
2021-01-26 09:07:19 +01:00
Laurens Valk
21e5400ff3
api/common/IMU: publish draft API
2021-01-19 15:09:06 +01:00
Laurens Valk
93f27f61e7
doc/hubs: make naming consistent
2021-01-19 11:19:39 +01:00
Laurens Valk
7d40e07dfb
doc/hubs: InventorHub and PrimeHub on same page
...
Make it a bit more explicit that they are the same.
2021-01-19 11:18:21 +01:00
Laurens Valk
db4cbe66c1
all: update copyright year
2021-01-18 14:34:28 +01:00
Laurens Valk
46d9e3c119
doc/iodevices: refactor
...
Split all classes to their own file. This keeps things organized, and allows per-class comments about compatibility. Also flatten toggled examples.
2021-01-13 16:54:18 +01:00
Laurens Valk
f826e7641c
doc/media: footnote instead of toggle for language
...
This is a way to make the language list non-distracting without the contentui plugin
2021-01-12 16:50:43 +01:00
Laurens Valk
400067c364
doc/hubs/ev3brick: use footnote instead of toggle
...
This is a way to make the language list non-distracting without the contentui plugin
2021-01-12 16:50:18 +01:00
Laurens Valk
1f991302e5
doc/common: fix unit of acceleration
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
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
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
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
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
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
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
Laurens Valk
8f21cea345
api/common: clean up Light Matrix
...
This renames the generic class from LightGrid to LightMatrix. The instance object is simply called display.
This makes user scripts easier to type and read.
This also cleans up most of the draft docstrings for this class and fixes a few argument typos.
2020-11-06 12:31:42 +01:00
Laurens Valk
4e9886dba8
api/geometry: add new module
...
This module will contain mathematical tools to deal with geometry and motion of robots. This includes a Matrix type for common matrix operations.
2020-11-06 12:31:42 +01:00
Laurens Valk
cb91368b32
api/common/LightGrid: add orientation setter
2020-11-06 12:31:42 +01:00
Laurens Valk
70ed79076d
api/parameters: add Side enum
...
This will be used to designate orientations of hubs/sensors/screens.
2020-11-04 10:19:35 +01:00
Laurens Valk
eef4e9f672
api/hubs: add InventorHub
...
This is just the SPIKE Prime Hub with a different name and color.
2020-10-25 10:25:16 +01:00
Laurens Valk
d4c44a292c
api: add PrimeHub
2020-10-09 22:50:49 +02:00
Laurens Valk
c3eb31d348
doc/common: fix cross references
2020-10-09 19:58:35 +02:00
Laurens Valk
24d35993e9
api: rename CPlusHub to TechnicHub
...
This reflects the newly adopted naming convention.
See https://github.com/pybricks/support/issues/119
2020-10-09 19:16:33 +02:00
Laurens Valk
d6651fc3c5
api/pupdevices: replace color_map
...
This reclects the implementation update that changes how
color sensing is performed and interfaced with by the user.
2020-10-08 20:19:33 +02:00
Laurens Valk
6662862b43
api/parameters: Color divide value
...
This is the inverse of scaling by a constant through multiplication.
2020-10-07 09:17:02 +02:00
Laurens Valk
500bac9929
api/parameters/Color: allow scaling to alter hue
...
This makes it easy for users to vary brightness of the default colors without having to create a whole new object.
2020-08-26 21:12:48 +02:00
Laurens Valk
5e6a8c8334
api/parameters/Color: name is None by default
...
This is more consistent with the rest of our API.
2020-08-26 21:12:38 +02:00
Laurens Valk
4f27a465c4
api/common/LightGrid: drop on() method
...
This method is inconsistent with the on methods for other light related classes so it is better to delete it.
2020-08-25 16:27:19 +02:00
Laurens Valk
f490a3b2c2
api/common/LightArray: add blink and animate
2020-08-25 16:27:19 +02:00
Laurens Valk
9ae4955344
api/parameters/Color: no name by default
...
When no name is given, the color remains untitled
2020-08-25 16:27:19 +02:00
Laurens Valk
b89da4b061
api/common/ColorLight: add blink and animate
...
These are the generalizations of the corresponding methods for single color lights.
2020-08-25 13:38:09 +02:00