本文整理汇总了Python中output.Output.factory方法的典型用法代码示例。如果您正苦于以下问题:Python Output.factory方法的具体用法?Python Output.factory怎么用?Python Output.factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类output.Output
的用法示例。
在下文中一共展示了Output.factory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SubMaster
# 需要导入模块: from output import Output [as 别名]
# 或者: from output.Output import factory [as 别名]
import sys
sys.path.append('../vendors/usbdmx/')
from control import ControlServer, Controllable
from universe import Universe
from output import Output
from fixture import FixtureManager, RGBFixture, StairvillePAR
from module import SubMaster
from filter import AlphaFilter
from show import ShowManager
if __name__ == '__main__':
subMaster = SubMaster(['red', 'green', 'blue'], 3)
universe = Universe()
output = Output.factory('WS2801Output', channels=150)
output.addFilter(AlphaFilter())
universe.setOutput(output)
for i in range(50):
fixture = RGBFixture(channelSequence='RGB')
fixture.mapToUniverse(universe, i * 3)
fixture.addTags(['ws2801', 'pixel'])
universe = Universe()
universe.setOutput(Output.factory('DEOutput', '0000000000001337'))
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')
示例2: Universe
# 需要导入模块: from output import Output [as 别名]
# 或者: from output.Output import factory [as 别名]
import sys
sys.path.append('../vendors/adafruit/Adafruit_PWM_Servo_Driver/')
from output import Output
from filter import ScalingAlphaFilter
from input import SocketInput
from universe import Universe
if __name__ == '__main__':
output = Output.factory('AdafruitPWMOutput', address=0x40, bus=1)
output.addFilter(ScalingAlphaFilter(4095))
universe = Universe(16)
universe.setOutput(output)
input = SocketInput(universe, '192.168.4.2', 'pwm')
示例3: getattr
# 需要导入模块: from output import Output [as 别名]
# 或者: from output.Output import factory [as 别名]
if 'args' in config: args = config['args'][:]
getattr(self.modules[config['module']], config['method'])(*tuple(args))
if __name__ == '__main__':
Messenger.addOutput(ConsoleOutput())
Messenger.addOutput(LCDOutput())
Messenger.addOutput(Messaging())
receiver = UDPReceiver()
receiver.start()
remoteServer = RemoteServer()
remoteServer.start()
universe = Universe()
output = Output.factory('LPD8806Output', 180)
output.addFilter(AlphaFilter())
#output = Output.factory('WebsocketOutput')
universe.setOutput(output)
for i in range(60):
fixture = RGBFixture()
fixture.mapToUniverse(universe, i * 3)
fixture.addTags(['lpd8806', 'strip'])
universe = Universe()
universe.setOutput(Output.factory('SerialOutput', 0, 32))
for i in range(4):
fixture = RGBFixture()
fixture.mapToUniverse(universe, i * 3)
示例4: Universe
# 需要导入模块: from output import Output [as 别名]
# 或者: from output.Output import factory [as 别名]
import sys
sys.path.append('../vendors/python-artnet/src/')
from output import Output
from filter import ScalingAlphaFilter
from input import SocketInput
from universe import Universe
if __name__ == '__main__':
output = Output.factory('WS2801Output', channels=150)
output.addFilter(ScalingAlphaFilter(255))
universe = Universe(150)
universe.setOutput(output)
input = SocketInput(universe, '192.168.4.2', 'ws2801')