Skip to content

Blaster

ReadyControl (Switch)

Input class to display if player is ready

Attributes:

Name Type Description
led_ctl

Instance to control RGB LEDs

__init__(self, seat, name, led_ctl) special

Parameters:

Name Type Description Default
seat int

controller seat

required
name str

Name of the control

required
led_ctl LEDControl

Instance to control RGB LEDs

required
Source code in controls/ready.py
def __init__(self, seat: int, name: str, led_ctl: LEDControl):
    """
        Arguments:
            seat: controller seat
            name: Name of the control
            led_ctl: Instance to control RGB LEDs
    """

    super().__init__(seat, name)

    self.led_ctl = led_ctl

    logging.info(f"{name} initialized")

close(self, seat) async

Release LEDs and the sensor

Source code in controls/ready.py
async def close(self, seat: int):
    """
        Release LEDs and the sensor
    """

    logging.info(f"Close {self.name}")

init(self, seat) async

Turn off all LEDs

Parameters:

Name Type Description Default
seat int

controller seat

required
Source code in controls/ready.py
async def init(self, seat: int):
    """
        Turn off all LEDs

        Arguments:
            seat: controller seat
    """

    self.led_ctl.switch_off_leds()

off(self, _) async

" Called when switch is released

Parameters:

Name Type Description Default
seat

controller seat

required
Source code in controls/ready.py
async def off(self, _: int):
    pass

on(self, seat) async

Turn on LEDs

Parameters:

Name Type Description Default
seat int

controller seat

required
Source code in controls/ready.py
async def on(self, seat: int):
    """
        Turn on LEDs

        Arguments:
            seat: controller seat
    """

    self.led_ctl.all_leds_green()
Back to top