示例#1
0
 def test_LoadMusicFile(self):
     vix = Vixen()
     musfile = '..\\VixenFiles\\Music\\03 - This Is Halloween.ogg'
     self.assertTrue(os.path.exists(musfile),
                     'Audio File is missing from filesystem')
     vix.loadmusic(musfile)
     #print test2.value(0,100)
     #test2.play()
     while True:
         for per in range(vix.periods):
             print vix.musicfilename
             print vix.period(per)
             vix.pos_syncwait(per)
         else:
             break
示例#2
0
 def test_LoadXMLFile(self):
     test3 = Vixen()
     rootdir = os.path.dirname(os.path.realpath(__file__))
     SequencePath = os.path.join(
         rootdir,
         os.path.join("VixenFiles", os.path.join("Sequences", "*.vix")))
     SequencePath = "..\\VixenFiles\\Sequences\\"
     print SequencePath
     for file in os.listdir(SequencePath):
         if (file[-3:]) == "vix":
             print file,
             print test3.channels
     self.assertRaises(IndexError, test3.loadfile,
                       os.path.join(SequencePath, file))
示例#3
0
 def test_LoadMusicFile(self):
     vix = Vixen()
     musfile = '..\\VixenFiles\\Music\\03 - This Is Halloween.ogg'
     self.assertTrue(os.path.exists(musfile),'Audio File is missing from filesystem')
     vix.loadmusic(musfile)
     #print test2.value(0,100)
     #test2.play()
     while True:
         for per in range(vix.periods):
             print vix.musicfilename
             print vix.period(per)
             vix.pos_syncwait(per)
         else:
             break;
示例#4
0
 def test_VixFilePluginDataIsPresent(self):
     vixfilename = "../VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
     test3 = Vixen()
     test3.loadfile(vixfilename)
     test3.pluginData
     self.assertEqual(1, 2, 'not')
示例#5
0
 def test_LoadWindowsPath(self):
     test1 = Vixen()
     vixfilename = "../VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
     print os.path.exists(vixfilename)
     test1.loadfile(vixfilename)
     self.assertEqual(test1.periods, 0, 'periods did not match file')
示例#6
0
sys.path.append('../vixen')
from vixen import Vixen
from ArduinoSerial import ArduinoSerial

BLACK    = (   0,   0,   0)
WHITE    = ( 255, 255, 255)
GREEN    = (   0, 255,   0)
RED      = ( 255,   0,   0)
ORANGE   = ( 255, 153,   0)
YELLOW   = ( 255, 255,   0)
BLUE     = ( 0,   0,   255)

COLOR = ORANGE

ard = ArduinoSerial()
vix = Vixen()

