Source code for lpf2.button_state

"""Button states reported by LEGO hubs and remotes.

``PRESSED`` / ``RELEASED`` are for a hub's button; ``UP`` / ``DOWN`` /
``STOP`` are the + / - / red buttons on a Powered Up remote.
"""

[docs] PRESSED: int = 0x01
"""Hub power button pressed."""
[docs] RELEASED: int = 0x00
"""Hub power button released."""
[docs] UP: int = 0x01
"""Remote button: ``+`` (up)."""
[docs] DOWN: int = 0xff
"""Remote button: ``-`` (down)."""
[docs] STOP: int = 0x7f
"""Remote button: red (stop)."""