pybricks.common.System: Add name() getter.

This commit is contained in:
Laurens Valk
2021-07-14 09:43:20 +02:00
parent 286079fe68
commit 9944cf3adf
5 changed files with 17 additions and 0 deletions
+2
View File
@@ -29,6 +29,8 @@ City Hub
.. automethod:: pybricks.hubs::CityHub.system.set_stop_button
.. automethod:: pybricks.hubs::CityHub.system.name
.. automethod:: pybricks.hubs::CityHub.system.shutdown
.. automethod:: pybricks.hubs::CityHub.system.reset_reason
+2
View File
@@ -37,6 +37,8 @@ Move Hub
.. automethod:: pybricks.hubs::MoveHub.system.set_stop_button
.. automethod:: pybricks.hubs::MoveHub.system.name
.. automethod:: pybricks.hubs::MoveHub.system.shutdown
.. automethod:: pybricks.hubs::MoveHub.system.reset_reason
+2
View File
@@ -85,6 +85,8 @@ Prime Hub / Inventor Hub
.. automethod:: pybricks.hubs::PrimeHub.system.set_stop_button
.. automethod:: pybricks.hubs::PrimeHub.system.name
.. automethod:: pybricks.hubs::PrimeHub.system.shutdown
.. automethod:: pybricks.hubs::PrimeHub.system.reset_reason
+2
View File
@@ -43,6 +43,8 @@ Technic Hub
.. automethod:: pybricks.hubs::TechnicHub.system.set_stop_button
.. automethod:: pybricks.hubs::TechnicHub.system.name
.. automethod:: pybricks.hubs::TechnicHub.system.shutdown
.. automethod:: pybricks.hubs::TechnicHub.system.reset_reason
+9
View File
@@ -42,6 +42,15 @@ class System:
"""
pass
def name(self):
"""Gets the hub name. This is the name you see when connecting
via Bluetooth.
Returns:
str: The hub name.
"""
pass
class DCMotor:
"""Generic class to control simple motors without rotation sensors, such