def __init__(self, nol_horizontal, nol_vertical): self.grabber_enabled = False self.total_number_of_leds = ((nol_horizontal + nol_vertical) * 2) self.led_chain = LedChain(self.total_number_of_leds) self.led_chain.generate_layout(nol_horizontal, nol_vertical) self.transform = HyperionConfigSections.Transform( "leds", "0-" + str(self.total_number_of_leds - 1), HyperionConfigSections.HSV(1.0, 1.0), HyperionConfigSections.SingleColor(0.05, 2.2, 0, 1), HyperionConfigSections.SingleColor(0.05, 2.0, 0, 0.85), HyperionConfigSections.SingleColor(0.05, 2.0, 0, 0.85)) self.color = HyperionConfigSections.Color() self.smoothing = HyperionConfigSections.Smoothing("linear", 100, 20) self.device = HyperionConfigSections.Device() self.blackborderdetector = HyperionConfigSections.blackborderdetectord if HyperPyCon.amIonOSMC(): self.effects = dict(paths=["/opt/hyperion/effects"]) else: self.effects = HyperionConfigSections.effectsd self.bootsequence = HyperionConfigSections.bootsequenced if HyperPyCon.amIonWetek(): self.amlgrabber = HyperionConfigSections.amlgrabberd else: self.framegrabber = HyperionConfigSections.framegrabberd self.grabber = HyperionConfigSections.GrabberV4l2() self.xbmcVideoChecker = HyperionConfigSections.XBMCVideoChecker() self.jsonServer = HyperionConfigSections.json_serverd self.protoServer = HyperionConfigSections.proto_serverd self.tester = HyperionConfigTester.HyperionConfigTester(self.led_chain)
nol_horizontal = int(argv[1]) nol_vertical = int(argv[2]) h_depth = int(argv[3]) v_depth = int(argv[4]) #index of the led in right bottom corner offset = int(argv[5]) total_number_of_leds = ((nol_horizontal + nol_vertical) * 2) print "Arguments are" print "Number of horizontal leds: " , nol_horizontal print "Number of vertical leds: " , nol_vertical print "Horizontal depth: " , h_depth print "Vertical depth: " , v_depth print total_number_of_leds led_chain = LedChain(total_number_of_leds) led_chain.generate_layout(nol_horizontal, nol_vertical) led_chain.to_string() print "proba" print led_chain.leds_to_json_string() transform = HyperionConfigSections.Transform("idd","0-89", HyperionConfigSections.HSV(1.0,1.0), HyperionConfigSections.SingleColor(0.05,2.2,0,1), HyperionConfigSections.SingleColor(0.05,2.0,0,0.85), HyperionConfigSections.SingleColor(0.05,2.0,0,0.85)) color = HyperionConfigSections.Color() color.add_transformation(transform)