def __init__(self, filter = None): self.endEvent = threading.Event() self.doRun = True if filter is None: self.fixtureList = FixtureManager else: self.fixtureList = FixtureManager.filter(filter) super(Show, self).__init__();
for i in range(2): fixture = StairvillePAR() fixture.mapToUniverse(universe, i * 5) fixture.addTags(['dmx']) for i in reversed(range(2)): fixture = RGBFixture(channelSequence='RGB') fixture.mapToUniverse(universe, i * 10 + 19) fixture.addTags(['dmx', 'par']) for i in reversed(range(50)): fixture = RGBFixture(channelSequence='RGB') fixture.mapToUniverse(universe, i * 3 + 49) fixture.addTags(['ws2801', 'pixel']) for fixture in FixtureManager.filter(lambda f : f.hasTag('rgb')): for name in ['red', 'green', 'blue']: subMaster.mapChannel(name, fixture.getNamedChannel(name)) showManager = ShowManager() #showManager.addShow('knightrider', 'Knight Rider', [ # 'KnightRider', # {'red':255, 'green':0, 'blue':0}, # {'red':0, 'green':0, 'blue':0} #]) def pixelFilter(f): return f.hasTag('pixel') def parFilter(f):
# bands.append(band) subMaster = SubMaster(['strip red', 'strip green', 'strip blue', 'strip white', 'dimmer red', 'dimmer green', 'dimmer blue', 'dimmer white', 'dj', 'PARs red', 'PARs green', 'PARs blue', 'PARs white', 'pixel red', 'pixel green', 'pixel blue', 'pixel white', 'halogen', 'master red', 'master green', 'master blue'], 21) for name in ['red', 'green', 'blue']: subMaster.mapChannel('master ' + name, subMaster.getChannel('pixel ' + name)) subMaster.mapChannel('master ' + name, subMaster.getChannel('strip ' + name)) subMaster.mapChannel('master ' + name, subMaster.getChannel('dimmer ' + name)) subMaster.mapChannel('master ' + name, subMaster.getChannel('PARs ' + name)) subMaster.mapChannel('pixel white', subMaster.getChannel('pixel ' + name)) subMaster.mapChannel('strip white', subMaster.getChannel('strip ' + name)) subMaster.mapChannel('dimmer white', subMaster.getChannel('dimmer ' + name)) subMaster.mapChannel('PARs white', subMaster.getChannel('PARs ' + name)) subMaster.mapChannels('strip ' + name, FixtureManager.filter(lambda f : f.hasTag('strip')).getChannels(name)) subMaster.mapChannels('pixel ' + name, FixtureManager.filter(lambda f : f.hasTag('pixel')).getChannels(name)) subMaster.mapChannels('dimmer ' + name, FixtureManager.filter(lambda f : f.hasTag('rgb', 'dimmer')).getChannels(name)) subMaster.mapChannels('PARs ' + name, FixtureManager.filter(lambda f : f.hasTag('par')).getChannels(name)) subMaster.mapChannels('dj', FixtureManager.filter(lambda f : f.hasTag('ikea')).getChannels('brightness')) subMaster.mapChannels('halogen', FixtureManager.filter(lambda f : f.hasTag('halogen')).getChannels('brightness')) showManager = ShowManager() showManager.addShow('knightrider', 'Knight Rider', [ 'KnightRider', {'red':255, 'green':0, 'blue':0}, {'red':0, 'green':0, 'blue':0} ])