-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
-
timeout
-
vehicles
-
map
-
map_types
read-write float
attribute
Controls the timeout for connection attempts using Controller.connectOne
, Controller.connectSpecific
, and Controller.connectMany
read-write set
of Vehicle
attribute
A set of the vehicles currently connected to the controller.
Optional read-write list
of TrackPiece
attribute
Ordered list of all track pieces as it is returned by Controller.scan
. Is None
if
read-only tuple
of TrackPieceType
property
Ordered tuple containing the types of the pieces in Controller.map
in-order.
Connect to one undetermined non-charging Supercar and return the Vehicle instance
- Optional
vehicle_id
: The id given to theVehicle
instance on connection
A Vehicle
object representing the connected supercar
-
VehicleNotFound
: No supercar was found in the set timeout\n -
ConnectionTimedoutException
: The connection attempt to the supercar did not succeed within the set timeout -
ConnectionDatabusException
: A databus error occured whilst connecting to the supercar -
ConnectionFailedException
: A generic error occured whilst connection to the supercar
Connect to a supercar with a specified MAC address
-
address
: A string representing the MAC-address of the vehicle to connect to. This needs to be uppercase seperated by colons - Optional
vehicle_id
: An integer id given to the vehicle on connection.
A Vehicle
object representing the connected supercar
-
VehicleNotFound
: No supercar was found in the set timeout -
ConnectionTimedoutException
: The connection attempt to the supercar did not succeed within the set timeout -
ConnectionDatabusException
: A databus error occured whilst connecting to the supercar -
ConnectionFailedException
: A generic error occured whilst connection to the supercar
Connect to non-charging Supercars
-
amount
: An integer amount representing the number of vehicles to connect to - Optional
vehicled_ids
: An iterable with the ids the vehicles will get on connection. Any number of these entries may be None
A tuple of connected Vehicle
instances.
-
ValueError
: The amount of requested supercars does not match the length ofvehicle_ids
. -
VehicleNotFound
: No supercar was found in the set timeout -
ConnectionTimedoutException
: The connection attempt to the supercar did not succeed within the set timeout -
ConnectionDatabusException
: A databus error occured whilst connecting to the supercar -
ConnectionFailedException
: A generic error occured whilst connection to the supercar
Assembles a digital copy of the map and adds it to every connected vehicle.
- Optional
scan_vehicle
: When passed a Vehicle object, this vehicle will be used as a scanner. Otherwise a scanner will be selected automatically. - Optional
align_pre_scan
: When set to True, the supercars can start from any position on the map and align automatically before scanning. Disabling this means your supercars need to start between START and FINISH
A list
of TrackPiece
representing the scanned in map.
-
DuplicateScanWarning
: The map was already scanned in. This scan will be skipped.
Disconnects from all the connected supercars
-
DisconnectTimedoutException
: A disconnection attempt timed out -
DisconnectFailedException
: A disconnection attempt failed for unspecific reasons
Handles a shutdown neatly and disconnects the vehicles
-
DisconnectTimedoutException
: A disconnection attempt timed out -
DisconnectFailedException
: A disconnection attempt failed for unspecific reasons
-
on_track_piece_change
-
wait_for_track_change
-
connect
-
disconnect
-
setSpeed
-
stop
-
changeLane
-
changePosition
-
turn
-
getLane
-
align
-
trackPieceChange
-
removeTrackPieceWatcher
-
ping
-
pong
-
is_connected
-
current_track_piece
-
map
-
map_position
-
road_offset
-
speed
-
current_lane3
-
current_lane4
-
id