controllables.Seat

class controllables.Seat(port: Optional[int] = None)

Reference to a seat part.

The following example assumes a seat is assigned to port 0 of the microcontroller

from time import sleep
from controllables import Seat

seat = Seat(0)
seat.close()
sleep(4)
seat.open()
close()

Closes the lap bar.

from controllables import Seat

seat = Seat(0)
seat.close()
open()

Releases the close signal to a seat reference causing it to open if closeded via that seat reference. If the seat is being closeded via another script, reference object, or transmitter, it will remain closed.

from time import sleep
from controllables import Seat

seat = Seat(0)
seat.close()
sleep(3)
seat.open()
property auto_engage: bool

Lap bar will lock automatically once a human is seated if True.

from controllables import Seat

seat = Seat(0)
seat.auto_engage = True
closed() bool

Returns True if lap bar is currently engaged.

from controllables import Seat

seat = Seat(0)
if not seat.closed():
    seat.close()
occupied() bool

Returns True if the general seat area is occupied by human or other object.

from controllables import Seat

seat = Seat(0)

while not seat.occupied():
    print("Seat is not occupied")
name() str

Returns the user editable name of the controllable as found in the properties tab of the game.

The following example assumes that any controllable or sensor is assigned to port 0 and prints out its name.

from ports import PortReference

print(PortReference(0).name())