diff --git a/doc/lpf2/cityhub.rst b/doc/lpf2/cityhub.rst new file mode 100644 index 0000000..d2209a5 --- /dev/null +++ b/doc/lpf2/cityhub.rst @@ -0,0 +1,34 @@ +:mod:`cityhub` -- LEGO® Power Functions 2.0 City Hub +===================================================== + +.. automodule:: cityhub + :no-members: + + +Light +----- + +.. automethod:: cityhub.light.color + + Example:: + + # Make the light red + cityhub.light.color(Color.RED) + + # Wait + wait(1000) + + # Turn the light off + cityhub.light.off() + + +.. automethod:: cityhub.light.off + +.. automethod:: cityhub.light.brightness + +Battery +------- + +.. automethod:: cityhub.battery.voltage + +.. automethod:: cityhub.battery.current diff --git a/doc/lpf2/hub4.rst b/doc/lpf2/hub4.rst deleted file mode 100644 index 0a08383..0000000 --- a/doc/lpf2/hub4.rst +++ /dev/null @@ -1,34 +0,0 @@ -:mod:`hub4` -- LEGO® Power Functions 2.0 Hub 4 -===================================================== - -.. automodule:: hub4 - :no-members: - - -Light ------ - -.. automethod:: hub4.light.color - - Example:: - - # Make the light red - hub4.light.color(Color.RED) - - # Wait - wait(1000) - - # Turn the light off - hub4.light.off() - - -.. automethod:: hub4.light.off - -.. automethod:: hub4.light.brightness - -Battery -------- - -.. automethod:: hub4.battery.voltage - -.. automethod:: hub4.battery.current diff --git a/doc/lpf2/index.rst b/doc/lpf2/index.rst index e433f7e..53fdc95 100644 --- a/doc/lpf2/index.rst +++ b/doc/lpf2/index.rst @@ -22,7 +22,7 @@ Intro :hidden: movehub - hub4 + cityhub lpf2devices parameters tools diff --git a/pybricks/hub4.py b/pybricks/cityhub.py similarity index 65% rename from pybricks/hub4.py rename to pybricks/cityhub.py index fbf416e..7a9c30c 100644 --- a/pybricks/hub4.py +++ b/pybricks/cityhub.py @@ -1,4 +1,4 @@ -"""LEGO® Power Functions 2.0 Hub 4.""" +"""LEGO® Power Functions 2.0 City Hub.""" from _common import Battery, ColorLight