update documentation

This commit is contained in:
Konstantin Lampalzer 2021-09-13 19:14:47 +02:00
parent 54320096fb
commit 3ef0fff256
6 changed files with 205 additions and 18 deletions

View file

@ -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

View file

@ -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():

View file

@ -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!")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 188 KiB

View file

@ -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
*********

View file

@ -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")