Files
pybricks-api/doc/ev3dev
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
..
2019-05-09 13:23:26 +02:00
2019-06-04 14:47:52 +02:00
2019-05-09 13:23:26 +02:00
2019-06-04 15:45:36 +02:00
2019-06-11 21:30:46 +02:00
2019-06-05 12:47:24 +02:00
2019-06-11 20:05:40 +02:00
2019-06-06 11:03:11 +02:00
2019-06-05 12:47:24 +02:00
2019-05-09 13:23:26 +02:00
2019-06-04 14:47:52 +02:00
2019-06-04 14:47:52 +02:00
2019-06-05 12:47:24 +02:00