'''
vixfilename = "C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Sequences\\Arduino6ChannelThisIsHolloweenMain.vix"
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\PythonDecodeSample2.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino6ChannelTechNewsToday.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino8ChannelPatternsSample.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino8ChannelChristmasLinusAndLucy.vix'

musfile = 'C:/Users/BOSCIA/Documents/Projects/VixenDecode/03 - This Is Halloween.ogg'
#musfile = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Audio\tnt0858.mp3'
#vixfilename = "./VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
#musfile = '03 - This Is Halloween.ogg'

vixfilename = "C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Sequences\\Arduino8ChannelChristmasLinusAndLucy.vix"
musfile = 'C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Audio\\04-A Charlie Brown Christmas-Linus and Lucy.mp3'
示例#7
0
 def test_VixFilePluginDataIsPresent(self):
     vixfilename = "../VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
     test3 = Vixen()
     test3.loadfile(vixfilename)
     test3.pluginData
     self.assertEqual(1,2,'not')
示例#8
0
 def test_LoadWindowsPath(self):
     test1 = Vixen()
     vixfilename = "../VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
     print os.path.exists(vixfilename)
     test1.loadfile(vixfilename)
     self.assertEqual(test1.periods,0,'periods did not match file')
示例#9
0
from vixen import Vixen
from ArduinoSerial import ArduinoSerial

ard = ArduinoSerial()

BLACK    = (   0,   0,   0)
WHITE    = ( 255, 255, 255)
GREEN    = (   0, 255,   0)
RED      = ( 255,   0,   0)
ORANGE   = ( 255, 153,   0)
YELLOW   = ( 255, 255,   0)
BLUE     = ( 0,   0,   255)

COLOR = BLUE

vix = Vixen()
vix.channels = 8

channels = vix.channels

box_width = 10
box_gap   = 20
box_off   = 50
per = 0

pygame.font.init()
mfont = pygame.font.SysFont(None, 25)	

vix.periods=10000

#Opening and setting the window size
示例#10
0
	'Arduino8ChannelChristmasIsComing.vix',
	'Arduino8ChannelChristmasLinusAndLucy.vix',
	'Arduino8ChannelDrummer.vix',
	'Arduino8ChannelOhChristmasTree.vix',
	'Arduino8ChannelSkating.vix',
#	'Arduino8ChannelZeldaMainTheme.vix',
]
periods = 0
'''TODO: why issues with index'''
'''TODO: prevent multiple instances'''
for file in files:
	vixfilename = file
	print 
	print 
	print file
	vix = Vixen()
	vix.basedir('/home/pi/github/vixen-python/VixenFiles')
	vix.loadfile(vixfilename)
	print vix.channels
	vix.processdata(vix.event_values,vix.channels)
#	vix.set_screen((200,200))
	periods += vix.periods
	print periods
print "=================================="
print
print "Time: ",
print periods / 10 /60,
print "minutes",
print periods / 10 %60,
print "seconds"
print "periods",
示例#11
0
#check files
from vixen import Vixen
from ArduinoSerial import ArduinoSerial

''' Test 1: full filename '''
print "============== Test 1 ================="
vixfilename = "C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Sequences\\Arduino8ChannelChristmasLinusAndLucy.vix"
musfile = 'C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Audio\\04-A Charlie Brown Christmas-Linus and Lucy.mp3'

vix = Vixen()
vix.loadfile(vixfilename)
vix.loadmusic(musfile)
vix.play()
vix = None


'''Test 2 relative file path'''
print "============== Test 2 ================="
vixfilename = "Arduino8ChannelChristmasLinusAndLucy.vix"
musfile = '04-A Charlie Brown Christmas-Linus and Lucy.mp3'

vix = Vixen()
vix.basedir('C:/Users/BOSCIA/Portable/Vixen 2.1.1.0')
vix.loadfile(vixfilename)
vix.loadmusic(musfile)
vix.play()
vix = None

'''Test 3 relative file path, get music from Sequence'''
print "============== Test 3 ================="
vixfilename = "Arduino8ChannelChristmasLinusAndLucy.vix"
示例#12
0
    #	'Arduino8ChannelChironBetaPrime.vix',
    'Arduino8ChannelChristmasIsComing.vix',
    'Arduino8ChannelChristmasLinusAndLucy.vix',
    'Arduino8ChannelDrummer.vix',
    'Arduino8ChannelOhChristmasTree.vix',
    'Arduino8ChannelSkating.vix',
    #	'Arduino8ChannelZeldaMainTheme.vix',
]
'''TODO: why issues with index'''
'''TODO: prevent multiple instances'''
for file in files:
    vixfilename = file
    print
    print
    print file
    vix = Vixen()
    vix.basedir('/home/pi/github/vixen-python/VixenFiles')
    vix.loadfile(vixfilename)
    print vix.channels
    vix.processdata(vix.event_values, vix.channels)
    vix.set_screen((200, 200))
    vix.play()
    done = False
    per = 0
    while not done:
        #for event in vix.pygame.event.get():
        #	if event.type == vix.pygame.QUIT: # If user clicked close
        #		done = True
        #	if event.type == vix.pygame.KEYDOWN:
        #		if event.key == vix.pygame.K_ESCAPE:
        #			done = True
示例#13
0
#	'Arduino8ChannelOhChristmasTree.vix',
#	'Arduino8ChannelSkating.vix',
#	'Arduino8ChannelZeldaMainTheme.vix',
]

'''TODO: why issues with index'''
'''TODO: prevent multiple instances'''
counter=0
while True:
	file = files[counter % len(files)] 
	counter+=1
	vixfilename = file
	print 
	print 
	print file
	vix = Vixen()
	vix.basedir('/home/pi/github/vixen-python/VixenFiles')
	vix.loadfile(vixfilename)
	print vix.channels
	vix.processdata(vix.event_values,vix.channels)
	vix.set_screen((200,200))
	vix.play()
	done = False
	per = 0
	while not done:
		#for event in vix.pygame.event.get(): 
		#	if event.type == vix.pygame.QUIT: # If user clicked close
		#		done = True
		#	if event.type == vix.pygame.KEYDOWN: 
		#		if event.key == vix.pygame.K_ESCAPE:
		#			done = True 
示例#14
0
class VixenBaseTest(unittest.TestCase):
    vixen = None

    def suite():
        suite = unittest.TestLoader().loadTestsFromTestCase(VixenBaseTest)
        return suite
        
    def setUp(self):
        self.vixen = Vixen() 
    	self.datastr = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvAAAmISEAAAAAAAAAAAAAAAAAAAAAAAAAAAAnhgAAFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjIyMjIyMjIyMjIyMjIyMjAAApKQAoACOjgAAAAAAAAAAAAAAAAAAAAAAAGJiYmJiYmJiYrQ6TElORnWIWlJKR0BLcV9gVk0oWmpZaVdYNlpxZUtEPjEoelgxSnpXOGRHR1lbSktnY2RXX1RNhXtuZ1IrIFhpV0BgUidKb1szfWxUQmBkVGpyT0FLVzArHBQOZF49PnB+W2iBdmSfm1GElKBucXhmT2d3hZ2OAAAAAAAAAAAAAAAAAAAAAK2HX1qYXDuxrnhTakEelb1DPHZINm6ITUWAfz5sn1pkiG47XqeyZ2JodUupn3F3b0hAhXxwWGM/JnCCbmR2U0OKfYVCTkIkP4tJJ1hKKi9gQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBaRVFvcGGjknRSWFJHdllbZnJjVUaKg0tuSEBBaT4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZEh7pIxcd1BMqoliWWdMMGCSbVZfXURVtGpgUlgyUa6Vj4KbWTfosLSOm3YzAAAAAAAAAAAAAAAAAItyhU0AAAAAAABDPjcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHOwj0FBhEQivbCMXE4/JXidQDFvUDswbFZJfl1Pc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UK+vUAAAr1AAAAAAAK8AAACvAAAArwCvAK8AAK+TkY+vi4mHr4Kvfq96eHZ0cm9ta2lnZWNhX1xaWFZUUlBOTElHRUNBPz07OTY0MjAuLCooJiMhHx0bGRcVExAODAoIBgQCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
        self.vixen.processdata(self.datastr,6)

    def tearDown(self):
        self.vixen = None

    def test_nothing(self):
        pass

    def test_ProcessData(self):    
        self.assertEqual(self.vixen.periods,1967,'unable to process data correctly')
     
    #@unittest.skip("broken test") 
    def test_SequenceFirstValue(self):
        print ord(self.vixen.sequence[0][0])
        self.assertEqual(ord(self.vixen.sequence[0][0]),0,'sequence does not match')
        
    #@unittest.skip("still need to test exceptions") 
    def test_ProcessDataIncorrectly(self):
        datastr = "ASDFASEASDFASFEEE"
        self.assertRaises(BaseException,self.vixen.processdata,datastr,6)

    @unittest.skip("the order of this test with the next causes a broken test") 
    def test_GetPositionBeforePlay(self):
        pos = self.vixen.get_pos()
        print "hello from before " + str(pos)
        print "hello2 from before " + str(pos)
        self.assertEqual(pos,0,'position Not set correctly')

    @unittest.skip("the order of this test with the previous causes a broken test") 
    def test_GetPositionZAfterPlay(self):
        self.vixen.play()
        pos = self.vixen.pos_syncwait(10,10)
        pos = self.vixen.get_pos()
        print "hello from after " + str(pos)
        print "hello2 from after " + str(pos)
        self.assertTrue(pos>0,'postition did not increase')

    def test_TicksAtPeriodTen(self):
        ticks = self.vixen.ticks_at_per(10)
        print "ticks at per 1 "+str(ticks)
        self.assertEqual(ticks,1000,'ticks did not calculate correctly')  

    def test_valueAtPeriodOne(self):
        val = self.vixen.value(1,1)
        print "value at per 1 channel 1 "+str(val)
        self.assertEqual(val,0,'value not set correctly')

    def test_valueAtPeriodOneHundred(self):
        val = self.vixen.value(0,100)
        print "value at per 100 channel 1 "+str(val)
        self.assertEqual(val,140,'value not set correctly')

    #@unittest.skip("setting values does not work") 
    def test_SetValueForAPoint(self):
        ch = 0
        per = 3
        setval = 141
        #print "sequence"
        #print ord(self.vixen.sequence[ch][per])
        val = self.vixen.value(ch,per)
        self.assertNotEqual(val,setval,'values are the same before set')
        #print "value at per "+ str(per) +" channel "+str(ch)+" "+str(val)
        self.vixen.set_value(ch,per,setval)
        val = self.vixen.value(ch,per)
        #print "value at per "+str(per)+" channel "+str(ch)+" "+str(val)
        self.assertEqual(val,setval,'set value does not set correctly')
    
    def test_SetValueToChannelOutOfRange(self):
        self.assertRaises(IndexError,self.vixen.set_value,self.vixen.channels+1,10,100)
    
    def test_NumberOfChannels(self):
        self.assertEqual(self.vixen.channels,6,'number of channels does not equal 6')

    def test_NumberOfValuesInArray(self):
        self.assertEqual(self.vixen.periods,1967,'there are not all periods in periods')

    def test_PeriodStr(self):
        val = self.vixen.period_str(100)
        self.assertEqual(val,'per: 100/1967: 140,000,000,000,000,000','period string format changed')
        
    def test_ProcessZeroChannels(self):
        self.vixen.channels = 0
        self.assertRaises(BaseException,self.vixen.processdata,self.datastr,0)
示例#15
0
import pygame
import os
import time
from vixen import Vixen

BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
ORANGE = (255, 153, 0)
YELLOW = (255, 255, 0)
BLUE = (0, 0, 255)

COLOR = ORANGE

vix = Vixen()
vixfilename = "C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Sequences\\Arduino6ChannelThisIsHolloweenMain.vix"
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\PythonDecodeSample2.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino6ChannelTechNewsToday.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino8ChannelPatternsSample.vix'
#vixfilename = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Sequences\Arduino8ChannelChristmasLinusAndLucy.vix'

musfile = 'C:/Users/BOSCIA/Documents/Projects/VixenDecode/03 - This Is Halloween.ogg'
#musfile = 'C:\Users\BOSCIA\Portable\Vixen 2.1.1.0\Audio\tnt0858.mp3'
#vixfilename = "./VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
#vixfilename = "./VixenFiles/Sequences/Arduino6ChannelThisIsHolloweenMain.vix"
#musfile = '03 - This Is Halloween.ogg'

#vixfilename = "C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Sequences\\Arduino8ChannelChristmasLinusAndLucy.vix"
#musfile = 'C:\\Users\\BOSCIA\\Portable\\Vixen 2.1.1.0\\Audio\\04-A Charlie Brown Christmas-Linus and Lucy.mp3'
示例#16
0
 def test_VixFilePluginDataIsNotPresent(self):
     test3 = Vixen()
     SequencePath = "../VixenFiles/Sequences/PythonDecodeSample2.vix"
     #test3.loadfile(SequencePath)
     self.assertRaises(IndexError, test3.loadfile, SequencePath)
示例#17
0
 def test_PlayVixFileToEnd(self):
     test3 = Vixen()
     #rootdir = os.path.dirname(os.path.realpath(__file__))
     #SequencePath = os.path.join(rootdir,os.path.join("VixenFiles",os.path.join("Sequences","*.vix")))
     SequencePath = "../VixenFiles/Sequences/PythonDecodeSample2.vix"
     test3.loadfile(SequencePath)
示例#18
0
files = [
	'Arduino6ChannelPumpkinHeffalumpsA2-g.vix'
	,'Arduino6ChannelPumpkinGrinningGhosts.vix'
	,'Arduino6ChannelThisIsHolloweenMain.vix'
]

'''TODO: why issues with index'''
'''TODO: prevent multiple instances'''
done = False
for file in files:
	vixfilename = file
	print 
	print 
	print file
	vix = Vixen()
	#vix.basedir('/home/pi/Github/vixen-python/VixenFiles')
	vix.basedir('../VixenFiles')
	vix.loadfile(vixfilename)
	print vix.channels
	vix.processdata(vix.event_values,vix.channels)
	vix.set_screen((200,200))
	vix.play()
	per = 0
	while not done:
		if per >= vix.periods - 3:
			done = True
		vix.pos_syncwait(per)
		per += 1
		#print vix.periods, per
		ard.send(vix.period_arr(per))
示例#19
0
print 'Running ArduinoProgram.py'

files = [
    'Arduino6ChannelPumpkinHeffalumpsA2-g.vix',
    'Arduino6ChannelPumpkinGrinningGhosts.vix',
    'Arduino6ChannelThisIsHolloweenMain.vix'
]
'''TODO: why issues with index'''
'''TODO: prevent multiple instances'''
done = False
for file in files:
    vixfilename = file
    print
    print
    print file
    vix = Vixen()
    #vix.basedir('/home/pi/Github/vixen-python/VixenFiles')
    vix.basedir('../VixenFiles')
    vix.loadfile(vixfilename)
    print vix.channels
    vix.processdata(vix.event_values, vix.channels)
    vix.set_screen((200, 200))
    vix.play()
    per = 0
    while not done:
        if per >= vix.periods - 3:
            done = True
        vix.pos_syncwait(per)
        per += 1
        #print vix.periods, per
        ard.send(vix.period_arr(per))
示例#20
0
class VixenBaseTest(unittest.TestCase):
    vixen = None

    def suite():
        suite = unittest.TestLoader().loadTestsFromTestCase(VixenBaseTest)
        return suite

    def setUp(self):
        self.vixen = Vixen()
        self.datastr = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvAAAmISEAAAAAAAAAAAAAAAAAAAAAAAAAAAAnhgAAFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjIyMjIyMjIyMjIyMjIyMjAAApKQAoACOjgAAAAAAAAAAAAAAAAAAAAAAAGJiYmJiYmJiYrQ6TElORnWIWlJKR0BLcV9gVk0oWmpZaVdYNlpxZUtEPjEoelgxSnpXOGRHR1lbSktnY2RXX1RNhXtuZ1IrIFhpV0BgUidKb1szfWxUQmBkVGpyT0FLVzArHBQOZF49PnB+W2iBdmSfm1GElKBucXhmT2d3hZ2OAAAAAAAAAAAAAAAAAAAAAK2HX1qYXDuxrnhTakEelb1DPHZINm6ITUWAfz5sn1pkiG47XqeyZ2JodUupn3F3b0hAhXxwWGM/JnCCbmR2U0OKfYVCTkIkP4tJJ1hKKi9gQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBaRVFvcGGjknRSWFJHdllbZnJjV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AAAAAAAAAAAAAAAAAAAAAAAAAAAABCX6WeppWrWV7Yo5KMimg1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFmDXVNehDxFk3xpYlNZMV58MnuFUTN8fV1Xb083ZlRTYWpIQFlOW1FPPkNMbUZcW01db3dtTEpbX2m/w6h1m11pkq+YhYlhY6fBpW5gXDKMy7aquaeMsbmsmp2Bj5GZpsKchohc3s2penJoSsbJoqS7usXR59Ois4GMs8DKmYaBebTevsmIcVeKw7igov7FgMywt4SIcmuu4puo2L2DrLWpfnlnZMjJy7XJrLCwpI5qXwAAAAAAAAAAAK9QAK9Qr69QAACvUAAAAAAAr1AAr1AAAK9QAK9QAACvUK+vUAAAr1AAAAAAAK8AAACvAAAArwCvAK8AAK+TkY+vi4mHr4Kvfq96eHZ0cm9ta2lnZWNhX1xaWFZUUlBOTElHRUNBPz07OTY0MjAuLCooJiMhHx0bGRcVExAODAoIBgQCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
        self.vixen.processdata(self.datastr, 6)

    def tearDown(self):
        self.vixen = None

    def test_nothing(self):
        pass

    def test_ProcessData(self):
        self.assertEqual(self.vixen.periods, 1967,
                         'unable to process data correctly')

    #@unittest.skip("broken test")
    def test_SequenceFirstValue(self):
        print ord(self.vixen.sequence[0][0])
        self.assertEqual(ord(self.vixen.sequence[0][0]), 0,
                         'sequence does not match')

    #@unittest.skip("still need to test exceptions")
    def test_ProcessDataIncorrectly(self):
        datastr = "ASDFASEASDFASFEEE"
        self.assertRaises(BaseException, self.vixen.processdata, datastr, 6)

    @unittest.skip("the order of this test with the next causes a broken test")
    def test_GetPositionBeforePlay(self):
        pos = self.vixen.get_pos()
        print "hello from before " + str(pos)
        print "hello2 from before " + str(pos)
        self.assertEqual(pos, 0, 'position Not set correctly')

    @unittest.skip(
        "the order of this test with the previous causes a broken test")
    def test_GetPositionZAfterPlay(self):
        self.vixen.play()
        pos = self.vixen.pos_syncwait(10, 10)
        pos = self.vixen.get_pos()
        print "hello from after " + str(pos)
        print "hello2 from after " + str(pos)
        self.assertTrue(pos > 0, 'postition did not increase')

    def test_TicksAtPeriodTen(self):
        ticks = self.vixen.ticks_at_per(10)
        print "ticks at per 1 " + str(ticks)
        self.assertEqual(ticks, 1000, 'ticks did not calculate correctly')

    def test_valueAtPeriodOne(self):
        val = self.vixen.value(1, 1)
        print "value at per 1 channel 1 " + str(val)
        self.assertEqual(val, 0, 'value not set correctly')

    def test_valueAtPeriodOneHundred(self):
        val = self.vixen.value(0, 100)
        print "value at per 100 channel 1 " + str(val)
        self.assertEqual(val, 140, 'value not set correctly')

    #@unittest.skip("setting values does not work")
    def test_SetValueForAPoint(self):
        ch = 0
        per = 3
        setval = 141
        #print "sequence"
        #print ord(self.vixen.sequence[ch][per])
        val = self.vixen.value(ch, per)
        self.assertNotEqual(val, setval, 'values are the same before set')
        #print "value at per "+ str(per) +" channel "+str(ch)+" "+str(val)
        self.vixen.set_value(ch, per, setval)
        val = self.vixen.value(ch, per)
        #print "value at per "+str(per)+" channel "+str(ch)+" "+str(val)
        self.assertEqual(val, setval, 'set value does not set correctly')

    def test_SetValueToChannelOutOfRange(self):
        self.assertRaises(IndexError, self.vixen.set_value,
                          self.vixen.channels + 1, 10, 100)

    def test_NumberOfChannels(self):
        self.assertEqual(self.vixen.channels, 6,
                         'number of channels does not equal 6')

    def test_NumberOfValuesInArray(self):
        self.assertEqual(self.vixen.periods, 1967,
                         'there are not all periods in periods')

    def test_PeriodStr(self):
        val = self.vixen.period_str(100)
        self.assertEqual(val, 'per: 100/1967: 140,000,000,000,000,000',
                         'period string format changed')

    def test_ProcessZeroChannels(self):
        self.vixen.channels = 0
        self.assertRaises(BaseException, self.vixen.processdata, self.datastr,
                          0)
示例#21
0
 def test_PlayVixFileToEnd(self):
     test3 = Vixen()
     #rootdir = os.path.dirname(os.path.realpath(__file__))
     #SequencePath = os.path.join(rootdir,os.path.join("VixenFiles",os.path.join("Sequences","*.vix")))
     SequencePath = "../VixenFiles/Sequences/PythonDecodeSample2.vix"
     test3.loadfile(SequencePath)
示例#22
0
class VixenViewer(Vixen):

    BLACK    = (   0,   0,   0)
    WHITE    = ( 255, 255, 255)
    GREEN    = (   0, 255,   0)
    RED      = ( 255,   0,   0)
    ORANGE   = ( 255, 153,   0)
    YELLOW   = ( 255, 255,   0)
    BLUE     = ( 0,   0,   255)

    COLOR = ORANGE

    ard = ArduinoSerial()
    vix = Vixen()

    vixfilename = "Arduino6ChannelThisIsHolloweenMain.vix"
    vix.basedir('../VixenFiles')
    #vix.basedir('/home/pi/Github/vixen-python/VixenFiles')
    vix.loadfile(vixfilename)
    #vix.channels = 6
    vix.processdata(vix.event_values,vix.channels)
    channels = vix.channels


    box_width = 100
    box_gap   = 20
    box_off   = 50
    per = 0

    pygame.font.init()
    mfont = pygame.font.SysFont(None, 25)	

    #Opening and setting the window size
    size = (box_off*2+(vix.channels*(box_gap+box_width)), box_off*2+box_width)
    vix.set_screen(size)
    pygame.display.set_caption(vix.title)
    clock = pygame.time.Clock()
    offset = 0


    print "%s channels, %s periods" % (str(vix.channels),str(vix.periods))

    seq = vix.sequence
    vix.play()

    #print [ord(x) for x in seq[0][0]]
    done = False
    while not done:
        # --- Main event loop
        for event in pygame.event.get(): 
            if event.type == pygame.QUIT: # If user clicked close
                done = True
            if event.type == pygame.KEYDOWN: 
                if event.key == pygame.K_ESCAPE:
                    done = True 
                if event.key == pygame.K_UP:
                    pass
                    #offset += 100 
                if event.key == pygame.K_DOWN: 
                    pass
                    #offset -= 100 
                if event.key == pygame.K_LEFT: 
                    pass
                    #offset = 0 
        
        print
        if per >= vix.periods:
            print "Done"
            pygame.time.wait(2000)
            done = True
            break

        # --- Game logic should go here
        print '%s:' % str(per),

        # --- Drawing code should go here
    
        # First, clear the screen to white. Don't put other drawing commands
        # above this, or they will be erased with this command.
        vix.screen.fill(BLACK)
        label = mfont.render(vix.title + " [" +  vix.period_str(per) + "]"  , True, [x*.5 for x in COLOR])
        vix.screen.blit(label, (box_off, box_off+box_width+box_gap/2))
        
        for ch in range(vix.channels):
            #print ch
            #value = ord(seq[ch][per])
            value = vix.value(ch,per)
            print '{:3d}'.format(value),
            box_on = False
            if value > 1:
                box_on = True
            lef = box_off + ch*(box_gap + box_width)
            top = box_off
            wid = box_width
            hgt = box_width
            #print "[%d,%d,%d,%d] " % (lef,top,wid,hgt)
            r = value*(COLOR[0]/255.0)
            g = value*(COLOR[1]/255.0)
            b = value*(COLOR[2]/255.0)
            #print
            #print "color: (%d,%d,%d)" % (r,g,b)
            if box_on == True:
                pygame.draw.rect(vix.screen, (r, g, b), [lef,top,wid,hgt], 0)

        #print 'per: %s' % str(per),
        print 'ticks: %s' % str(vix.ticks_at_per(per)), 
        print 'pos: %d' % vix.get_pos(), 
        print 'diff: %s' % str(vix.get_pos() - vix.ticks_at_per(per)),

        #pygame.draw.rect(vix.screen, BLUE , [10,10,20,20], 1)
        #pygame.draw.rect(vix.screen, BLACK, [30,10,20,20], 1)
        #pygame.draw.rect(vix.screen, UNK  , [50,10,20,20], 1)
        #pygame.draw.rect(vix.screen, GREEN, [70,10,20,20], 1)
        
        # --- Attempt to sync to music	
        vix.pos_syncwait(per+1,offset)
            #print pygame.mixer.music.get_pos(), ((per+1) * millis + offset)
            #print loop_ticks, pygame.time.get_ticks()
        
    
        # --- Go ahead and update the screen with what we've drawn.
        #print vix.period_arr(per),
        ard.send(vix.period_arr(per))
        pygame.display.flip()
        per += 1