예제 #1
0
파일: main.py 프로젝트: LouisIV/dirty-leds
    def __init__(self, board):
        self.board = board
        self.config = config.settings["devices"][board]["configuration"]
        self.effectConfig = config.settings["devices"][board]["effect_opts"]
        self.visualizer = Visualizer(self)
        self.signalProcessor = DSP(self)

        self.esp = devices.ESP8266(auto_detect=self.config["AUTO_DETECT"],
                                   mac_addr=self.config["MAC_ADDR"],
                                   ip=self.config["UDP_IP"],
                                   port=self.config["UDP_PORT"])
예제 #2
0
파일: main.py 프로젝트: uen/dirty-leds
 def __init__(self, board):
     self.board = board
     self.config = config.settings["devices"][board]["configuration"]
     self.effectConfig = config.settings["devices"][board]["effect_opts"]
     self.visualizer = Visualizer(self)
     self.signalProcessor = DSP(self)
 
     self.esp = devices.ESP8266(
         ip            = self.config["UDP_IP"],
         port          = self.config["UDP_PORT"],
         leds          = self.config["N_PIXELS"]
     )
예제 #3
0
    def __init__(self, b):
        self.board = b
        self.config = config.settings["devices"][self.board]["configuration"]

        self.visualizer = Visualizer(self)

        config.settings["devices"][self.board]["effect_opts"] = {}

        for effectName, effect in self.visualizer.effects.items():
            config.settings["devices"][
                self.board]["effect_opts"][effectName] = {}
            for prop in effect.configProps:
                config.settings["devices"][
                    self.board]["effect_opts"][effectName][prop[0]] = prop[-1]

        self.effectConfig = config.settings["devices"][
            self.board]["effect_opts"]

        self.signalProcessor = DSP(self)

        self.esp = devices.ESP8266(self.config["UDP_IP"],
                                   self.config["UDP_PORT"])