diff --git a/compLib/Display.py b/compLib/Display.py index 82ad451..f27c0a9 100644 --- a/compLib/Display.py +++ b/compLib/Display.py @@ -12,7 +12,7 @@ class Display(object): """ @staticmethod - def write(line: int, text: string): + def write(line: int, text: str): """Write a string of text to the integrated display. :param line: Line to write. Between 1 and 4 diff --git a/compLib/Spi.py b/compLib/Spi.py index a141bfa..c2f963f 100644 --- a/compLib/Spi.py +++ b/compLib/Spi.py @@ -172,7 +172,6 @@ class Spi(object): if Spi.read(Register.IDENTIFICATION_MODEL_ID, 1) != 3: Logging.get_logger().error(f"Unable to read Version! Make sure the mainboard is connected!") print("Unable to read Version! Make sure the mainboard is connected!") - sys.exit() @staticmethod def start_health_check_loop(): diff --git a/compLib/__init__.py b/compLib/__init__.py index 993095f..827f85b 100644 --- a/compLib/__init__.py +++ b/compLib/__init__.py @@ -26,16 +26,16 @@ else: print("apt is not installed! This is for local development only!") if spi_found: - import compLib.Spi - import compLib.Reset - import compLib.Encoder + from compLib.Spi import Spi + from compLib.Reset import Reset + from compLib.Encoder import Encoder import logging print(f"\033[34mInitializing chipmunk board...\033[0m") - compLib.Reset.Reset.reset_bot() - compLib.Spi.Spi.health_check() - compLib.Spi.Spi.start_health_check_loop() - compLib.Encoder.Encoder.clear_all() + Reset.reset_bot() + Spi.health_check() + Spi.start_health_check_loop() + Encoder.clear_all() print(f"\033[34mReady\033[0m\n") else: print("spidev is not installed! This is for local development only!") diff --git a/docs/source/images/compair-logo-white.svg b/docs/source/images/compair-logo-white.svg new file mode 100644 index 0000000..8fb8da1 --- /dev/null +++ b/docs/source/images/compair-logo-white.svg @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/source/index.rst b/docs/source/index.rst index 2c0ae75..f10ea78 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,14 +1,12 @@ -Robo4you Competition Library +.. image:: images/compair-logo-white.svg + +Competition Robot Library ############################# .. toctree:: :maxdepth: 2 :caption: Contents: - -CompLib is the library used in the robo4you competition 2021. - - Contents ********* diff --git a/docs/source/other/usage.rst b/docs/source/other/usage.rst index 8b47eef..50fd86d 100644 --- a/docs/source/other/usage.rst +++ b/docs/source/other/usage.rst @@ -9,12 +9,13 @@ Usage from compLib.Motor import * def forward(): - for port in range(0, 4): - Motor.power(port, 30); + Motor.power(1, -30); + Motor.power(2, 30); + def backward(): - for port in range(0, 4): - Motor.power(port, -30); + Motor.power(1, 30); + Motor.power(2, -30); def main(): print("hallo ich bin ein roboter beep buup")