pybricks.hubs: Enable single button.

This commit is contained in:
Laurens Valk
2021-07-07 09:47:28 +02:00
parent 76432120c4
commit a2801aff41
4 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -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
+3 -1
View File
@@ -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
+3 -1
View File
@@ -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
+3
View File
@@ -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)