mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
api/hubs: add CPlusHub
This commit is contained in:
committed by
laurensvalk
parent
ce087f5330
commit
1eac0972ac
@@ -38,3 +38,5 @@ Select your programmable hub using the buttons below.
|
||||
|
||||
.. figure:: ../api/images/cplushub.png
|
||||
:height: 15 em
|
||||
|
||||
.. include:: hubs_cplushub.inc
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user