INNER CODE UNIT · Python

terrariumButton

theyosh/TerrariumPI · hardware/button/__init__.py:38

class terrariumButton(object):
    HARDWARE = None
    NAME = None

    RELEASED = 0
    PRESSED = 1

    @classproperty
    def available_hardware(__cls__):
        return terrariumUtils.loadHardwareDrivers(__cls__, __name__, __file__, "*_button.py")

    @classproperty
    def available_buttons(__cls__):
        return [
            {"hardware": hardware_type, "name": button.NAME}
            for hardware_type, button in __cls__.available_hardware.items()
        ]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…