LJ/gstt.py

126 lines
2.8 KiB
Python
Raw Normal View History

2018-12-13 11:05:32 +00:00
# coding=UTF-8
'''
2018-12-18 01:45:23 +00:00
LJ Global state
v0.8.0
2018-12-31 13:49:11 +00:00
**
Almost all values here Will be overriden by LJ.conf file data
**
2018-12-18 01:45:23 +00:00
LICENCE : CC
by Sam Neurohack, Loloster, pclf
from /team/laser
'''
2018-12-13 11:05:32 +00:00
#ConfigName = "setexample.conf"
2018-12-21 16:23:43 +00:00
ConfigName = "LJ.conf"
2018-12-13 11:05:32 +00:00
2019-01-16 00:50:24 +00:00
debug = 0
2018-12-13 11:05:32 +00:00
anims= [[],[],[],[]]
2018-12-31 13:49:11 +00:00
# How many lasers are connected. Different that "currentlaser".
2018-12-13 11:05:32 +00:00
LaserNumber = 2
2018-12-19 11:39:54 +00:00
# What laser client to listen at launch
LasClientNumber = 0
MaxLasClient = 3
2019-01-16 00:50:24 +00:00
screen_size = [400,400]
2018-12-13 11:05:32 +00:00
xy_center = [screen_size[0]/2,screen_size[1]/2]
LjayServerIP = '192.168.1.13'
oscIPin = '192.168.1.15'
nozoscip = '192.168.1.15'
# gstt.Laser select to what laser modifcation will occur.
# Can be changed with /noteon 16-23
2018-12-18 01:45:23 +00:00
Laser = 0
2018-12-13 11:05:32 +00:00
2018-12-18 01:45:23 +00:00
# gstt.simuPL select what point list number to display in webUI simulator
2018-12-13 11:05:32 +00:00
# Can be changed with /noteon 24-31
simuPL = 1
2018-12-31 13:49:11 +00:00
# gstt.laserIPS.
2018-12-13 11:05:32 +00:00
lasersIPS = ['192.168.1.5','192.168.1.6','192.168.1.3','192.168.1.4']
2018-12-19 11:39:54 +00:00
2018-12-13 11:05:32 +00:00
# gstt.kpps stores kpps for each laser.
2018-12-31 13:49:11 +00:00
# ** Will be overridden by LJ.conf file values **
2018-12-13 11:05:32 +00:00
kpps = [25000,25000,25000,25000]
# gstt.GridDisplay : if = 1 Curve points actually sent to PL are replaced by a grid
GridDisplay = [0,0,0,0]
# Transformation Matrix for each laser
EDH = [[], [], [], []]
2018-12-31 13:49:11 +00:00
# Etherdreams reports
2018-12-13 11:05:32 +00:00
# ipconn is initial newdac to its etherdream
lstt_ipconn = [[-1], [-1], [-1], [-1]]
# dacstt is dac light engine state
lstt_dacstt = [[-1], [-1], [-1], [-1]]
2018-12-31 13:49:11 +00:00
# store last dac answers : ACK, not ACK,...
2018-12-13 11:05:32 +00:00
lstt_dacanswers = [[-1], [-1], [-1], [-1]]
# store last number of points sent to etherdreams buffer
lstt_points = [[0], [0], [0], [0]]
swapX = [1,1,1,-1]
swapY = [1,1,1,-1]
2018-12-31 13:49:11 +00:00
# For glitch art : change position and number of points added by tracer.py
# shortline is for distance with next point, shorter than 4000 (in etherdream coordinates)
2018-12-13 11:05:32 +00:00
# i.e (0.25,3) means add 3 points at 25% on the line.
2018-12-15 19:03:32 +00:00
stepshortline = [(1.0, 8)]
stepslongline = [(0.25, 3), (0.75, 3), (1.0, 10)]
2018-12-13 11:05:32 +00:00
point = [0,0,0]
cc = [0] * 256
lfo = [0] * 10
osc = [0] * 255
oscInUse = [0] * 255
knob = [0] * 33
# Viewer distance (cc 21)
cc[21]=60
viewer_distance = cc[21] * 8
# fov (cc 22)
cc[22]= 60
fov = 4 * cc[22]
JumpFlag =0
# OSC ports
#temporaray fix hack : iport=nozoport
iport = 8001 #LJay (bhorosc) input port
oport = 8002 #LJay (bhorosc) output port
noziport=8003 #nozosc.py receiving commands port
nozoport=8001 #nozosc.py sending port to LJay (main.py)
nozuport=0 #linux serial usb port connecting nozoid devices ACM0 by default
angleX = 0
angleY = 0
angleZ = 0
# multilasers arrays
centerX = [0,0,0,0]
centerY = [0,0,0,0]
zoomX = [0,0,0,0]
zoomY = [0,0,0,0]
sizeX = [0,0,0,0]
sizeY = [0,0,0,0]
finANGLE = [0,0,0,0]
warpdest = [[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]],
[[ 1. , 0. , 0.],[ 0. , 1. , 0.],[ 0. , 0. , 1.]]
]