garmi_parti.peripherals package

Submodules

garmi_parti.peripherals.joystick module

class garmi_parti.peripherals.joystick.SerialJoysticks

Bases: object

Serial interface for custom joystick.

close()

Stop threads reading from com ports.

Return type:

None

find_ports()

Returns a list of potential joystick com ports.

Return type:

list[str]

handle_changes(changes)

Called periodically with a list of button state changes. Override this function to attach functionality to the buttons.

Parameters:

changes (list[tuple[str, str] | tuple[str, str, int]])

Return type:

None

read_id(port, lines_to_ignore=3)

Tries to read the joystick id from the given com port.

Parameters:
Return type:

str | None

start()

Finds all connected joystick devices and reads from them. Changes in the button states are processed in handle_changes().

Return type:

None