diff --git a/doc/api/parameters.rst b/doc/api/parameters.rst index 94b3750..f156023 100644 --- a/doc/api/parameters.rst +++ b/doc/api/parameters.rst @@ -132,6 +132,48 @@ .. autoclass:: pybricks.parameters.Button :no-members: + .. autoattribute:: pybricks.parameters.Button.LEFT_DOWN + :annotation: + + .. autoattribute:: pybricks.parameters.Button.LEFT_MINUS + :annotation: + + .. autoattribute:: pybricks.parameters.Button.DOWN + :annotation: + + .. autoattribute:: pybricks.parameters.Button.RIGHT_DOWN + :annotation: + + .. autoattribute:: pybricks.parameters.Button.RIGHT_MINUS + :annotation: + + .. autoattribute:: pybricks.parameters.Button.LEFT + :annotation: + + .. autoattribute:: pybricks.parameters.Button.CENTER + :annotation: + + .. autoattribute:: pybricks.parameters.Button.RIGHT + :annotation: + + .. autoattribute:: pybricks.parameters.Button.LEFT_UP + :annotation: + + .. autoattribute:: pybricks.parameters.Button.LEFT_PLUS + :annotation: + + .. autoattribute:: pybricks.parameters.Button.UP + :annotation: + + .. autoattribute:: pybricks.parameters.Button.BEACON + :annotation: + + .. autoattribute:: pybricks.parameters.Button.RIGHT_UP + :annotation: + + .. autoattribute:: pybricks.parameters.Button.RIGHT_PLUS + :annotation: + .. .. autoclass:: pybricks.parameters.Axis .. :no-members: diff --git a/pybricks/parameters.py b/pybricks/parameters.py index 41fadfd..00bbb21 100644 --- a/pybricks/parameters.py +++ b/pybricks/parameters.py @@ -137,44 +137,22 @@ class Direction(_PybricksEnum): class Button(_PybricksEnum): - """Buttons on a brick or remote: - - .. data:: LEFT_DOWN - .. data:: DOWN - .. data:: RIGHT_DOWN - .. data:: LEFT - .. data:: CENTER - .. data:: RIGHT - .. data:: LEFT_UP - .. data:: UP - .. data:: BEACON - .. data:: RIGHT_UP - - +-----------+----------+-----------+ - | | | | - | LEFT_UP |UP/BEACON | RIGHT_UP | - | | | | - +-----------+----------+-----------+ - | | | | - | LEFT | CENTER | RIGHT | - | | | | - +-----------+----------+-----------+ - | | | | - | LEFT_DOWN | DOWN | RIGHT_DOWN| - | | | | - +-----------+----------+-----------+ - """ + """Buttons on a brick or remote""" LEFT_DOWN = 1 + LEFT_MINUS = 1 DOWN = 2 RIGHT_DOWN = 3 + RIGHT_MINUS = 3 LEFT = 4 CENTER = 5 RIGHT = 6 LEFT_UP = 7 + LEFT_PLUS = 7 UP = 8 BEACON = 8 RIGHT_UP = 9 + RIGHT_PLUS = 9 class Axis(_PybricksEnum): diff --git a/pybricks/parameters.pyi b/pybricks/parameters.pyi index 60caa0c..05bb708 100644 --- a/pybricks/parameters.pyi +++ b/pybricks/parameters.pyi @@ -37,15 +37,19 @@ class Direction: class Button: LEFT_DOWN: Button + LEFT_MINUS: Button DOWN: Button RIGHT_DOWN: Button + RIGHT_MINUS: Button LEFT: Button CENTER: Button RIGHT: Button LEFT_UP: Button + LEFT_PLUS: Button UP: Button BEACON: Button RIGHT_UP: Button + RIGHT_PLUS: Button class Axis: X: Axis