Demo page details

Page source code: api.rst

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{% set page="api.rst" %}
{% include "demo_page_header.rst" with context %}

πŸ“š SW API Teen
==============

.. automodule:: teen_car
   :members:
   :undoc-members:
   :private-members:

πŸ“š SW API TeenΒΆ

Teen car module.

Implementation: Teen Car Module TEEN_IMPL_CAR ../_images/arrow-right-circle.svg
implements: TEEN_DIST, TEEN_RADAR

Overall implementation of all Teen Car specifications.

class teen_car.TeenCar(color)[source]ΒΆ

Our Teen car, called β€œTeenTrek”.

This class is the main entrance to all software functions.

_drive(max_speed=100)[source]ΒΆ

Drives the car with given max speed.

Parameters:ΒΆ
max_speed=100ΒΆ

max speed in km/h. Example β€œ120”.

_get_position()[source]ΒΆ

get the current position of the car

auto_drive(target, sleep=0.1)[source]ΒΆ
Implementation: Drive the passengers autonomously to the given target address. TEEN_IMPL_RADAR ../_images/arrow-right-circle.svg
signature: auto_drive
implements: TEEN_RADAR
Parameters:ΒΆ
targetΒΆ

Adress of the target. Example: Mystreet, MyTown

sleep=0.1ΒΆ

Sleep value in seconds. Used to β€œsave ressources” ;)