Commit Graph
14 Commits
Author SHA1 Message Date
Laurens Valk aa8c95234e doc: flake8 and doc8 2019-10-18 17:12:16 +02:00
Laurens Valk f5762447b4 doc: take sphinx workarounds out of api 2019-10-18 15:11:20 +02:00
Laurens Valk 5812333119 api: EV3Brick as class instead of module 2019-10-18 14:47:48 +02:00
Laurens Valk 0b67db897e api: generalize buttons
This makes the user code easier to read:

brick.buttons()

brick.buttons.pressed()

It also opens up possibility to add features in the future such as:
brick.buttons.released()  # return which buttons are not pressed
brick.buttons.clicked()  # return which buttons were clicked since we last checked

This follows the same style as the new light API: some devices have specific instances of a KeyPad class.

A good example that nicely demonstrates the concept is the LPF2 RemoteControl, which has instances of a ColorLight and a KeyPad. It's added in this commit.
2019-06-11 21:30:46 +02:00
Laurens Valk f6eb7674a9 conf: drop references to future work 2019-06-11 20:05:40 +02:00
Laurens Valk bf16da463a api: update common light classes 2019-06-07 13:50:32 +02:00
Laurens Valk 8bc96822b2 api: add lights instance 2019-06-06 11:03:11 +02:00
Laurens Valk 6fb78141c5 doc: make ports specific to technology type 2019-06-06 10:51:48 +02:00
Laurens Valk 28a5329bb6 api/doc: pybricks is a package 2019-06-05 12:47:24 +02:00
Laurens Valk 8d37450fac api: flake8 2019-06-04 15:45:36 +02:00
Laurens Valk 0d3b682223 doc: doc8 2019-06-04 14:47:52 +02:00
Laurens Valk f3c29971de api: lights on hubs are instances of generic class 2019-06-03 15:18:26 +02:00
Laurens Valk c43d296511 doc: move snippets to doc
Example snippets are platform specific.
2019-06-03 12:02:16 +02:00
Laurens Valk c950bf1d8e import api documentation 2019-05-09 13:23:26 +02:00