コード例 #1
0
    def __init__(self, *args):
        self.inputParams = {
            'multiVal': {
                'descriptionInPattern': 'Parameters',
                'type': 'multi',
                'subType': 'basic',
                'number': 3,
                'basicInputType': 'int value',
                'min': [1, 1, 1],
                'max': [5, 5, 3],
                'default': [2, 1, 1],
                'description': ['Poofers', 'Jump', 'Pulses'],
                'channels': ['numberOn', 'stepping', 'numberPulses']
            },
            'triggerStep': {
                'descriptionInPattern': 'Trigger next step in sequence',
                'type': 'pulse',
                'subType': 'timer',
                'bindToFunction': 'triggerStep',
                'min': 50,
                'max': 3000,
                'default': 100
            },
            'triggerSequence': {
                'descriptionInPattern': 'Trigger chase',
                'type': 'pulse',
                'subType': 'onOff',
                'bindToFunction': 'triggerSequence'
            },
            'reverse': {
                'descriptionInPattern': 'Reverse direction',
                'type': 'pulse',
                'subType': 'onOff',
                'default': False
            },
            'numberOn': {
                'descriptionInPattern': 'Number of poofers on',
                'type': 'value',
            },
            'stepping': {
                'descriptionInPattern': 'Number of poofers to jump',
                'type': 'value',
            },
            'numberPulses': {
                'descriptionInPattern': 'Number of pulses',
                'type': 'value',
            }
        }
        PatternBase.__init__(self, *args)
        self.patternName = 'Poofer Chase'

        self.position = 0
        self.sequenceTriggered = True
コード例 #2
0
	def __init__(self, *args):
		self.inputParams = {
			'multiVal' : {
				'descriptionInPattern' : 'Parameters',
				'type' : 'multi',
				'subType' : 'basic',
				'number' : 3,
				'basicInputType' : 'int value',
				'min' : [1, 1, 1],
				'max' : [5, 5, 3],
				'default' : [2, 1, 1],
				'description' : ['Poofers', 'Jump', 'Pulses'],
				'channels' : ['numberOn', 'stepping', 'numberPulses']
			},
			'triggerStep' : {
				'descriptionInPattern' : 'Trigger next step in sequence',
				'type' : 'pulse',
				'subType' : 'timer',
				'bindToFunction' : 'triggerStep',
				'min' : 50,
				'max' : 3000, 
				'default' : 100
			},
			'triggerSequence' : {
				'descriptionInPattern' : 'Trigger chase',
				'type' : 'pulse',
				'subType' : 'onOff',
				'bindToFunction' : 'triggerSequence'
			},
			'reverse' : {
				'descriptionInPattern' : 'Reverse direction',
				'type' : 'pulse',
				'subType' : 'onOff',
				'default' : False
			},
			'numberOn' : {
				'descriptionInPattern' : 'Number of poofers on',
				'type' : 'value',
			},
			'stepping' : {
				'descriptionInPattern' : 'Number of poofers to jump',
				'type' : 'value',
			},
			'numberPulses' : {
				'descriptionInPattern' : 'Number of pulses',
				'type' : 'value',
			}
		}
		PatternBase.__init__(self, *args)
		self.patternName = 'Poofer Chase'

		self.position = 0
		self.sequenceTriggered = True
コード例 #3
0
	def __init__(self, gridSize, *args):
		self.inputParams = {
			'randomGenerator' : {
				'descriptionInPattern' : 'Random generator',
				'type' : 'multi',
				'subType' : 'randomPulse',
				'bindToFunction' : 'changePooferState',
				'number' : gridSize[0] * gridSize[1]
			},
		}
		PatternBase.__init__(self, gridSize, *args)
		self.patternName = 'Random Poof'
		self.poofStates = [[False for i in range(self.gridSize[1])] for i in range(self.gridSize[0])]
コード例 #4
0
 def __init__(self, gridSize, *args):
     self.inputParams = {
         'randomGenerator': {
             'descriptionInPattern': 'Random generator',
             'type': 'multi',
             'subType': 'randomPulse',
             'bindToFunction': 'changePooferState',
             'number': gridSize[0] * gridSize[1]
         },
     }
     PatternBase.__init__(self, gridSize, *args)
     self.patternName = 'Random Poof'
     self.poofStates = [[False for i in range(self.gridSize[1])]
                        for i in range(self.gridSize[0])]
コード例 #5
0
	def __init__(self, *args):
		self.inputParams = {
			'poofButton' : {
				'descriptionInPattern' : 'Poof!',
				'type' : 'pulse',
				'subType' : 'button',
				'bindToFunction' : 'poofButton'
			},
			'stayOnTime' : {
				'descriptionInPattern' : 'Time to stay on for(ms)',
				'type' : 'value',
				'subType' : 'int',
				'min' : 100,
				'max' : 1000,
				'default' : 200
			},
		}
		PatternBase.__init__(self, *args)
		self.patternName = 'Allpoof'
		self.timer = Timer(False, self.inputs.stayOnTime, self.turnOff)
		self.poofState = False
コード例 #6
0
 def __init__(self, *args):
     self.inputParams = {
         'poofButton': {
             'descriptionInPattern': 'Poof!',
             'type': 'pulse',
             'subType': 'button',
             'bindToFunction': 'poofButton'
         },
         'stayOnTime': {
             'descriptionInPattern': 'Time to stay on for(ms)',
             'type': 'value',
             'subType': 'int',
             'min': 100,
             'max': 1000,
             'default': 200
         },
     }
     PatternBase.__init__(self, *args)
     self.patternName = 'Allpoof'
     self.timer = Timer(False, self.inputs.stayOnTime, self.turnOff)
     self.poofState = False
コード例 #7
0
	def stop(self):
		self.timer.stop()
		PatternBase.stop(self)
コード例 #8
0
 def stop(self):
     self.timer.stop()
     PatternBase.stop(self)