diff --git a/doc/api/hubs/cityhub.rst b/doc/api/hubs/cityhub.rst index 95d4aff..2f4e614 100644 --- a/doc/api/hubs/cityhub.rst +++ b/doc/api/hubs/cityhub.rst @@ -23,7 +23,9 @@ City Hub .. automethod:: pybricks.hubs::CityHub.battery.current - .. rubric:: System control + .. rubric:: Button and system control + + .. automethod:: pybricks.hubs::CityHub.button.pressed .. automethod:: pybricks.hubs::CityHub.system.set_stop_button diff --git a/doc/api/hubs/movehub.rst b/doc/api/hubs/movehub.rst index 8fdf9d9..f556835 100644 --- a/doc/api/hubs/movehub.rst +++ b/doc/api/hubs/movehub.rst @@ -31,7 +31,9 @@ Move Hub .. automethod:: pybricks.hubs::MoveHub.battery.current - .. rubric:: System control + .. rubric:: Button and system control + + .. automethod:: pybricks.hubs::MoveHub.button.pressed .. automethod:: pybricks.hubs::MoveHub.system.set_stop_button diff --git a/doc/api/hubs/technichub.rst b/doc/api/hubs/technichub.rst index 849f7c2..6ea01bb 100644 --- a/doc/api/hubs/technichub.rst +++ b/doc/api/hubs/technichub.rst @@ -37,7 +37,9 @@ Technic Hub .. automethod:: pybricks.hubs::TechnicHub.battery.current - .. rubric:: System control + .. rubric:: Button and system control + + .. automethod:: pybricks.hubs::TechnicHub.button.pressed .. automethod:: pybricks.hubs::TechnicHub.system.set_stop_button diff --git a/pybricks/hubs.py b/pybricks/hubs.py index 693fed7..ffb5511 100644 --- a/pybricks/hubs.py +++ b/pybricks/hubs.py @@ -39,6 +39,7 @@ class MoveHub: light = _ColorLight() imu = _SimpleAccelerometer() system = _System() + button = _Keypad((_Button.CENTER,)) class CityHub: @@ -49,6 +50,7 @@ class CityHub: battery = _Battery() light = _ColorLight() system = _System() + button = _Keypad((_Button.CENTER,)) class TechnicHub: @@ -60,6 +62,7 @@ class TechnicHub: light = _ColorLight() imu = _IMU() system = _System() + button = _Keypad((_Button.CENTER,)) def __init__(self, top_side=_Axis.Z, front_side=_Axis.X): """__init__(top_side=Axis.Z, front_side=Axis.X)