Documentation

This commit is contained in:
Konstantin Lampalzer 2021-09-12 13:54:38 +02:00
parent f5488f7b47
commit 54320096fb
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ class Encoder(object):
def read_raw(port: int) -> int: def read_raw(port: int) -> int:
"""Read raw encoder from a specified port. Will not be reset to 0 at start. """Read raw encoder from a specified port. Will not be reset to 0 at start.
:param port: Port, which the motor is connected to. 1-4 allowed :param port: Port, which the motor is connected to. Between 1 and 4
:raises: IndexError :raises: IndexError
:return: Current encoder position :return: Current encoder position
""" """
@ -38,7 +38,7 @@ class Encoder(object):
def read(port: int) -> int: def read(port: int) -> int:
"""Read encoder from a specified port """Read encoder from a specified port
:param port: Port, which the motor is connected to. 1-4 allowed :param port: Port, which the motor is connected to. Between 1 and 4
:raises: IndexError :raises: IndexError
:return: Current encoder position :return: Current encoder position
""" """
@ -56,7 +56,7 @@ class Encoder(object):
def clear(port: int): def clear(port: int):
"""Reset encoder position to 0 """Reset encoder position to 0
:param port: Port, which the motor is connected to. 1-4 allowed :param port: Port, which the motor is connected to. Between 1 and 4
:raises: IndexError :raises: IndexError
""" """
if port <= 0 or port > MOTOR_COUNT: if port <= 0 or port > MOTOR_COUNT:

View file

@ -35,7 +35,7 @@ extensions = [
'sphinx_rtd_theme' 'sphinx_rtd_theme'
] ]
autodoc_mock_imports = ["smbus", "compLib.PCA9685", "RPi", "pigpio", "flask", "apt", "spidev"] autodoc_mock_imports = ["smbus", "compLib.PCA9685", "RPi", "pigpio", "flask", "apt", "spidev", "influxdb_client"]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']