api/hubs: add CPlusHub

This commit is contained in:
Laurens Valk
2020-06-05 15:56:04 +02:00
committed by laurensvalk
parent ce087f5330
commit 1eac0972ac
3 changed files with 23 additions and 0 deletions
+2
View File
@@ -38,3 +38,5 @@ Select your programmable hub using the buttons below.
.. figure:: ../api/images/cplushub.png
:height: 15 em
.. include:: hubs_cplushub.inc
+15
View File
@@ -0,0 +1,15 @@
.. autoclass:: pybricks.hubs.CPlusHub
:no-members:
.. rubric:: Using the hub status light
.. automethod:: pybricks.hubs::CPlusHub.light.on
.. automethod:: pybricks.hubs::CPlusHub.light.off
.. rubric:: Using the battery
.. automethod:: pybricks.hubs::CPlusHub.battery.voltage
.. automethod:: pybricks.hubs::CPlusHub.battery.current
+6
View File
@@ -26,3 +26,9 @@ class CityHub:
"""LEGO® Powered Up City Hub."""
battery = _Battery()
light = _ColorLight()
class CPlusHub:
"""LEGO® Technic Control+ Hub."""
battery = _Battery()
light = _ColorLight()